Repository navigation
docs: complete metadata, citation, troubleshooting and accuracy docs - #1302
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1302 +/- ##
=======================================
Coverage 93.66% 93.66%
=======================================
Files 50 50
Lines 5591 5591
=======================================
Hits 5237 5237
Misses 354 354 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
a3148a3 to
ef78901
Compare
Verdict: 🔧 Request changes (rebase + a few fixes)This is a large and mostly careful docs overhaul. The facts I spot-checked against the code hold up: the log strings, the 475 g world average, the PUE placement, the cubic/linear cpu_load models, and the unrounded coordinates in the CSV. I also recomputed the accuracy-table deviations from the committed profiling CSVs, and they match. Thanks! Must fix:
Should split out, or call out explicitly:
Your own open items still stand: the CITATION author list, the unverified Khan et al. and Henderson citations, and the external link check. Nits:
|
|
Made the changes in 1289626: merged master, fixed CITATION version, release-drafter from pyproject, OG URLs, powermetrics link, accuracy range, restored equivalents; reverted the non-docs changes and refreshed the PR description. |
Squashed rebase of PR #1302 (docs/traction-batch) onto current master. Conflicts resolved: - docs/how-to/contributing.md: master's new "Webapp" deployment section moved to docs/maintaining.md, following the contributing split. - docs/explanation/methodology.md: master's "Regional data" section (US eGRID, Canada, Nordics, China) kept alongside the new resolution ladder. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JfRKgUd281URY6fMyNAQmh
101c5ad to
5e147ef
Compare
This branch is now rebased on master (e159a68) and force-pushed: the new head is 5e147ef. Why the Rebase
Fixes from checking the docs against master (one commit each)
Validation
Left for maintainers
Generated by Claude Code |
benoit-cty
left a comment
There was a problem hiding this comment.
Huge improvements, thanks !
Squashed rebase of PR #1302 (docs/traction-batch) onto current master. Conflicts resolved: - docs/how-to/contributing.md: master's new "Webapp" deployment section moved to docs/maintaining.md, following the contributing split. - docs/explanation/methodology.md: master's "Regional data" section (US eGRID, Canada, Nordics, China) kept alongside the new resolution ladder. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JfRKgUd281URY6fMyNAQmh
- Add the Raspberry Pi 5 PMIC backend (CPU and DRAM) to the CPU selection table and the component table; renumber the rows. - Add China to the regional carbon-intensity level. - A cloud region missing from impact.csv falls back to the full private-infrastructure ladder, not only the country value. - Machine-mode cpu_load reads psutil.cpu_times() deltas (SystemCPULoadMeter), not psutil.cpu_percent(). - Replace file:line citations, most already stale after the rebase, with function names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JfRKgUd281URY6fMyNAQmh
An undetected CPU gets the generic 85 W POWER_CONSTANT, not the per-thread default. The unknown-CPU warning now says "help us add it" rather than asking to contact the project. Replace a stale resource_tracker.py line range with the function name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JfRKgUd281URY6fMyNAQmh
Since v3.3.1 _do_measurements scales power as well as energy by PUE, as the existing note on this page says; the new provenance table and PUE note claimed the opposite. Also note the Raspberry Pi 5 PMIC as a measured CPU and RAM source, the GPU power-sampling fallback, and replace stale file:line references with function names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JfRKgUd281URY6fMyNAQmh
The per-thread default is a TDP fed to the same cpu_load curve, not an estimate from thread count alone, and an undetected CPU gets 85 W. powermetrics only runs on Apple Silicon without psutil. The E3-1240 v2 overshoot is from the machine-mode (cubic) curve, not a linear one. print_hardware.py reports the backend through its startup log. Drop file:line citations and fix a garbled sentence. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JfRKgUd281URY6fMyNAQmh
Master released 3.3.2 after this branch last synced. bumpver now
patterns these lines with '^version: {version}$', so a stale 3.3.1
would make the next 'bumpver update' fail. date-released follows the
v3.3.2 tag (2026-10-23). Checked with 'bumpver update --dry --patch'.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JfRKgUd281URY6fMyNAQmh
The accuracy sentence was inserted between two bullets of the benefits list in enable-rapl.md, splitting it; move it after the list. Replace a stale cpu.py line range in rapl.md with IntelRAPL._select_domains_to_use. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JfRKgUd281URY6fMyNAQmh
docs/how-to/examples.md deliberately no longer duplicates the table. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JfRKgUd281URY6fMyNAQmh
b6fd840 to
c834772
Compare
Description
This PR completes twelve documentation and traction items: packaging/citation metadata, a rewritten examples index and RAPL guide, a new troubleshooting page, new accuracy and alternatives pages with a real bibliography, GitHub issue forms, a split contributing/development/maintaining doc set, a deprecations reference, and social-card/footer polish. Details are broken out by area below.
The non-docs parts (PyPI classifiers, the RAPL/CPU-model warning refactor, a docstring fix, Release Drafter wiring, and their tests) moved to #1431 at the maintainer's request, to keep this PR documentation-only.
Related Issue
Fixes #1301. Closes #1422.
Motivation and Context
The docs had drifted from the codebase: the examples index referenced symbols that no longer exist (
CO2Tracker,@track_co2), citation metadata pinned an old release instead of tracking the latest one, there was no troubleshooting page tied to actual log lines, and accuracy/competitor claims were unsupported or unverified. This closes those gaps so the docs and issue templates match what the project actually does.How Has This Been Tested?
uv run task docsbuilds clean and the internal link check passes.uv run bumpver update --dry --patchruns cleanly against the version references inCITATION.cff,README.md, andcodecarbon/_version.py. Ruff error count is unchanged from master.Screenshots (if appropriate):
N/A
What is in here
Packaging and citation
pyproject.toml:bumpvernow also patternsCITATION.cffandREADME.mdso their version strings stay in sync at release time. (PyPIdescription/keywords/classifiersmoved to chore: PyPI metadata, docs links in warnings, release-drafter versioning #1431.)CITATION.cffand a rewritten README citation section using the Zenodo concept DOI10.5281/zenodo.4658424, which tracks the latest release instead of pinning v2.4.1.docs/index.mdcitation link updated to the same DOI.Discoverability
examples/README.mdrewritten as a categorised index, checked againstls examples/andcodecarbon/__init__.py. The duplicated table indocs/how-to/examples.mdis gone; that page now points at the canonical index.docs/how-to/troubleshooting.md, keyed to log lines grepped out of the current source. Note: the RAPL-permission/unknown-CPU-model warning code incpu.pythat links to this page's anchors is in chore: PyPI metadata, docs links in warnings, release-drafter versioning #1431; those anchors need this PR merged for the links to resolve.Supporting our claims
docs/explanation/alternatives.mdanddocs/explanation/accuracy.md. Accuracy figures are computed from CSVs already committed in this repo (codecarbon/data/hardware/cpu_load_profiling/); the TDP estimate deviates from RAPL by roughly -60% to +190% depending on CPU and load. Per-backend accuracy and wall-socket validation are marked "not yet measured". Competitor facts were pulled from the GitHub API; "peer-reviewed" softened to "accompanying academic paper" where the venue was not verified.methodology.mdgains a bibliography; the personal blog post is demoted behind Khan et al. and Weaver; the open GitHub issue is relabelled as a tracked limitation.Contribution and release surface
.mdtemplates; the bug form requirescodecarbon detectoutput.contributing.mdsplit into a 95-line contributor page,how-to/development.md, andmaintaining.md.docs/reference/deprecations.md.overrides/main.html, five footer links, andstart()/stop()/flush()/task-tracking now rendering in the API reference.Worth a maintainer's eye before merge
CITATION.cffauthor list: names come from the existing README BibTeX. Entries that are only a GitHub handle with no real name on the profile are dropped; every real name is kept (Amine Saboni and Franklin Zhao were restored after review). A collective "The CodeCarbon contributors" entry is added.21(248).scripts/check_docs_links.py site --externalrun.date-releasedinCITATION.cffstill needs a manual touch at release time; bumpver only patterns the version line.Types of changes
Docs/refactor only.
AI Usage Disclosure
Checklist: