diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 32fd41a87a175436a122b2fbe82f13cd7dbbe210..2203ece078750834959be008fda33647e0831f89 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,5 @@ image: quantumtinkerer/research + test: script: - pip install -r test-requirements.txt @@ -7,3 +8,9 @@ test: artifacts: paths: - htmlcov + +authors check: + script: + - MISSING_AUTHORS=$(git shortlog -s HEAD | sed -e "s/^[0-9\t ]*//"| xargs -i sh -c 'grep -q "{}" AUTHORS.md || echo "{} missing from authors"') + - if [ ! -z "$MISSING_AUTHORS" ]; then { echo $MISSING_AUTHORS; exit 1; }; fi + allow_failure: true diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000000000000000000000000000000000000..ce5c8fe1154eed86610e93707a5e7d5a57fd5391 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,74 @@ +# Making a Adaptive release + +This document guides a contributor through creating a release of Adaptive. + + +## Preflight checks + +The following checks should be made *before* tagging the release. + + +#### Check that all issues are resolved + +Check that all the issues and merge requests for the appropriate +[milestone](https://gitlab.kwant-project.org/qt/adaptive/issues) +have been resolved. Any unresolved issues should have their milestone +bumped. + + +#### Ensure that all tests pass + +For major and minor releases we will be tagging the ``master`` branch. +This should be as simple as verifying that the +[latest CI pipeline](https://gitlab.kwant-project.org/qt/adaptive/pipelines) +succeeded. + + +#### Verify that `AUTHORS.md` is up-to-date + +The following command shows the number of commits per author since the last +annotated tag: +``` +t=$(git describe --abbrev=0); echo Commits since $t; git shortlog -s $t.. +``` + +## Make a release, but do not publish it yet + + +### Tag the release + +Make an **annotated, signed** tag for the release. The tag must have the name: +``` +git tag -s v<version> -m "version <version>" +``` + + +### Build a source tarball and wheels and test it + +``` +rm -fr build dist +python setup.py sdist bdist_wheel +``` + +This creates the file `dist/adaptive-<version>.tar.gz`. It is a good idea to unpack it +and check that the tests run: +``` +tar xzf dist/adaptive*.tar.gz +cd adaptive-* +py.test . +``` + +## Upload to PyPI + +``` +twine upload dist/* +``` + + +## Update the [conda-forge recipe](https://github.com/conda-forge/adaptive-feedstock) + +* Fork the [feedstock repo](https://github.com/conda-forge/adaptive-feedstock) +* Change the version number and sha256 in `recipe/meta.yaml` and commit to your fork +* Open a [Pull Request](https://github.com/conda-forge/adaptive-feedstock/compare) +* Type `@conda-forge-admin, please rerender` as a comment +* When the tests succeed, merge