Skip to content

docs(contrib): overhaul CONTRIBUTING.md accuracy and completeness#3409

Open
Borda wants to merge 5 commits into
masterfrom
docs/contrib
Open

docs(contrib): overhaul CONTRIBUTING.md accuracy and completeness#3409
Borda wants to merge 5 commits into
masterfrom
docs/contrib

Conversation

@Borda

@Borda Borda commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?

  • Add metric implementation checklist: functional helpers, module class, task-triple pattern, exports, optional-dep guard, MetricTester
  • Fix dev install command (was missing -e . and used wrong requirements file)
  • Fix test commands to match src layout (two-step cd src/cd tests instead of single broken invocation)
  • Add DDP test invocation (USE_PYTEST_POOL) and MetricTester explanation
  • Fix Python version: 3.7 + PL reference → 3.10+ required
  • Fix docstring example: Return → Returns, Optional[float] → float | None, drop unused typing import
  • Fix docs path: _docs/build/html → docs/build/html, consolidate duplicate paragraph
  • Replace stale PR add Matthews corrcoef #98 link with implement.html guide
Before submitting
  • Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?
PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

- Add metric implementation checklist: functional helpers, module class, task-triple pattern, exports, optional-dep guard, MetricTester
- Fix dev install command (was missing `-e .` and used wrong requirements file)
- Fix test commands to match src layout (two-step cd src/cd tests instead of single broken invocation)
- Add DDP test invocation (USE_PYTEST_POOL) and MetricTester explanation
- Fix Python version: 3.7 + PL reference → 3.10+ required
- Fix docstring example: Return → Returns, Optional[float] → float | None, drop unused typing import
- Fix docs path: _docs/build/html → docs/build/html, consolidate duplicate paragraph
- Replace stale PR #98 link with implement.html guide
- Fix typo: "How to we" → "How do we"

---
Co-authored-by: Claude Code <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 7, 2026 15:51
@Borda Borda added bug / fix Something isn't working enhancement New feature or request labels Jun 7, 2026

Copilot AI 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.

Pull request overview

This PR updates .github/CONTRIBUTING.md to better reflect the current TorchMetrics development workflow, especially around implementing new metrics, setting up a dev environment, and running tests/docs locally.

Changes:

  • Replaces a stale “example PR” link with the official “implementing a metric” guide and adds a metric implementation checklist.
  • Updates developer setup and testing instructions (editable install with dev requirements; includes DDP test invocation and MetricTester notes).
  • Refreshes documentation guidance and style examples (Python 3.10+ typing syntax, docstring section naming, and HTML build inspection instructions).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/CONTRIBUTING.md Outdated
Comment thread .github/CONTRIBUTING.md Outdated
Comment thread .github/CONTRIBUTING.md Outdated
Borda and others added 3 commits June 7, 2026 09:59
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@Borda Borda enabled auto-merge (squash) June 11, 2026 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug / fix Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants