docs: complete metadata, citation, troubleshooting and accuracy docs - #1302
davidberenstein1957 wants to merge 3 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1302 +/- ##
==========================================
+ Coverage 91.70% 92.03% +0.33%
==========================================
Files 49 49
Lines 5157 5158 +1
==========================================
+ Hits 4729 4747 +18
+ Misses 428 411 -17 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
A batch of documentation and project-metadata work, squashed into one commit. New material: a troubleshooting guide, an accuracy page, an alternatives comparison, a development guide split out of the overflowing contributing page, a maintainers guide, a deprecations reference, `CITATION.cff`, an OpenGraph card, and a structured issue-template form replacing the freeform feature request. Corrections against the code rather than against the old prose: stale psys claims in `rapl.md`, the estimation-chain reference, both `cpu_load` power models, `force_cpu_power`, the real RAPL option names, the `cpu_load` provenance row and field order, AMDSMI credited alongside NVML in the source table, and the opening formula reconciled with PUE. AMD multi-die summing is flagged as an open question (#1379) instead of asserted. Output fields gain a provenance column so each one says where its number comes from. Removals: the blog surface (the website already has one) and `CHANGELOG.md`, with releases pointed at GitHub; redundant pages and prose; the black and ruff version pins, keeping the black target. Also covered: tests for the RAPL permission help, the task decorator, and README links (skipped when the file is absent), plus a note recording why the API token lookup value is SHA-256. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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:
|
# Conflicts: # docs/explanation/methodology.md # docs/explanation/rapl.md # docs/how-to/contributing.md # uv.lock
- Merge master: keep the RAPL mirror-dedup docs, move Conda-Forge publishing docs into maintaining.md, restore the equivalent-usage sources (car, TV, US citizen) in methodology.md. - CITATION.cff/README citation at 3.3.1 so bumpver matches again. - Release Drafter takes the version from pyproject.toml's bumpver current_version; drop the label-based version-resolver. - OG image/url point at the deployed /latest/ path. - powermetrics sudoers link points at troubleshooting#macos. - Accuracy/FAQ range widened to -60%..+190% to match the table. - Revert non-docs changes (api_key_utils, black target pin, blank_issues_enabled) for separate PRs. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
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. |
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.
Related Issue
Fixes #1301
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, package metadata, 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 (5246 attributes).tests/test_cpu.py,tests/test_emissions_tracker.pyand the newtests/test_readme_links.pypass (76 passed, 2 skipped). Ruff error count is unchanged from master.Screenshots (if appropriate):
N/A
What is in here
Packaging and citation
pyproject.toml:description, 15keywords, 19classifiers.bumpveralso patternsCITATION.cff.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. Newtests/test_readme_links.pyasserts relative links resolve.docs/how-to/troubleshooting.md, keyed to log lines grepped out of the current source.cpu.pynow appends a docs URL to the RAPL-permission and unknown-CPU warnings via one shared constant.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. Release Drafter now takes the release number from[tool.bumpver] current_versioninpyproject.toml.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 with unresolved handles dropped, plus a collective "The CodeCarbon contributors" entry; this is a social decision, not a technical one.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/test only.
AI Usage Disclosure
Checklist: