-
Notifications
You must be signed in to change notification settings - Fork 128
feat: add contribution guidelines #386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+115
−14
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| # Contributing to model2vec | ||
|
|
||
| Thanks for your interest in model2vec. This document explains how contributions work and what we expect. | ||
|
|
||
| ## tl;dr | ||
|
|
||
| - **Every PR must link to an existing issue.** Open an issue to discuss before writing code, then link it from your PR (e.g. `Closes #123`). | ||
| - **AI-generated PRs** will be closed without review if they weren't discussed beforehand. | ||
|
|
||
| --- | ||
|
|
||
| ## Discuss before building | ||
|
|
||
| Our libraries are small and focused by design. We care a lot about keeping it that way. Before you invest time writing code, please open an issue describing: | ||
|
|
||
| - What problem you're solving | ||
| - Why it belongs in model2vec (as opposed to a wrapper or separate tool) | ||
| - What API or behaviour change it would involve, if any | ||
| - A minimal (code) example of how it would work | ||
|
|
||
| This applies to small PRs (e.g. bug fixes and documentation updates) as well. A quick issue lets us confirm the fix is wanted and aligned with how we'd want to solve it, so you don't waste time on a PR we'd need to reject or rework. | ||
|
|
||
| **PRs without a linked issue will be closed.** | ||
|
|
||
| ## What we generally welcome | ||
|
|
||
| - Bug fixes (with a linked issue and a test that reproduces the issue) | ||
| - Documentation improvements and example fixes (with a linked issue) | ||
|
|
||
| ## What we generally won't accept | ||
|
|
||
| - Large new features that haven't been discussed | ||
| - Features that significantly expand the scope of the library | ||
| - Dependency additions | ||
| - AI-generated code dumps with no context or discussion | ||
|
|
||
| ## Opening a good issue | ||
|
|
||
| If you found a bug, include: | ||
| - model2vec version | ||
| - Python version | ||
| - A minimal reproducible example | ||
| - What you expected vs. what happened | ||
|
|
||
| If you want a feature, include the things listed under "Discuss before building" above. | ||
|
|
||
| ## Pull request checklist | ||
|
|
||
| Before opening a PR: | ||
|
|
||
| - [ ] Link to an existing issue (e.g. `Closes #123`). PRs without one will be closed | ||
| - [ ] Run `make test` and confirm all tests pass | ||
| - [ ] Run `make lint` and `make typecheck` | ||
| - [ ] Run `make fix` to auto-fix any lint issues | ||
| - [ ] If you added behaviour, add or update tests | ||
| - [ ] If you changed a public API, update the docstrings | ||
| - [ ] Keep the diff focused (one logical change per PR) | ||
|
|
||
| You can also run `make pre-commit` to run all checks at once. | ||
|
|
||
| ## Code style | ||
|
|
||
| - We use `ruff` for formatting and linting | ||
| - We use `mypy` for type checking and expect all new code to be fully typed | ||
| - Keep things simple; we prefer readable over clever | ||
|
|
||
| ## A note on AI-assisted contributions | ||
|
|
||
| We don't have a blanket policy against AI tools (we also use them ourselves). But we do expect: | ||
|
|
||
| 1. **You understand what you're submitting.** If you ran an agent against the repo and opened a PR with the output, you should be able to explain what it does. | ||
| 2. **The contribution was discussed first.** An AI generating code for an agreed-on, well-scoped issue is fine. An AI inventing features and opening a PR is not. | ||
| 3. **Tests and quality are your responsibility.** "The AI wrote it" is not a substitute for correctness. | ||
|
|
||
| PRs that appear to be unreviewed AI output (large scope, multiple unrelated files touched, no prior discussion, new deps) will be closed with a pointer to this document. | ||
|
|
||
| --- | ||
|
|
||
| Questions? Open an issue. | ||
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.