diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2c812317da35c2c4bb3a70ae088c867cfa87b844..4dbc29b99e3bba925e6146bbefbdbbde3e3234ef 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,5 +1,13 @@ # Contribute guide +## Development workflow +Create and push a feature or bugfix release out of the `main` branch. +Name this branch after the ticket number `###`. +Open a merge out of this branch to the `main` branch: +```bash +main <- ###_feature_branch +``` + ## Pre-commit We are using [`pre-commit`](https://pre-commit.com/) tool to perform checks on staged changes before committing. We are using it for `black` formatting, `isort` imports sorting, `pylint` code linting, `mypy` typing, and `gitlab-ci` linting. @@ -56,10 +64,10 @@ Follow [this documentation](https://github.com/Lucas-C/pre-commit-hooks#removing Only difference is to update the year in `license_header.txt` rather than `LICENSE.txt`. ## Release workflow -To handle a release, you have to respect this workflow: +To handle a release, you have to follow this workflow: -* Verify all features and bug fixes are merged in the `dev` branch. -* Checkout on the `dev` branch +* Verify all features and bug fixes are merged in the `main` branch. +* Checkout on the `main` branch * Update the `CHANGELOG.md` file and commit * Run the `release.sh` script with the version semantic number as argument: @@ -67,6 +75,6 @@ To handle a release, you have to respect this workflow: ./release.sh 0.50.0 ``` -* A new commit is added with the version number and a tag in git. -* Merge all new commits from `dev` to `master` on GitLab with a merge request. -* Release on PyPI from the GitLab pipeline manual job of the `master` branch. +* Create a MR containing the changelog and the commit updating the version +* Once the MR is merged to `main`, push the tag with `git push --tags` +* To release to PyPI, the pipeline based on the tag should be used by triggerring the manual job on the `main` branch