From fabc047a8d78184098bde333e2c6960d7baf7962 Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Sun, 4 Feb 2018 04:12:25 +0100 Subject: [PATCH 1/8] FIXES #1224 - Added contribution section to README.md --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 9b68d0094..eca8307fc 100644 --- a/README.md +++ b/README.md @@ -243,6 +243,20 @@ Each notebook extension typically has its own directory named after the extensio For further details, see [the documentation at jupyter-contrib-nbextensions.readthedocs.io](http://jupyter-contrib-nbextensions.readthedocs.io/en/latest/internals.html). +Contributing +============ + +1. __Fork__ +2. __Clone and setup__ +```bash +git clone https://github.com/ipython-contrib/jupyter_contrib_nbextensions.git +cd jupyter_contrib_nbextensions +pip install --editable . +jupyter-contrib-nbextension install --symlink --sys-prefix +``` +3. __Develop__ +4. __Pull request__ + Changes ======= From 4066e83eb7e9e4fcdf6ad38b0857ac11f28cdd3b Mon Sep 17 00:00:00 2001 From: Benelot Date: Sun, 4 Feb 2018 14:46:18 +0100 Subject: [PATCH 2/8] CONTRIBUTION.md created from Wiki entry --- CONTRIBUTING.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..384c18ea0 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,18 @@ +**Hello and welcome to the contribution page of jupyter notebook nbextensions!** + +We are super happy that you intend to contribute to the nbextensions. Here is the plan how this works very nicely, for you and of course for the repository maintainer too. + +### Create an issue + +Do not hesitate to open up an issue to propose your new extension and how you would think of it to work. Like that, it is easier to point you to extensions that do similar things, whether it is worth it to implement this, what to look for etc. + +Here is an example issue of how @benelot did it and it worked pretty smoothly: [#1193](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/issues/1193) + +To create a new jupyter notebook extension, just fork the repository and clone it to your local machine. Then look into the [jupyter_contrib_nbextensions/nbextensions](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/tree/master/src/jupyter_contrib_nbextensions/nbextensions) folder and add a folder with the name of your new extension. Check out the [Jupyter Notebook extension structure Link](http://jupyter-contrib-nbextensions.readthedocs.io/en/latest/internals.html)k to know what else has to be in that folder and what are the general conventions for it. + +### Create a pull request +Then, as you are ready with your contribution, pull-request to the main repo and explain quickly what you have done. + +Here is an example pull request of how @benelot did it and it worked super well: [#1213](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/pull/1213) + +Do not forget to add your new extension to the [CHANGELOG.md](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/blob/master/CHANGELOG.md) so that it will be announced to be in the release. \ No newline at end of file From a31dccd311bc6b54a9d434344a1f4689057cbcae Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Sun, 4 Feb 2018 15:48:46 +0100 Subject: [PATCH 3/8] Help on setting up development added --- CHANGELOG.md | 3 +++ CONTRIBUTING.md | 40 ++++++++++++++++++++++++++++++---------- README.md | 11 +---------- 3 files changed, 34 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bb4cbc6d..2400c87c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,6 +47,9 @@ Repo-level stuff: [#1200](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/pull/1200), [#1201](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/pull/1201) [@jcb91](https://github.com/jcb91) +- Added CONTRIBUTION.md + [#1224](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/pull/1224) + [@consideratio](https://github.com/consideratio) New features and bugfixes: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 384c18ea0..8ac7a621a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,18 +1,38 @@ -**Hello and welcome to the contribution page of jupyter notebook nbextensions!** +# Contributing to jupyter notebook nbextensions -We are super happy that you intend to contribute to the nbextensions. Here is the plan how this works very nicely, for you and of course for the repository maintainer too. +We are super happy that you intend to contribute to the nbextensions! You can discuss improvements in issues and improvement them in pull requests. -### Create an issue +## Create an issue -Do not hesitate to open up an issue to propose your new extension and how you would think of it to work. Like that, it is easier to point you to extensions that do similar things, whether it is worth it to implement this, what to look for etc. +Do not hesitate to open up an issue, you can discuss bugs, improvements or new extensions in them. Creating an issue is a good starting point for code contributions. The community can support you with experience of similar extensions, pros and cons, what to look for etc. -Here is an example issue of how @benelot did it and it worked pretty smoothly: [#1193](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/issues/1193) +Here is an example issue of how @benelot did it that worked pretty smoothly: [#1193](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/issues/1193) -To create a new jupyter notebook extension, just fork the repository and clone it to your local machine. Then look into the [jupyter_contrib_nbextensions/nbextensions](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/tree/master/src/jupyter_contrib_nbextensions/nbextensions) folder and add a folder with the name of your new extension. Check out the [Jupyter Notebook extension structure Link](http://jupyter-contrib-nbextensions.readthedocs.io/en/latest/internals.html)k to know what else has to be in that folder and what are the general conventions for it. +## Setup development -### Create a pull request -Then, as you are ready with your contribution, pull-request to the main repo and explain quickly what you have done. +1. __Fork and clone__ +First fork this repo, then clone your fork. In this way you become prepared to make a pull request. -Here is an example pull request of how @benelot did it and it worked super well: [#1213](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/pull/1213) +```shell +# clone your fork +git clone https://github.com//jupyter_contrib_nbextensions.git +cd jupyter_contrib_nbextensions +``` +2. __Setup__ +```shell +# run from the main directory, where setup.py is +pip install --editable . +jupyter-contrib-nbextension install --symlink --sys-prefix +``` -Do not forget to add your new extension to the [CHANGELOG.md](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/blob/master/CHANGELOG.md) so that it will be announced to be in the release. \ No newline at end of file +## Create an extension + +Add a folder with the name of your new extension to [jupyter_contrib_nbextensions/nbextensions](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/tree/master/src/jupyter_contrib_nbextensions/nbextensions). Check out the [Jupyter Notebook extension structure link](http://jupyter-contrib-nbextensions.readthedocs.io/en/latest/internals.html) to know what has to be in that folder and what the general conventions are. + +## Create a pull request + +As you are ready with your code contribution, make a pull-request to the main repo and briefly explain what you have done. + +Here is an example pull request of how @benelot did it that worked super well: [#1213](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/pull/1213) + +Please also update the [CHANGELOG.md](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/blob/master/CHANGELOG.md). \ No newline at end of file diff --git a/README.md b/README.md index eca8307fc..8b61f2c4c 100644 --- a/README.md +++ b/README.md @@ -246,16 +246,7 @@ For further details, see [the documentation at jupyter-contrib-nbextensions.read Contributing ============ -1. __Fork__ -2. __Clone and setup__ -```bash -git clone https://github.com/ipython-contrib/jupyter_contrib_nbextensions.git -cd jupyter_contrib_nbextensions -pip install --editable . -jupyter-contrib-nbextension install --symlink --sys-prefix -``` -3. __Develop__ -4. __Pull request__ +To learn how to setup a development enivornment and contribution guidelines, see [CONTRIBUTING.md](./CONTRIBUTING.md). Changes ======= From 87b05c6dc55c39ffeb2cc436b329ed27b2787297 Mon Sep 17 00:00:00 2001 From: Josh Barnes Date: Sun, 4 Feb 2018 23:41:42 +0100 Subject: [PATCH 4/8] [init_cell] PR code review corrections --- CHANGELOG.md | 6 +++--- CONTRIBUTING.md | 6 ++++-- MANIFEST.in | 1 + 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2400c87c9..88a1ba980 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,9 @@ Unreleased (aka. GitHub master) This is where each new PR to the project should add a summary of its changes, which makes it much easier to fill in each release's changelog :) +- Added CONTRIBUTING.md + [#1224](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/pull/1224) + [@consideratio](https://github.com/consideratio) 0.4.0 ----- @@ -47,9 +50,6 @@ Repo-level stuff: [#1200](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/pull/1200), [#1201](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/pull/1201) [@jcb91](https://github.com/jcb91) -- Added CONTRIBUTION.md - [#1224](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/pull/1224) - [@consideratio](https://github.com/consideratio) New features and bugfixes: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8ac7a621a..63f83ceee 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Contributing to jupyter notebook nbextensions -We are super happy that you intend to contribute to the nbextensions! You can discuss improvements in issues and improvement them in pull requests. +We are super happy that you intend to contribute to the nbextensions! You can discuss improvements in issues and implement them in pull requests. ## Create an issue @@ -22,7 +22,9 @@ cd jupyter_contrib_nbextensions ```shell # run from the main directory, where setup.py is pip install --editable . -jupyter-contrib-nbextension install --symlink --sys-prefix + +# on windows, remove the --symlink flag and run the command in between changes +jupyter-contrib-nbextension install --sys-prefix --symlink ``` ## Create an extension diff --git a/MANIFEST.in b/MANIFEST.in index d0b4cd55d..400ddb238 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,6 +1,7 @@ # explicit includes include COPYING.rst include README.md +include CONTRIBUTING.md include CHANGELOG.md include tox.ini include .bumpversion.cfg From e9f344bbca78c126e0f2c72ad43563b06280f833 Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Sun, 4 Feb 2018 23:53:15 +0100 Subject: [PATCH 5/8] fixed misplacement - 0.4.0 -> unreleased --- CHANGELOG.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88a1ba980..fc690fdfc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,10 +21,17 @@ Unreleased (aka. GitHub master) This is where each new PR to the project should add a summary of its changes, which makes it much easier to fill in each release's changelog :) +Repo-level stuff: + - Added CONTRIBUTING.md [#1224](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/pull/1224) [@consideratio](https://github.com/consideratio) +New features and bugfixes: + + - `init_cell` + * Warning dialog now always relevant, fixes [#1223](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/issues/1223). [#1226](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/pull/1226) [@consideratio](https://github.com/consideratio) + 0.4.0 ----- @@ -121,10 +128,6 @@ New features and bugfixes: - `code_prettify` Update `code_prettify.yaml` [#1162](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/pull/1162) [@fehiepsi](https://github.com/fehiepsi) - - `init_cell` - * Warning dialog now always relevant, fixes [#1223].(https://github.com/ipython-contrib/jupyter_contrib_nbextensions/issues/1223) - [#1226](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/pull/1226) - [@consideratio](https://github.com/consideratio) 0.3.3 From 7fd79bdcacca949492c58e4ca25b597fc42bb59f Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Mon, 5 Feb 2018 00:16:25 +0100 Subject: [PATCH 6/8] wording... --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 63f83ceee..3352368c7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,7 +23,7 @@ cd jupyter_contrib_nbextensions # run from the main directory, where setup.py is pip install --editable . -# on windows, remove the --symlink flag and run the command in between changes +# on windows, remove the --symlink flag and run the command after code updates jupyter-contrib-nbextension install --sys-prefix --symlink ``` From 4e3f269c146a642f228589e8d239ecece16ab5f2 Mon Sep 17 00:00:00 2001 From: Josh Barnes Date: Tue, 6 Feb 2018 13:04:03 +0000 Subject: [PATCH 7/8] [docs] fix indents for lists in CONTRIBUTING.md --- CONTRIBUTING.md | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3352368c7..b458665a3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,21 +11,23 @@ Here is an example issue of how @benelot did it that worked pretty smoothly: [#1 ## Setup development 1. __Fork and clone__ -First fork this repo, then clone your fork. In this way you become prepared to make a pull request. + First fork this repo, then clone your fork. In this way you become prepared to make a pull request. + + ```shell + # clone your fork + git clone https://github.com//jupyter_contrib_nbextensions.git + cd jupyter_contrib_nbextensions + ``` -```shell -# clone your fork -git clone https://github.com//jupyter_contrib_nbextensions.git -cd jupyter_contrib_nbextensions -``` 2. __Setup__ -```shell -# run from the main directory, where setup.py is -pip install --editable . -# on windows, remove the --symlink flag and run the command after code updates -jupyter-contrib-nbextension install --sys-prefix --symlink -``` + ```shell + # run from the main directory, where setup.py is + pip install --editable . + + # on windows, remove the --symlink flag and re-run the command each time you make changes + jupyter-contrib-nbextension install --sys-prefix --symlink + ``` ## Create an extension From 35d39276bcc7124f74c0d6bafdfc538afef6165a Mon Sep 17 00:00:00 2001 From: Josh Barnes Date: Tue, 6 Feb 2018 13:08:07 +0000 Subject: [PATCH 8/8] [docs] add some clarifications to CONTRIBUTING.md * using github for small doc-edit type PRs * conda/virtualenv activation * which bit of changelog to update --- CONTRIBUTING.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b458665a3..501715749 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,6 +10,8 @@ Here is an example issue of how @benelot did it that worked pretty smoothly: [#1 ## Setup development +For small things like fixing typos in documentation, you can [make edits through GitHub](https://help.github.com/articles/editing-files-in-another-user-s-repository/), which will handle forking and making a pull request (PR) for you. For anything bigger or more complex, you'll probably want to set up a development environment, a quick procedure for which is as folows: + 1. __Fork and clone__ First fork this repo, then clone your fork. In this way you become prepared to make a pull request. @@ -21,6 +23,8 @@ Here is an example issue of how @benelot did it that worked pretty smoothly: [#1 2. __Setup__ + If you're using python in combination with some form of virtual environment (e.g. conda, virtualenv), make sure you have the correct environment (the one from which you run `jupyter notebook`) active before running these commands! + ```shell # run from the main directory, where setup.py is pip install --editable . @@ -39,4 +43,4 @@ As you are ready with your code contribution, make a pull-request to the main re Here is an example pull request of how @benelot did it that worked super well: [#1213](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/pull/1213) -Please also update the [CHANGELOG.md](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/blob/master/CHANGELOG.md). \ No newline at end of file +Please also update the [unreleased section](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/blob/master/CHANGELOG.md#unreleased-aka-github-master) of the [CHANGELOG.md](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/blob/master/CHANGELOG.md) to note what you've added or fixed.