-
-
Notifications
You must be signed in to change notification settings - Fork 54
ndcube Release Instructions
For major releases only:
- Update RELEASE.rst
- Do a conda-forge build for at least one of the release candidates
- Remove the files under the developer's guide except for
index.rst
,stability.rst
andsunpy_stability.yaml
. Then change theindex.rst
file to read:
.. _dev_guide:
Developer's Guide
=================
Please go `here <https://docs.sunpy.org/en/latest/dev_guide/index.html>`_ for our up to date developer's guide.
.. toctree::
:maxdepth: 2
stability
Branching:
- Create and change onto a new release branch from master labeled with the release number
X.Y
.
All of the following assumes that you are on the release branch and not master (X.Y
e.g 1.0
)
Pre-release:
- Update the changelog using towncrier:
towncrier --version vX.Y.Z
if it's a rc release do not select the option to delete the changelog files. We release full changelogs for all rcs.
- Commit the changes
git add .
git commit -m "Release vX.Y.Z"
- Push directly to the release branch on sunpy ndcube repo
git push upstream X.Y
- Check that the CI passes on last commit on the branch (including the wheel builds).
- Test that RTD is building the documentation correctly on the branch.
If you need to fix anything do so on the branch and forward port to master as need be (to reduce the CI builds).
- Tag on and push (tag should be full version number preceded by a
v
)
git checkout X.Y
git tag -a vX.Y.Z -m "Releasing version vX.Y.Z"
git push --follow-tags upstream vX.Y.Z
This triggers the Azure release pipeline which will build and test the wheels and dist then upload them to PyPi for you.
If there is an issue at this step, the fix will be to update the config in the azure template repo, a patch to this repository should only happen if somehow the inputs to the template need to be changed. Since we use tags, you will to update the tag and force push it. Then (re)start the tag job on azure pipelines.
- Update the conda forge sunpy-feedstock repo, ideally a bot should do it for you
Post Release:
- Make sure all builds of sunpy are complete and uploaded (conda-forge and wheels)
- Create the release on GitHub releases, copy the changelog into the description. The following pandoc command will convert it to markdown:
pandoc -t markdown_strict CHANGELOG.rst
. - Enable the tag on Read the Docs.
- For a final major release, make a commit to master which renders the changelog and removes the files.
Announcements:
- Post release announcement on social media sites
- Send release announcement to mailing lists
Email Template
-----
Dear all,
The SunPy developers present to you the latest release of SunPy <version>.
In this update the headline fixes are <fill in>
The full changelog is:
<fill in>
To update you can run these following commands:
Pip users:
pip install -U sunpy
Conda Users:
conda update sunpy
GitHub Users:
git pull <local upstream name> <version>
Please enjoy,
The SunPy Developers
=============================
For Major releases only (releasing full master branch):
- Create and change onto a new release branch from master named with the release number
X.Y
. - Make sure
xonsh
is installed and then change into the root directory of thendcube
packages. Also ensure sunpy repo is cloned. Then from the command prompt, runpath_to_root_dir_of_sunpy_repo/tools/generate_releaserst.xsh 1.2.0 --project-name=ndcube --repo=sunpy/ndcube --pretty-project-name=ndcube
For Minor/bugfix releases only:
- Move desired changes from master to release branch (
X.Y
) by cherry-picking the merge commits of the PRs to be included in the new release. (If not all commits from a PR should be included, individual commits can be cherry-picked.) To do this, change onto the release branch, identify the merge commits to include, and run
git cherry-pick <merge commit> -m 1
where -m 1
selects parent 1 of the merge commit. (If a non-merge commit is being cherry-picked, the -m 1
is not necessary.)
Pre-release:
- Update version number in
setup.cfg
(the version number branch and don't commit yet) - run
towncrier
in the root of the repo to update the changelog. Simply type
towncrier
- Build the source distribution:
python setup.py sdist
- Test that the sdist installs (in an (new) environment of your choice). To do this unzip the tar file in the dist/ directory. Change into the unzipped directory and do
pip install .
. - Check that the
ndcube.__version__
number is correct. - Run
ndcube.test()
to check that installed tests work. If performing this on a Mac, be aware that there are known matplotlib Mac backend issues which may cause the tests to abort with an "Abort trap: 6" error. This doesn't appear to be a problem with ndcube or the ability to release a new version. - Commit the changes:
git add .
git commit -m "Release vX.Y.Z"
- Push to the directly release branch on the sunpy/ndcube repo (the version number branch).
git push upstream X.Y
- Check that Travis passes on release commit
- Check that AppVeyor passes on release commit
- Release on GitHub (tag should be full version number preceded by a
v
)
git checkout X.Y
git tag vX.Y.Z
git push --follow-tags upstream vX.Y.Z
- Check that RTD is building the documentation correctly and the version is correct. The version should appear automatically but may be have to set to "Active" manually.
- Release on PyPI:
# Make sdist
python setup.py sdist
# Upload Release
twine upload dist/ndcube-X.Y.Z.tar.gz
- Make a PR to the ndcube-feedstock repo with the updated recipe, i.e. updated version number and mda5sum. See https://github.com/conda-forge/sunpy-feedstock/pull/42/files as an example. Merge once CI is passed. To get the mda5sum, go to the ndcube page of the pypi website, click "download files". A table should appear with the package name/version, the file size, and the hash. The mda5sum is the hash.
On Release:
- Make sure all builds are complete (conda-forge, etc)
- Post release announcement on social media sites
- Send release announcement to mailing lists
Email Template
-----
Dear all,
The ndcube developers present to you the latest release of ndcube <version>.
In this update the headline fixes are <fill in>
The full changelog is:
<fill in>
To update you can run these following commands:
Pip users:
pip install -U ndcube
Conda Users:
conda update ndcube
GitHub Users:
git pull <local upstream name> <version>
Please enjoy,
The ndcube Developers