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 .`
* Run the yapf formatter: `poetry run yapf -ir mbtrack2`
* 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:
* `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/`
...@@ -17,7 +19,8 @@ Here is the checklist to run before releasing a new version for mbtrack2: ...@@ -17,7 +19,8 @@ Here is the checklist to run before releasing a new version for mbtrack2:
* `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 and 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
\ No newline at end of file