Uploaded image for project: 'Apache Open Climate Workbench'
  1. Apache Open Climate Workbench
  2. CLIMATE-383

Add 'scripts' to the setup.py to support ocw-ui, and ocw-cli

    Details

      Description

      After seeing the following presentation at my local Python User Group:
      http://slid.es/edwardliaw/python-packaging

      I started thinking of all the ways that OCW's setup.py can be used to make it easier for new users to make use of the OCW CLI and WebApp.

      The goal for this issue is having a setup.py where a user can download the source code and run:

      $ python setup.py install
      

      That will install ocw into their python's location for 3rd party libs, meaning people can write python programs that can simply import ocw.

      The other goal is to enable users to also run common commands as scripts on their machine without worrying about being in the 'right location'.

      The two scripts I want to add in are:

      ocw_ui # Launches the WebApp
      ocw_cli # Launches the Command Line Interface

      Documentation on how to perform these actions will also be part of this JIRA, and will be added to the CLIMATE wiki page.

        Activity

        Hide
        omkar20895 Omkar Reddy added a comment -

        Hello,
        I tried running $ python setup.py install and importing the ocw as import ocw in python script. It imported the module successfully, I am confused what this issue is really about. Please let me know clearly.
        Thanks.

        Show
        omkar20895 Omkar Reddy added a comment - Hello, I tried running $ python setup.py install and importing the ocw as import ocw in python script. It imported the module successfully, I am confused what this issue is really about. Please let me know clearly. Thanks.
        Hide
        cgoodale Cameron Goodale added a comment -

        Hey Omkar,

        This is a really old issue that might need to be closed if the UI and CLI components are no longer being developed. My goal when i wrote this was to avoid a user having to navigate through the source code via: cd ocw/ui/ ; python main.py

        Instead I was expecting them to merely write ocw_ui from any directory once the setup.py has been run and ocw is installed.

        This link has more info about how to achieve this goal:
        http://python-packaging.readthedocs.org/en/latest/command-line-scripts.html

        Thanks for looking into this one.

        Show
        cgoodale Cameron Goodale added a comment - Hey Omkar, This is a really old issue that might need to be closed if the UI and CLI components are no longer being developed. My goal when i wrote this was to avoid a user having to navigate through the source code via: cd ocw/ui/ ; python main.py Instead I was expecting them to merely write ocw_ui from any directory once the setup.py has been run and ocw is installed. This link has more info about how to achieve this goal: http://python-packaging.readthedocs.org/en/latest/command-line-scripts.html Thanks for looking into this one.

          People

          • Assignee:
            cgoodale Cameron Goodale
            Reporter:
            cgoodale Cameron Goodale
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Due:
              Created:
              Updated:

              Time Tracking

              Estimated:
              Original Estimate - 4h
              4h
              Remaining:
              Remaining Estimate - 4h
              4h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development