From 9f697a3c99066dbd615779fadfd0ebb8a36a38a1 Mon Sep 17 00:00:00 2001 From: Irfan Alibay Date: Sun, 29 May 2022 21:01:25 +0100 Subject: [PATCH 1/2] Update preparing_releases_and_hotfixes.rst --- .../preparing_releases_and_hotfixes.rst | 130 ++++++++---------- 1 file changed, 55 insertions(+), 75 deletions(-) diff --git a/doc/source/preparing_releases_and_hotfixes.rst b/doc/source/preparing_releases_and_hotfixes.rst index d6d96818c..b36730067 100644 --- a/doc/source/preparing_releases_and_hotfixes.rst +++ b/doc/source/preparing_releases_and_hotfixes.rst @@ -52,103 +52,83 @@ Typical workflow for preparing a release #. Finalise the ``CHANGELOG`` with the release number and date. Summarize important changes and add all authors that contributed to this release. -#. Make sure the version number is right:: +#. Make sure the version number is right. The following files need to be updated: ``maintainer/conda/MDAnalysis/meta.yaml``, ``package/MDAnalysis/version.py``, ``package/setup.py``, ``testsuite/MDAnalysisTests/__init__.py``, and ``testsuite/setup.py``. - ./maintainer/change_release.sh 0.7.6 - -#. Check that the documentation is up-to-date and tests pass. Check that any new Cython code has compiled. +#. Check that the documentation is up-to-date and tests pass. #. Commit the finalized state:: git commit -m "release 0.7.6 ready" -#. Build a source distribution tarballs under ``package/dist/MDAnalysis-MAJOR-MINOR-PATCH.tar.gz`` and ``testsuite/dist/MDAnalysisTests-MAJOR-MINOR-PATCH.tar.gz``: - - .. code-block:: bash - - # MDAnalysis - cd package/ - python setup.py sdist - - # MDAnalysisTests - cd ../testsuite/ - python setup.py sdist - -#. Test the distribution in a ``tmp`` directory. - - #. Unpack and try to build it: - - .. code-block:: bash - - mkdir tmp && cd tmp - tar -zxvf ../dist/MDAnalysis-0.7.5.tar.gz - cd MDAnalysis-0.7.5 - python setup.py build --build-lib=. - - - #. Run the tests again: - - .. code-block:: +#. Create a pull request against ``develop`` from this branch. - python - >>> import MDAnalysis.tests - >>> MDAnalysis.tests.test(label='full', extra_argv=['--exe']) +#. Create a new tag from ``develop`` named ``release-`` where ```` is the release version number (this tag contains a snapshot of the Python source files as they were when the release was created): - - The above should work at least on Linux and Mac OS X. If it fails then go back and fix things and *do not release*. + .. code-block: bash + git tag -m "release 0.7.5 of MDAnalysis and MDAnalysisTests" release-0.7.5 + git push --tags origin -#. If everything works, merge the branch into master and tag the release:: +#. Create a ``package-`` branch from ``develop``. This branch is automatically protected, so you will also need to create a separate branch to create commits via PR against ``package-``. - git checkout master - git merge --no-ff release-0.7.6 - git tag -m 'release 0.7.5 of MDAnalysis and MDAnalysisTests' release-0.7.5 - git push --tags origin master +#. Generate new C/C++ files and commit them to the ``package-`` branch via PR. We recommend generate the C/C++ files by building a *source distribution* tarball so you can check at the same time that there are no issues with the distribution creation process: -#. Merge the branch back into ``develop`` (this is not required if the only change was the version number):: - - git checkout develop - git merge --no-ff release-0.7.6 - ./maintainer/change_release.sh 0.7.7-devel - git commit -a -m "version number changed to 0.7.7-devel" - -#. Build and deploy the docs manually. (You may need to first ``pip install sphinx==2.2.0 sphinx_sitemap sphinx_rtd_theme``):: - - cd package/ - python setup.py build_sphinx - cd .. - - # You need a OAUTH token that gives commit access to the MDAnalysis/docs repo - export GH_TOKEN= - - ./maintainer/deploy_master_docs.sh - -#. Update the release on the Python package index (Pypi) - - #. Upload the package to Pypi. You need to have run ``python setup.py register`` previously. - - .. code-block:: bash + .. code-block:: bash - twine upload -r pypi dist/MDAnalysis-0.16.2.tar.gz + # MDAnalysis + cd package/ + python setup.py sdist - #. Upload the docs to Pypi +#. Once committed, create a new tag based on ``package-`` (this tag will contain a record of all the files as they were deployed to users for that version): - #. Make the new tar ball a *featured* release so that it shows up on the front page (and *unfeature* any older releases). + .. code-block:: bash - #. Provide a short description (a condensed version of the ``CHANGELOG``) + git tag -m "package 0.7.5 of MDAnalysis and MDAnalysisTests" package-0.7.5 + git push --tags origin + +#. Upon creation of the new ``package-*`` tag, the `developer mailing list`_, will be triggered to create source/wheels, upload them to testpypi, and re-download them and run tests. -#. Update the release on Anaconda +#. If all the tests come back green, you are good to go for a full release. - conda packages are built on conda-forge. + #. If tests fail you will need to work out the cause of the failure. + + #. A temporary github actions failure + + Re-run the action and wait for the tests to complete + + #. An issue with the source code. + + #. Delete the current ``package-*`` branch, and the newly created tags + + #. Add the new changes to ``develop`` and restart the release process. + + #. Upon getting to the ``package-*`` tag creation, create a test tag with a different version number (bump by a minor release or add a ``-beta`` modifier), so as to trigger the release and tests against testpypi. + + #. Delete the test tag, create a normal ``package-`` tag with the correct version number. + + #. The githuba action will fail, but this is ok since we tested it with the test tag above. + +#. If everything works, you can now complete the release by createing a release on Github based on the newly created ``package-`_ (using the ``CHANGELOG`` as a reference). Add it to the `Release Notes `_. + #. On push to PyPI, the conda-forge bot should automatically pick up the presense of a new version and create a pull request on the `MDAnalysis feedstock`_ + #. Update the ``meta.yaml`` file as necessary, especially bumping up the python and dependency minimum versions as necessary. + + #. Ask the conda-forge admin to re-render, check that CI returns green, approve and merge the pull request. -#. Delete the release branch:: +#. Documentation will be built automatically and versioned. Check that these have been created appropriately on the `stable branch of the docs page`_. - git branch -d release-0.7.6 +#. Create a blog post outlining the release notes and publicize it on the mailing list / discord / twitter/ etc...! .. _`developer mailing list`: https://groups.google.com/forum/#!forum/mdnalysis-devel +.. _`deploy github action`: https://github.com/MDAnalysis/mdanalysis/tree/develop/.github/workflows/deploy.yaml +.. _`MDAnalysis feedstock`: https://github.com/conda-forge/mdanalysis-feedstock +.. _`stable branch of the docs page`: https://docs.mdanalysis.org/stable From 75f57101b7f50c8fe74601fee8ed2e1fa29822de Mon Sep 17 00:00:00 2001 From: IAlibay Date: Sun, 29 May 2022 21:19:27 +0100 Subject: [PATCH 2/2] bump up python version to 3.8 --- .github/workflows/gh-ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gh-ci.yaml b/.github/workflows/gh-ci.yaml index 51421f45b..da4b0afb8 100644 --- a/.github/workflows/gh-ci.yaml +++ b/.github/workflows/gh-ci.yaml @@ -31,7 +31,7 @@ jobs: - name: setup_miniconda uses: conda-incubator/setup-miniconda@v2 with: - python-version: 3.7 + python-version: 3.8 auto-update-conda: true channel-priority: flexible channels: plotly, conda-forge