CityOfNewYork / CROL-Overview

City Record Online parsing libraries and supporting files
26 stars 14 forks source link

Dev env doc has to be fleshed out #27

Closed cds-amal closed 5 years ago

cds-amal commented 9 years ago

Development Environment readme needs to be updated

  1. Python
  2. IPython
  3. Dependencies
  4. Useful resources
  5. Gotchas
cds-amal commented 9 years ago

@bmadhusu Can you help document some of the steps we covered getting your environment ready?

bmadhusu commented 9 years ago

@kiddle , can you take a look at this and correct, edit, etc?

After installing virtualenv and virtualenvwrapper using pip commands, you can now have multiple python environments on the same machine.

  1. Create a top-level folder where you will do your python work [you will create subdirectories underneath this folder. For this e.g., we use: "mkdir python_envs"
  2. In your .bash_profile file, add the following lines:

    export WORKON_HOME=~/python_envs [or whatever you called your folder] source /usr/local/bin/virtualenvwrapper.sh

  3. Save and exit
  4. Source your .bash_profile or restart your terminal window so the new commands are invoked
  5. "cd python_envs"
  6. Issue your first virtualenvwrapper command: "mkvirtualenv crow" // this will create a virtual python environment that is suitable for your work on City Record; This command will create a subfolder called crow within python_envs
  7. "cd crow"
  8. Execute "git clone https://github.com/CityOfNewYork/CROL-Schema.git
  9. Execute "git clone https://github.com/CityOfNewYork/CROL-Parsing.git

    You should now have both Parsing and Schema folders under python_envs/crow

  10. “cd /“ to take you back to your home folder
  11. Type “python —version” to see what version of python you are using. In most cases it will be a 2.x version
  12. Issue your second virtualenvwrapper command: “workon crow” // crow is the virtual environment we made earlier
  13. Your command prompt will now show the virtual environment you are working in: (crow)
  14. Type “python —version” to see what version comes up. City Record is using Python 3.4.3 so that is what you should see
  15. Now do your development! Issue github commands, etc.
  16. Once you are done, you can exit the virtual ‘crow’ environment by typing: “deactivate”;