Skip to content

Add contributing / coding-style docs page - #93

Merged
maxnutz merged 4 commits into
mainfrom
82-add-contributing-docs
Jul 9, 2026
Merged

Add contributing / coding-style docs page#93
maxnutz merged 4 commits into
mainfrom
82-add-contributing-docs

Conversation

@maxnutz

@maxnutz maxnutz commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • New docs/contributing.md consolidating: project context, code style (Python >= 3.12, type hints, NumPy docstrings, black), the statistics-function/utils.py independence rule, naming convention, fixed function signature, return-format rules, the mapping-file lookup mechanism, testing rules, and the contribution workflow (issue first, branch, PR checklist, assign @maxnutz).
  • Added Contributing: contributing.md to mkdocs.yml nav.
  • README stays as-is (additive docs page, not a replacement).
  • Closes out part 3 of 3 for fill documentation with life and style #82 — once this merges the temporary broken-link warning introduced in Document the Scenario Explorer on the docs landing page #92 (docs/index.md's [Contributing](contributing.md) link) resolves.

Part 3 of 3 for #82.

Test plan

  • mkdocs build succeeds, nav renders, no dead internal links from this page
  • pixi run test — 201 passed

🤖 Generated with Claude Code

Summary by Sourcery

Document contributing guidelines and coding style and expose the new page in the documentation navigation.

Enhancements:

  • Include the Contributing page in the MkDocs navigation to integrate it into the published documentation.

Documentation:

  • Add a dedicated Contributing page detailing project context, code style, statistics-function architecture, conventions, testing rules, and contribution workflow.

Consolidate the participation and coding-style guidelines that
previously only lived in CLAUDE.md (agent-facing) and README into a
human-facing docs/contributing.md page, so contributors have a single
place to read naming conventions, function architecture rules,
testing rules, and the contribution workflow.
@sourcery-ai

sourcery-ai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Adds a dedicated contributing guide to the documentation and wires it into MkDocs navigation, clarifying coding style, statistics function architecture and conventions, mapping configuration, testing rules, and the contribution workflow.

File-Level Changes

Change Details Files
Add a dedicated contributing documentation page that describes project context, coding style, architecture rules for statistics functions and helpers, mapping-file usage, testing expectations, and the contribution workflow.
  • Create a new Markdown document describing project context and high-level purpose of the package.
  • Specify Python version, required type hints, NumPy-style docstrings, and black-based formatting requirements.
  • Document independence rules between statistics functions and helpers, fixed function signature and naming convention derived from IAMC variable names.
  • Describe return-type requirements and index structure for statistics functions and their tests.
  • Outline mapping configuration used by the runtime lookup mechanism and the expected developer workflow for issues, branches, tests, and PRs.
docs/contributing.md
Expose the new contributing page in the documentation site navigation.
  • Add a Contributing entry to the MkDocs navigation configuration under the documentation section.
  • Ensure the previously broken link to the contributing page now resolves by pointing to the new document.
mkdocs.yml

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • In the statistics-function conventions, the return-format section requires a MultiIndex with location and unit while the testing section requires country and unit; align these terms or explicitly explain the difference to avoid confusion.
  • The "Fixed signature" example shows an extra <config: dict> parameter even though the bullets say every function only takes n and aggregate_per_year; rephrase this section to clearly distinguish the mandatory parameters from optional ones with concrete examples.
  • The testing section says to add or update tests only when behavior changes, but the contribution workflow step 4 always asks for tests to be added/updated; clarify when tests are expected (e.g., new variables vs refactors) so the guidance is consistent.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In the statistics-function conventions, the return-format section requires a MultiIndex with `location` and `unit` while the testing section requires `country` and `unit`; align these terms or explicitly explain the difference to avoid confusion.
- The "Fixed signature" example shows an extra `<config: dict>` parameter even though the bullets say every function only takes `n` and `aggregate_per_year`; rephrase this section to clearly distinguish the mandatory parameters from optional ones with concrete examples.
- The testing section says to add or update tests only when behavior changes, but the contribution workflow step 4 always asks for tests to be added/updated; clarify when tests are expected (e.g., new variables vs refactors) so the guidance is consistent.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@maxnutz

maxnutz commented Jul 9, 2026

Copy link
Copy Markdown
Owner Author

@sourcery-ai dismiss

@maxnutz
maxnutz merged commit faa04ce into main Jul 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant