Add CLAUDE.md#14012
Conversation
cbrnr
left a comment
There was a problem hiding this comment.
One thing I would include is that uv should be used for project management tasks if available.
larsoner
left a comment
There was a problem hiding this comment.
No expert here (yet!) but this seems like a reasonable starting point!
I think uv vs not isn't something we need to tell AI agents at this stage (seems up to user preference still). But if you think it will benefit most people I can live with it
| This project has an explicit policy on AI-generated contributions (`CONTRIBUTING.md`): | ||
| - Fully-automated PRs/issues are not accepted; a human must review, understand, and be able to | ||
| explain every change before it's submitted under their name. | ||
| - Any PR that used AI assistance must disclose that in the PR description (tool + scope of use). | ||
| - Do not paste AI-generated text into issue/PR descriptions or comments. | ||
| - Be careful that generated code for specialized algorithms doesn't reproduce copyrighted | ||
| passages from papers/other codebases (license risk). |
There was a problem hiding this comment.
I am worried about this being non-DRY. If this works it seems preferable
| This project has an explicit policy on AI-generated contributions (`CONTRIBUTING.md`): | |
| - Fully-automated PRs/issues are not accepted; a human must review, understand, and be able to | |
| explain every change before it's submitted under their name. | |
| - Any PR that used AI assistance must disclose that in the PR description (tool + scope of use). | |
| - Do not paste AI-generated text into issue/PR descriptions or comments. | |
| - Be careful that generated code for specialized algorithms doesn't reproduce copyrighted | |
| passages from papers/other codebases (license risk). | |
| This project has an explicit policy on AI-generated contributions (`CONTRIBUTING.md`). | |
| Read that document and understand its implications. |
There was a problem hiding this comment.
Yes, I agree, but just mentioning the file is a soft instruction and requires a tool call, which an agent can or cannot follow. I've therefore added a hard instruction to import that file (as it is not very long I think that's OK).
Co-authored-by: Eric Larson <larson.eric.d@gmail.com>
Co-authored-by: Eric Larson <larson.eric.d@gmail.com>
Co-authored-by: Eric Larson <larson.eric.d@gmail.com>
Co-authored-by: Eric Larson <larson.eric.d@gmail.com>
Co-authored-by: Eric Larson <larson.eric.d@gmail.com>
|
Okay this seems reasonable. I worry a bit about this getting out of date, but hopefully people using this can periodically update (or tell Claude to update it)! If it creates too much noise or drifts too badly we can strip out some of the details that are more likely to change over time (e.g., which readers exist). Thanks @cbrnr ! |
|
I agree! But we just have to let Claude check and update it regularly (e.g., for every new release or something). |
drammock
left a comment
There was a problem hiding this comment.
I realize this was already merged, but I was on holiday when it came through. Couple of comments that may be worth a follow-up
|
|
||
| # fetch datasets explicitly if needed | ||
| python -c "import mne; mne.datasets.testing.data_path(verbose=True)" | ||
| python -c "import mne; mne.datasets.sample.data_path(verbose=True) |
There was a problem hiding this comment.
| python -c "import mne; mne.datasets.sample.data_path(verbose=True) | |
| python -c "import mne; mne.datasets.sample.data_path(verbose=True)" |
missing closing quote
There was a problem hiding this comment.
Done in #14044, let's use that PR to update/add/modify whatever we missed in the first iteration!
| - Cross-reference liberally in docstrings/docs using Sphinx roles (`:func:`, `:class:`, `:meth:`, | ||
| `:attr:`, `:mod:`, `:ref:`) — but note an API element must appear in `doc/python_reference.rst` | ||
| for the cross-reference to resolve. | ||
| - Imports: Use absolute imports for new code (historical relative imports are tolerated in |
There was a problem hiding this comment.
this surprised me; can you point to where a decision was made to use absolute imports for new code?
I think it would be a good idea if we provided a
CLAUDE.md, so that contributors using AI can save tokens (energy). I intentionally do not want to add anAGENTS.md, since Claude doesn't read that by default, but other AI tools readCLAUDE.mdAFAIK.I've auto-generated this file with some minor manual edits. Let me know if it's missing something, or if there are any errors.