Update How to prepare the code for a release authored by Alexis GAMELIN's avatar Alexis GAMELIN
Here is the checklist to run before releasing a new version for mbtrack2: Here is the checklist to run before releasing a new version for mbtrack2:
1. Create a new local branch from the merge develop (with all the feature branch intended to be included in the new version). 1. Create a new local branch from the merge develop (with all the feature branch intended to be included in the new version).
2. Update .rst for the readthedocs documentation 2. Update .rst for the readthedocs documentation
3. Book a new zenodo DOI and update readme.md and __init__.py 3. Book a new zenodo DOI and update readme.md, CITATION.cff and **init**.py
4. Update the pyproject.toml file with version number, new dependencies and so on. 4. Update the pyproject.toml file with version number, new dependencies and so on.
5. Update README.md 5. Update README.md
6. Run formatters and test inside poetry: 6. Run formatters and test inside poetry:
* `poetry env use python` * `poetry env use python`
* `poetry install` * `poetry install`
* Run the isort formatter: `poetry run isort .` * Run the isort formatter: `poetry run isort .`
* Run the yapf formatter: `poetry run yapf -ir .` * Run the yapf formatter: `poetry run yapf -ir .`
* Check that the tests run without errors: `poetry run pytest` * Check that the tests run without errors: `poetry run pytest`
7. If tests are ok then proceed with build: 7. If tests are ok then proceed with build:
* `poetry build` * `poetry build`
* Test build on test pypi: * Test build on test pypi:
* `poetry config repositories.test-pypi https://test.pypi.org/legacy/` * `poetry config repositories.test-pypi https://test.pypi.org/legacy/`
* `poetry config http-basic.test-pypi __token__ api_token` * `poetry config http-basic.test-pypi __token__ api_token`
* `poetry publish -r test-pypi` * `poetry publish -r test-pypi`
* Install in a clean virtual environment (e.g. google colab) to check that it is ok using: * Install in a clean virtual environment (e.g. google colab) to check that it is ok using:
* `pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple mbtrack2` * `pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple mbtrack2`
8. Merge to stable with a new tag, make a new release with the changelog. 8. Merge to stable with a new tag, make a new release with the changelog.
9. Publish on pypi: 9. Publish on pypi:
* `poetry config http-basic.pypi __token__ api_token` * `poetry config http-basic.pypi __token__ api_token`
* `poetry publish` * `poetry publish`
10. Add zip archive of stable to zenodo 10. Add zip archive of stable to zenodo
11. Rebuild docs on the https://app.readthedocs.org/ website 11. Rebuild docs on the https://app.readthedocs.org/ website
\ No newline at end of file