From 76484de5c825265d91a288bd94d7121995d20be0 Mon Sep 17 00:00:00 2001 From: Phil Marshall Date: Fri, 14 Sep 2018 17:29:01 +0000 Subject: [PATCH 1/4] Better emphasis on developing and using the stackclub package --- GettingStarted/GettingStarted.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/GettingStarted/GettingStarted.md b/GettingStarted/GettingStarted.md index a1a8f3bc..636c7273 100644 --- a/GettingStarted/GettingStarted.md +++ b/GettingStarted/GettingStarted.md @@ -61,18 +61,20 @@ Broadly useful, small datasets are available in `/project/shared/data` - this i Larger datasets are available in `/datasets`. This is a read-only folder. #### The Stack Club Library -The [`stackclub` folder in this repo](../stackclub) is a python package containing a number of utility functions and classes for use in tutorial notebooks. You can browse its documentation at https://stackclub.readthedocs.io/. If you are not developing this package, you can install it using pip, like this: -``` -pip install git+git://github.com/LSSTScienceCollaborations/StackClub.git#egg=stackclub -``` -However, if you are contributing notebooks it is likely that you'll need to develop the `stackclub` package as well -(eg by adding modules to it), and so you'll need to make a local, editable installation. In the top level folder of your local clone of the StackClub repo, do: +The [`stackclub` folder in this repo](../stackclub) is a python package containing a number of utility functions and classes for use in tutorial notebooks. You can browse its documentation at https://stackclub.readthedocs.io/. +If you are contributing notebooks, you may want or need to develop the `stackclub` package as well +(eg by adding modules to it), and so its best to setup the package installation to be local and editable. In the top level folder of your local clone of the StackClub repo, do: ``` python setup.py -q develop --user ``` -This will put the `stackclub` folder on your path. You may find the following lines useful to add to your notebook as you develop the library: +This will put the repo's `stackclub` folder on your path. When developing the package, may find it useful to add the following lines to your notebook: ```python %load_ext autoreload %autoreload 2 ``` -This enables you to repeatedly `import stackclub` as you update the library code. +This enables you to repeatedly `import stackclub` as you update the library code. The above lines are in the [template notebook](templates/template_Notebook.ipynb), for your convenience. + +If you are not developing this package, you can install it using pip, like this: +``` +pip install git+git://github.com/LSSTScienceCollaborations/StackClub.git#egg=stackclub +``` \ No newline at end of file From 8e7c211c139142c8e58da31f7408f224426a2a84 Mon Sep 17 00:00:00 2001 From: Alex Drlica-Wagner Date: Fri, 14 Sep 2018 12:33:37 -0500 Subject: [PATCH 2/4] typo --- GettingStarted/GettingStarted.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GettingStarted/GettingStarted.md b/GettingStarted/GettingStarted.md index 636c7273..0ccbbc20 100644 --- a/GettingStarted/GettingStarted.md +++ b/GettingStarted/GettingStarted.md @@ -67,7 +67,7 @@ If you are contributing notebooks, you may want or need to develop the `stackcl ``` python setup.py -q develop --user ``` -This will put the repo's `stackclub` folder on your path. When developing the package, may find it useful to add the following lines to your notebook: +This will put the repo's `stackclub` folder on your path. When developing the package, you may find it useful to add the following lines to your notebook: ```python %load_ext autoreload %autoreload 2 @@ -77,4 +77,4 @@ This enables you to repeatedly `import stackclub` as you update the library code If you are not developing this package, you can install it using pip, like this: ``` pip install git+git://github.com/LSSTScienceCollaborations/StackClub.git#egg=stackclub -``` \ No newline at end of file +``` From 75bd0f0ea49adc6c2d05978fec08c1e3ed676816 Mon Sep 17 00:00:00 2001 From: Phil Marshall Date: Fri, 14 Sep 2018 21:25:51 -0700 Subject: [PATCH 3/4] Note about needing the right permissions for pip installing --- GettingStarted/GettingStarted.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GettingStarted/GettingStarted.md b/GettingStarted/GettingStarted.md index 0ccbbc20..0d10586e 100644 --- a/GettingStarted/GettingStarted.md +++ b/GettingStarted/GettingStarted.md @@ -74,7 +74,7 @@ This will put the repo's `stackclub` folder on your path. When developing the pa ``` This enables you to repeatedly `import stackclub` as you update the library code. The above lines are in the [template notebook](templates/template_Notebook.ipynb), for your convenience. -If you are not developing this package, you can install it using pip, like this: +If you are not developing this package, and you have permission to write to your base python site-packages, you can install it using pip, like this: ``` pip install git+git://github.com/LSSTScienceCollaborations/StackClub.git#egg=stackclub ``` From 83105d2b6d0c4246a66340da5b701cc703f2f270 Mon Sep 17 00:00:00 2001 From: Phil Marshall Date: Fri, 14 Sep 2018 21:28:14 -0700 Subject: [PATCH 4/4] pip install permissions, where to do the setup --- GettingStarted/FindingDocs.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GettingStarted/FindingDocs.ipynb b/GettingStarted/FindingDocs.ipynb index 1fd994da..ca7c8947 100644 --- a/GettingStarted/FindingDocs.ipynb +++ b/GettingStarted/FindingDocs.ipynb @@ -27,11 +27,11 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We'll need the `stackclub` package to be installed. If you are not developing this package, you can install it using `pip`, like this:\n", + "We'll need the `stackclub` package to be installed. If you are not developing this package, and you have permission to write to your base python site-packages, you can install it using `pip`, like this:\n", "```\n", "pip install git+git://github.com/LSSTScienceCollaborations/StackClub.git#egg=stackclub\n", "```\n", - "If you are developing the `stackclub` package (eg by adding modules to it to support the Stack Club tutorial that you are writing, you'll need to make a local, editable installation. In the top level folder of the `StackClub` repo, do:" + "If you are developing the `stackclub` package (eg by adding modules to it to support the Stack Club tutorial that you are writing), you'll need to make a local, editable installation, like this:" ] }, {