Skip to content

Instantly share code, notes, and snippets.

@harryscholes
Last active August 1, 2017 16:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harryscholes/6965a732314725ddd9970cde0a2d703b to your computer and use it in GitHub Desktop.
Save harryscholes/6965a732314725ddd9970cde0a2d703b to your computer and use it in GitHub Desktop.
Setup development environment for Python modules stored on GitHub
## e.g. for NetworkX (https://github.com/networkx/networkx/blob/master/CONTRIBUTE.rst)
## set up repo
# fork repo on GitHub
cd ~/git
git clone git@github.com:harryscholes/networkx.git
cd networkx
git remote add upstream git@github.com:networkx/networkx.git
git checkout master
git pull upstream master
## develop
git checkout -b an-informative-name
#setup conda env without NetworkX
conda create -n networkx_dev python=3 jupyter nb_conda
source activate networkx_dev
pip install -e .
# brew install gdal
pip install -r requirements.txt
jupyter notebook
# %load_ext autoreload # <--- import into jupyter
# %autoreload 2
# import networkx as nx
## push changes
git push origin an-informative-name
# create pull request
source deactivate networkx_dev
conda env remove -n networkx_dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment