From 579bb3669bb5214177d85cdefe9566871f0e59cd Mon Sep 17 00:00:00 2001 From: Diego OJ Date: Sun, 15 Nov 2026 16:49:48 -0300 Subject: [PATCH] Docs | README: release labels from PR titles, RC version format, CI checks - Release Process: labels come from the PR title prefix, 'major' is added by hand, Dependabot PRs count as a patch, and the draft updates on every merge to master (release-drafter v7, #373, #379). - Release Candidate Process: the workflow's real name, and the 9.9.9-rc9 version format the workflow now enforces (#380). - Running Tests: pytest comes with the Poetry dev dependencies, not dev-requirements.txt; CI also runs mypy, ruff and a 75% coverage floor. - PR template: a note on the title prefixes. Co-Authored-By: Claude Opus 5.5 --- .github/PULL_REQUEST_TEMPLATE.md | 3 +++ README.md | 26 ++++++++++++++++++-------- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 362d11b9..83d33615 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,3 +1,6 @@ + + ## What? * Describe high-level what changed as a result of these commits (i.e. in plain-english, what do these changes mean?) * Use bullet points to be concise and to the point. diff --git a/README.md b/README.md index 8ec57437..a0550e64 100644 --- a/README.md +++ b/README.md @@ -183,8 +183,7 @@ poetry run pre-commit install ## Running Tests -To run unit tests, pytest is the tool of choice, and the required dependencies are available in the -corresponding `dev-requirements.txt`. +To run unit tests, pytest is the tool of choice. It comes with the dev dependencies (`poetry install --with=dev`). Integration tests are implemented using [bats](https://github.com/bats-core/bats-core/). They drive the installed `leverage` command, and work on temporary directories of their own, so they can be run directly on your machine. @@ -222,19 +221,30 @@ BATS_LIB_PATH=/opt/homebrew/lib bats -r tests/bats Alternatively, `make tests` runs both suites, and `make test-unit` or `make test-int` runs one of them. +Besides the tests, CI type checks `leverage/` with mypy (`poetry run mypy`), lints with ruff (`poetry run ruff check .`) +and fails when unit test coverage drops below 75% (`make test-unit` reports it). + ## Release Process -* On every PR, a Github Action workflow is triggered to create/update a release draft. -* The version number is determined by the labels of those PRs (major, minor, fix). +* Every PR gets labels from its title prefix: + * `Fix |`, `fix:`, `Bug`, `Hotfix` → `fix` + `patch` + * `Feat`, `Feature`, `Enhancement` → `enhancement` + `minor` + * `Docs` → `documentation` + `patch` + * `Chore` → `maintenance` + `patch` +* Add `major` (or `breaking`) by hand to a PR that breaks compatibility; the title never sets it. +* Dependabot PRs are labeled `dependencies` and count as a patch. +* Every merge to `master` updates the release draft: its notes, grouped by label, and its version, the highest bump + among the merged PRs. * The release draft has to be manually published. This allows for any number of PR (features, fixes) to make the cut. * Once a release is published, another workflow is triggered to create and push the package to PyPi. ## Release Candidate Process -* There is an Action called "Test Build Package and Push". -* This Action can be called manually on any branch specifying the version to release to test. - * The version is a Release Candidate following the Semver: e.g. if the next release is 1.2.3, the test version - should be 1.2.3rc.1 +* There is a workflow called "Release | PyPi Build Test Package and Push". +* It can be run manually on any branch, optionally specifying the version to publish. + * The version is a Release Candidate with the format `9.9.9-rc9`: e.g. if the next release is 1.2.3, the test + version should be `1.2.3-rc1`. Any other format is rejected. + * Without a version, the next patch of the latest version on PyPI is used, as `rc1`. * The package will be published to [PyPi](https://pypi.org/project/leverage/). ## Contributors/Contributing