From b561e734fcf47c19be60f03fd79e2670fbd1f397 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 9 May 2020 05:34:07 -0500 Subject: [PATCH 1/2] Add release instructions cleanup Add more instructions formatting cleanup formatting --- RELEASE.md | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 RELEASE.md diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000000..7739f4a317 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,72 @@ +# Making a Release of Notebook + +## Start from a fresh git checkout and conda environment + +### Set the release branch + +```bash +export release_branch=master +``` + +### Create the git checkout + +```bash +git clone git@github.com:jupyter/notebook.git +cd notebook +git checkout ${release_banch} +``` + +### Create and activate the conda environment + +```bash +conda create -n notebook-release -c conda-forge jupyter +conda activate notebook-release +``` + +## Perform a local dev install + +```bash +pip install -ve . +``` + +## Install release dependencies + +```bash +conda install -c conda-forge nodejs babel twine +npm install -g po2json +``` + +## Update the version + +```bash +vim notebook/_version.py +git commit -am "Release $(python setup.py --version)" +git tag $(python setup.py --version) +``` + +## Create the artifacts + +```bash +rm -rf dist +python setup.py sdist +python setup.py bdist_wheel +``` + +## Upload the artifacts + +```bash +twine check dist/* && twine upload dist/* +``` + +## Change back to dev version + +```bash +vim notebook/_version.py +git commit -am "Back to dev version" +``` + +## Push the commits and tags + +```bash +git push origin ${release_branch} --tags +``` From 87201a533974ca31acae9d2da4bc9827f11dc340 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sun, 10 May 2020 02:17:45 -0500 Subject: [PATCH 2/2] Consolidate release notes into RELEASE.md --- RELEASE.md | 3 +- docs/source/development_release.rst | 67 ----------------------------- docs/source/index.rst | 1 - 3 files changed, 2 insertions(+), 69 deletions(-) delete mode 100644 docs/source/development_release.rst diff --git a/RELEASE.md b/RELEASE.md index 7739f4a317..12bfd36034 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -40,6 +40,7 @@ npm install -g po2json ```bash vim notebook/_version.py +python setup.py jsversion git commit -am "Release $(python setup.py --version)" git tag $(python setup.py --version) ``` @@ -61,7 +62,7 @@ twine check dist/* && twine upload dist/* ## Change back to dev version ```bash -vim notebook/_version.py +vim notebook/_version.py # Add the .dev suffix git commit -am "Back to dev version" ``` diff --git a/docs/source/development_release.rst b/docs/source/development_release.rst deleted file mode 100644 index 4350ace10f..0000000000 --- a/docs/source/development_release.rst +++ /dev/null @@ -1,67 +0,0 @@ -.. _notebook_release: - -Making a Notebook release -========================= - -This document guides a contributor through creating a release of the Jupyter -notebook. - -Check installed tools ---------------------- - -Review ``CONTRIBUTING.rst``. Make sure all the tools needed to generate the -minified JavaScript and CSS files are properly installed. - -Clean the repository --------------------- - -You can remove all non-tracked files with: - -.. code:: bash - - git clean -xfdi - -This would ask you for confirmation before removing all untracked files. Make -sure the ``dist/`` folder is clean and avoid stale build from -previous attempts. - -Create the release ------------------- - -#. Update version number in ``notebook/_version.py``. - -#. Run this command: - - .. code:: bash - - python setup.py jsversion - - It will modify (at least) ``notebook/static/base/js/namespace.js`` which - makes the notebook version available from within JavaScript. - -#. Commit and tag the release with the current version number: - - .. code:: bash - - git commit -am "release $VERSION" - git tag $VERSION - -#. You are now ready to build the ``sdist`` and ``wheel``: - - .. code:: bash - - python setup.py sdist - python setup.py bdist_wheel - -#. You can now test the ``wheel`` and the ``sdist`` locally before uploading - to PyPI. Make sure to use `twine `_ to - upload the archives over SSL. - - .. code:: bash - - twine upload dist/* - -#. If all went well, change the ``notebook/_version.py`` back adding the - ``.dev`` suffix. - -#. Push directly on master, not forgetting to push ``--tags`` too. diff --git a/docs/source/index.rst b/docs/source/index.rst index d61dcac310..71e2ca132e 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -33,7 +33,6 @@ The Jupyter Notebook :caption: Contributor Documentation contributing - development_release development_faq .. toctree::