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. Go into mbtrack2 root folder. 2. Update readthedocs documentation
3. Run the isort formatter: `isort .` 3. Book a new zenodo DOI and update readme.md and __init__.py
4. Run the yapf formatter: `yapf -ir mbtrack2` 4. Update the pyproject.toml file with version number, new dependencies and so on.
5. Update the pyproject.toml file with version number, new dependencies and so on. 5. Update README.md
6. Update README.md 6. Run formatters and test inside poetry:
7. Run poetry: * `poetry env use python`
* `poetry env use python` * `poetry install`
* `poetry install` * Run the isort formatter: `poetry run isort .`
* Check that the tests run without errors: `poetry run pytest` * Run the yapf formatter: `poetry run yapf -ir mbtrack2`
* `poetry build` * Check that the tests run without errors: `poetry run pytest`
* Test build on test pypi: 7. If tests are ok then proceed with build:
* `poetry config repositories.test-pypi https://test.pypi.org/legacy/` * `poetry build`
* `poetry config http-basic.test-pypi __token__ api_token` * Test build on test pypi:
* `poetry publish -r test-pypi` * `poetry config repositories.test-pypi https://test.pypi.org/legacy/`
* Install in a clean virtual environment (e.g. google colab) to check that it is ok using: * `poetry config http-basic.test-pypi __token__ api_token`
* `pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple mbtrack2` * `poetry publish -r test-pypi`
8. Merge to stable with a new tag and changelog. * Install in a clean virtual environment (e.g. google colab) to check that it is ok using:
9. Publish on pypi: * `pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple mbtrack2`
* `poetry config http-basic.pypi __token__ api_token` 8. Merge to stable with a new tag, make a new release with the changelog.
* `poetry publish` 9. Publish on pypi:
\ No newline at end of file * `poetry config http-basic.pypi __token__ api_token`
* `poetry publish`
10. Add zip archive of stable to zenodo
\ No newline at end of file