chore: PyPI metadata, docs links in warnings, release-drafter versioning - #1431
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1431 +/- ##
==========================================
+ Coverage 91.69% 92.02% +0.33%
==========================================
Files 49 49
Lines 5152 5153 +1
==========================================
+ Hits 4724 4742 +18
+ Misses 428 411 -17 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
SaboniAmine
approved these changes
Sep 28, 2026
SaboniAmine
left a comment
Member
There was a problem hiding this comment.
LGTM! A quick ping to @inimaz to check if the version can be picked from a more reliable source but this should be OK
6 of 13 tasks
Address review on #1431: use codecarbon/_version.py as the single runtime version source instead of parsing pyproject.toml in CI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Split out of #1302 at the maintainer's request, to keep that PR documentation-only. This PR carries the non-docs changes from #1302: PyPI package metadata, the RAPL/CPU-model warning refactor with docs links, a signal-handler docstring and typo fix, Release Drafter version wiring, and the tests that cover the warning refactor.
Related Issue
Split from #1302. Part of #1301.
Motivation and Context
#1302 mixed documentation work with packaging metadata and source changes, which makes it harder to review as a docs-only change. This PR isolates the non-docs pieces so #1302 can merge as docs-only, and this one can be reviewed as a code/config change.
How Has This Been Tested?
uv run task test-packagepasses (all package tests green). Pre-commit hooks (autoflake, isort, black, flake8) pass on the full tree.uv run bumpver update --dry --patchruns cleanly against the files touched here.Screenshots (if appropriate):
N/A
What is in here
Packaging metadata (
pyproject.toml)description, 15keywords, and PyPIclassifiers(status, audience, OS, topic).[tool.bumpver.file_patterns]entries forCITATION.cffandREADME.mdstay in docs: complete metadata, citation, troubleshooting and accuracy docs #1302, since those files (and their version-line format) are only introduced/changed there; adding the patterns here without those files would breakbumpver update.Warning message refactor (
codecarbon/core/cpu.py,codecarbon/core/powermetrics.py)RAPL_PERMISSION_HELPconstant reused by the RAPL permission-denied warnings (was duplicated string literals).#rapl-permission-denied,#unknown-cpu-model), and the powermetrics sudo warning at#macosinstead of the old methodology anchor.docs/how-to/troubleshooting.mdmerges in docs: complete metadata, citation, troubleshooting and accuracy docs #1302; the links will 404 until that PR merges. Flagging this coupling rather than hiding it — sequencing (merge docs: complete metadata, citation, troubleshooting and accuracy docs #1302 first, or land this URL change after) is a maintainer call.codecarbon/emissions_tracker.pyservice_shutdown(usage example for registering as aSIGTERM/SIGINThandler).:param: tracker:→:param tracker:,:param: task_name:→:param task_name:) intrack_task_emissions.Tests
tests/test_rapl_permissions.py: two new tests covering the shared warning constant (warn-once behavior, unreadable-domain warning).tests/test_emissions_tracker.py: new test for thetrack_task_emissionsdecorator.tests/test_readme_links.py: new test guarding that relative links inexamples/README.mdresolve.CI/release (
.github/release-drafter.yml,.github/workflows/release-drafter.yml)[tool.bumpver] current_versioninpyproject.tomlinstead of auto-incrementing the patch version, and uses$RESOLVED_VERSIONin the name/tag templates.Types of changes
AI Usage Disclosure
Checklist:
Commits