Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/gh-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
130 changes: 55 additions & 75 deletions doc/source/preparing_releases_and_hotfixes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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-<version_number>`` where ``<version_number>`` 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-<version_number>`` 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-<version_number>``.

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-<version_number>`` 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=<secret>

./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-<version_number>`` (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-<version_number>`` 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-<version_number`` tag.

#. This will re-trigger the `deploy github action`_ and upload the source distributions / wheels to PyPI.

#. If the action fails as this point and no files have been deployed, then restart the action.

#. If the action fails and some files have been deployed, then you will not be able to re-upload to PyPI. At this point you will need to yank the release from PyPI and create a new minor version and re-deploy it.

#. Create a pull request from https://github.com/MDAnalysis/mdanalysis-feedstock for https://github.com/conda-forge/mdanalysis-feedstock
#. Create a pull request from https://github.com/MDAnalysis/mdanalysistests-feedstock to https://github.com/conda-forge/mdanalysistests-feedstock
#. Update the release on conda-forge

#. Create a ReleaseXYZ wiki page, modelled after e.g. `Release062 <https://github.com/MDAnalysis/mdanalysis/wiki/Release062>`_ (using the ``CHANGELOG`` as a reference). Add it to the `Release Notes <https://github.com/MDAnalysis/mdanalysis/wiki/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