This document describes the release methodology, criteria, and checklist for this repository. It applies to all Core packages in the Grid2Op ecosystem (grid2op, lightsim2grid, pypowsybl2grid).
This project follows Semantic Versioning (major.minor.patch):
- MAJOR — incompatible API changes.
- MINOR — new backward-compatible functionality.
- PATCH — backward-compatible bug fixes.
Releases are made on a rolling/ad hoc basis, as agreed upon by the committers based on the readiness of features and fixes. There is no fixed cadence.
Before tagging a release, the release manager must verify the following:
- All CI checks pass on the target release branch (
dev_X.Y.Z). - No open issues tagged
release-blocker. - All deprecation warnings introduced in this cycle are documented.
- SCA scan passes with no unaddressed critical or high-severity findings (see Software Composition Analysis below).
-
CHANGELOG.rsthas a complete entry for this version (features, fixes, breaking changes, deprecations). - Public API documentation is up to date.
- Version number is updated in
pyproject.toml(andsetup.py/CMakeLists.txtif applicable).
- A release PR merges
dev_X.Y.Zintomaster. - The release commit is tagged
vX.Y.Zand the tag is signed.
python -m build # produces sdist + wheel in dist/
twine check dist/* # verify metadata before upload
twine upload dist/* # upload to PyPIBinary wheels are built via the CI/CD pipeline (GitHub Actions + cibuildwheel)
for all supported platforms and Python versions before upload. Do not upload
manually built wheels.
Requirement: When the project makes a release, all compiled released software assets MUST be delivered with a Software Bill of Materials (SBOM). [OSPS-QA-02.02]
It is recommended to auto-generate SBOMs at build time using a tool that has been vetted for accuracy. This enables users to ingest this data in a standardized approach alongside other projects in their environment.
An SBOM is a machine-readable inventory of every component bundled in a release artifact — direct and transitive dependencies, their versions, and their licenses.
grid2op (pure Python): generating an SBOM is good practice and satisfies the spirit of the requirement, even though the wheel contains no compiled code.
lightsim2grid / pypowsybl2grid (compiled wheels): the requirement applies directly. Each release must ship an SBOM alongside the binary wheels, because the compiled artifacts bundle vendored C++ libraries (Eigen, SuiteSparse/KLU, CKTSO, etc.) that are otherwise invisible to downstream users.
Use CycloneDX JSON (application/vnd.cyclonedx+json) or SPDX. Both
are widely supported by dependency-scanning tooling.
Add the following step to the release workflow, after the build step and before the upload step:
- name: Generate SBOM
run: |
pip install cyclonedx-bom
# Captures the full Python environment (all installed deps)
cyclonedx-py environment --output-format json --outfile sbom.cdx.json
- name: Attach SBOM to GitHub Release
uses: softprops/action-gh-release@v2
with:
files: sbom.cdx.jsonFor lightsim2grid, the Python-level SBOM will not capture the vendored C++ libraries. Supplement it by either:
- Running
syfton the built wheel file:- uses: anchore/sbom-action@v0 with: path: dist/ format: cyclonedx-json output-file: sbom.cdx.json
- Or maintaining a hand-written
sbom-cpp-deps.cdx.jsonthat lists Eigen, SuiteSparse, KLU, and CKTSO with their pinned versions, and merging it into the final SBOM.
Attach sbom.cdx.json as a release asset on the GitHub Release page,
alongside the wheels and the source archive. Name it clearly, e.g.
lightsim2grid-0.13.1-sbom.cdx.json.
Requirement: While active, the project documentation MUST include a policy to address SCA violations prior to any release. [OSPS-VM-05.02]
No Core package may be released if any dependency has an unaddressed critical or high-severity vulnerability (CVSS ≥ 7.0) known at the time of release. Medium and low findings must be triaged and either remediated or explicitly accepted with a written rationale before the release is tagged.
An exception may be granted by a TSC majority vote when no fix is available
upstream and the vulnerability is determined to be unexploitable in the
project's use context. Exceptions must be recorded in a security-exceptions
section of the repository's SECURITY.md, with the CVE identifier, the
rationale, and an agreed review date.
grid2op (pure Python): the SCA scan covers all direct and transitive Python dependencies as resolved in the release environment.
lightsim2grid / pypowsybl2grid (compiled wheels): the scan covers Python
dependencies and the vendored C++ libraries (Eigen, SuiteSparse/KLU,
CKTSO, etc.). Because pip-audit does not reach compiled vendored code, the
C++ dependency list must be reviewed manually against the
OSV database or equivalent prior to each release.
Use pip-audit for Python dependencies:
pip install pip-audit
pip-audit --strict # exits non-zero on any finding--strict treats findings as errors. Use --ignore-vuln <ID> only for
vulnerabilities covered by an accepted exception in SECURITY.md.
Add a required status check to the release workflow, before the build step:
- name: SCA — Python dependencies
run: |
pip install pip-audit
pip-audit --strictFor lightsim2grid, add a manual review step as a checklist item (see below) since tooling cannot automatically scan vendored C++ libraries.
Mark this job as a required status check in the branch protection rules for
master so that the release PR cannot be merged if it fails.
The following items are appended to the pre-release checklist above:
-
pip-audit --strictpasses on the release environment with no unaddressed findings. - (lightsim2grid / pypowsybl2grid only) Vendored C++ libraries (Eigen,
SuiteSparse/KLU, CKTSO) reviewed against OSV or NVD; findings recorded
or accepted in
SECURITY.md. - Any accepted exceptions in
SECURITY.mdhave been reviewed and are still valid for this release.
- GitHub Release page created with the correct tag, release notes (copied
from
CHANGELOG.rst), and SBOM asset attached. - PyPI page reflects the new version.
- Announcement posted to the Grid2Op mailing list and Discord.
-
dev_X.Y.(Z+1)(ordev_X.(Y+1).0) branch opened for the next cycle. - check the doc is updated in https://app.readthedocs.org and trigger the build of the dev branch
- add the new dev branch to codacy (app.codacy.com)