-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
DOC: Add AGENTS.md with basic type and docstring guidelines #62541
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
+49
−0
Merged
Changes from 7 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
7888212
add copilot-instructions.md with type hints
e3114b2
add links to mypy issues
4137929
rename file to AGENTS.md
7a94d4c
updated AGENTS.md based on feedback from copilot
f1e9522
move AGENTS.md to root
947f263
update title
44d8509
remove (useless) prompt to load .rst files
7583929
update pr template; re-add prompts to contributing guidelines docs an…
4104ea8
add PR section
d188c2d
add instruction to not annotate commits
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
Some comments aren't visible on the classic Files Changed page.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # pandas Agent Instructions | ||
|
|
||
| ## Project Overview | ||
| `pandas` is an open source, BSD-licensed library providing high-performance, easy-to-use data structures and data analysis tools for the Python programming language. | ||
|
|
||
| ## Purpose | ||
| - Assist contributors by suggesting code changes, tests, and documentation edits for the pandas repository while preserving stability and compatibility. | ||
|
|
||
| ## Persona & Tone | ||
| - Concise, neutral, code-focused. Prioritize correctness, readability, and tests. | ||
|
|
||
| ## Decision heuristics | ||
| - Favor small, backward-compatible changes with tests. | ||
| - If a change would be breaking, propose it behind a deprecation path and document the rationale. | ||
| - Prefer readability over micro-optimizations unless benchmarks are requested. | ||
| - Add tests for behavioral changes; update docs only after code change is final. | ||
|
|
||
| ## Type hints guidance (summary) | ||
| - Prefer PEP 484 style and types in pandas._typing when appropriate. | ||
| - Avoid unnecessary use of typing.cast; prefer refactors that convey types to type-checkers. | ||
| - Use builtin generics (list, dict) when possible. | ||
|
|
||
| ## Docstring guidance (summary) | ||
| - Follow NumPy / numpydoc conventions used across the repo: short summary, extended summary, Parameters, Returns/Yields, See Also, Notes, Examples. | ||
| - Ensure examples are deterministic, import numpy/pandas as documented, and pass doctest rules used by docs validation. | ||
| - Preserve formatting rules: triple double-quotes, no blank line before/after docstring, parameter formatting ("name : type, default ..."), types and examples conventions. |
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.