Add contributing / coding-style docs page - #93
Merged
Conversation
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.
Contributor
Reviewer's GuideAdds 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
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- In the statistics-function conventions, the return-format section requires a MultiIndex with
locationandunitwhile the testing section requirescountryandunit; 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 takesnandaggregate_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.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Owner
Author
|
@sourcery-ai dismiss |
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.
Summary
docs/contributing.mdconsolidating: 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).Contributing: contributing.mdtomkdocs.ymlnav.[Contributing](contributing.md)link) resolves.Part 3 of 3 for #82.
Test plan
mkdocs buildsucceeds, nav renders, no dead internal links from this pagepixi 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:
Documentation: