docs: complete metadata, citation, troubleshooting and accuracy docs - #1302
Open
davidberenstein1957 wants to merge 9 commits into
Open
docs: complete metadata, citation, troubleshooting and accuracy docs#1302davidberenstein1957 wants to merge 9 commits into
davidberenstein1957 wants to merge 9 commits into
Conversation
Implements the twelve documentation and traction items tracked in updates/docs: - PyPI metadata: description, keywords, expanded classifiers - CITATION.cff plus an unpinned, DOI-based citation in the README - Rewritten examples/README.md indexing the real examples and APIs - New troubleshooting page keyed to actual log lines, linked from the README, FAQ, docs index and from RAPL warning strings in cpu.py - RAPL setup guide promoted out of "Deployment" to a top-level how-to - New alternatives comparison and accuracy/validation pages - Methodology bibliography built out; blog-post and open-issue citations demoted or replaced - GitHub issue forms that collect `codecarbon detect` output - Contributing guide split into contributor / development / maintainer pages, stray `</a>` in headings removed - CHANGELOG.md, changelog and deprecations reference pages, a blog surface, and release-drafter version resolution - Open Graph tags, footer links, and start()/stop() in the API reference Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1302 +/- ##
==========================================
+ Coverage 91.39% 91.77% +0.37%
==========================================
Files 49 49
Lines 5056 5057 +1
==========================================
+ Hits 4621 4641 +20
+ Misses 435 416 -19 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The changelog and deprecations reference pages stay; the release announcement post belongs on codecarbon.io, not in the docs site. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Move the changelog and the deprecations table into the root CHANGELOG.md, which GitHub renders, and drop the two reference pages. The `Changelog` project URL now points at the releases page, and the deprecation notices in the configuration and output docs link to the deprecations section of CHANGELOG.md. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Docs build and the internal link check pass on the new version. 0.0.53 still emits no Open Graph tags of its own, so the `overrides/main.html` template added in this branch stays necessary. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The wheel-validation job runs the test suite against an installed wheel without the rest of the repository, so `examples/README.md` does not exist there and the check failed with FileNotFoundError. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The changelog duplicated the GitHub releases page, which both pyproject files already declare as the canonical Changelog URL. Keeping it meant every PR needed a bullet in a file that only existed on one branch. The deprecations table was the one thing releases cannot carry, so it moves to docs/reference/deprecations.md and the two docs pages that linked into the changelog anchor now point there. Also pin black and ruff to the versions CI's pre-commit hooks use, and set black's target-version explicitly. The inferred target outran the interpreter, so black was skipping its AST safety check and local formatting runs rewrote ~120 files that CI considered clean. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
CodeQL reports py/weak-sensitive-data-hashing on generate_lookup_value. The value is a database index, not a credential: authentication is bcrypt against hashed_token, and the derivation cannot be changed because it is computed from plaintext tokens that are never stored. Write that down so the alert is not re-litigated, and correct get_api_key_hash's return annotation, which claimed str while returning bcrypt's bytes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
#1369 removes the taskipy black/ruff tasks entirely, which is the root-cause fix for the format drift: pinning a second toolchain to match pre-commit keeps two copies of the same version truth in sync by hand. Take the deletion there instead and leave these unpinned so the two branches do not conflict. [tool.black] target-version stays: the pre-commit black hook reads pyproject too, so that fix is orthogonal to #1369 and still wanted. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Closes #1301.
Implements all twelve documentation and traction items.
uv run task docsbuilds clean and the internal link check passes (5246 attributes);tests/test_cpu.py,test_emissions_tracker.pyand the new link test pass (76 passed, 2 skipped). Ruff error count is unchanged from master.What is in here
Packaging and citation
pyproject.toml:description, 15keywords, 19classifiers;ChangelogURL now points at the docs.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. Every filename checked againstls examples/, every symbol againstcodecarbon/__init__.py— noCO2Tracker, no@track_co2. 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 that were each grepped out of the current source.cpu.pynow appends a docs URL to the RAPL-permission and unknown-CPU warnings via one shared constant, so the three call sites cannot drift apart. The two linked anchors are pinned with explicit{ #... }ids.Supporting our claims
docs/explanation/alternatives.mdanddocs/explanation/accuracy.md. The accuracy figures are computed from CSVs already committed in this repo (codecarbon/data/hardware/cpu_load_profiling/) — the TDP estimate deviates from RAPL by up to roughly a factor of two in either direction depending on CPU and load. Per-backend accuracy and wall-socket validation are marked "not yet measured" rather than estimated. Competitor facts (licence, language, archive status) were pulled from the GitHub API; no maintenance judgements, and "peer-reviewed" softened to "accompanying academic paper" where the venue was not verified.methodology.mdgains a real bibliography (foundational work, hardware measurement, carbon-intensity sources, citing CodeCarbon). The personal blog post is demoted to a supporting walkthrough behind Khan et al. and Weaver; the open GitHub issue is relabelled as a tracked limitation, with Intel's own page cited for the Power Gadget discontinuation.Contribution and release surface
.mdtemplates. The bug form requirescodecarbon detectoutput (command verified to exist);config.ymldisables blank issues and links Discord, troubleshooting, FAQ and docs.contributing.mdsplit into a 95-line contributor page,how-to/development.md, andmaintaining.md. Nothing dropped — content moved. The stray</a>in four headings and the hand-maintained TOC markers are gone.CHANGELOG.mdat the repo root, holding both the user-facing changelog and the deprecations/migrations table; theChangelogproject URL points at the GitHub releases page. No changelog or deprecations page in the docs site, and no blog surface — codecarbon.io already has one. Entries are sourced fromgh release viewbodies andgit log; deprecation "since" versions fromgit log -Splusgit tag --contains.release-drafter.ymlnow resolves the version instead of always bumping the patch.overrides/main.html(Zensical emits none, and supportscustom_dir— no Cairo dependency, no workflow change), five footer links, andstart()/stop()/flush()/task-tracking now rendering in the API reference. Two malformed:param:directives intrack_task_emissionsfixed, since griffe now publishes them.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 — please confirm.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.maintaining.mdshould gain a "move Unreleased under the new version" step; the changelog page is otherwise a manual artefact.🤖 Generated with Claude Code