agentleFS
pydatapydata/xarray/AGENTS.md

xarray

AGENTS.md4.2k starsChanged 18 days agoApache-2.0View on GitHub

Development environments are managed with pixi, the same ones CI uses (see [environments] in pixi.toml). They are installed on first use. Environments like test-py314-no-dask or test-py312-bare-minimum run the tests without some optional dependencies. See xarray/tests/AGENTS.md for guidelines on writing tests. - Always place imports at the top of the file in the standard import section - Never add imports inside functions or nested scopes unless there's a specific reason (e.g., circular import avoidance, optional dependencies in TYPE_CHECKING) - Group imports…

We split this AGENTS.md into the rules it gives an agent

6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Never add imports inside functions or nested scopes unless there's a specific reason (e.g., circular import avoidance, optional …

    line 32
  2. Very specific:

    Always add type hints to every function and method you create or edit, including tests (-> None), fixtures and helpers

    line 41
  3. Very specific:

    Never create issues nor pull requests on the xarray GitHub repository unless explicitly instructed

    line 55
  4. Distinctive:

    Never post "update" messages, progress reports, or explanatory comments on GitHub issues/PRs unless specifically instructed

    line 57
  5. Very specific:

    Don't comment on an issue to ask to be assigned or to announce that you are working on it or will open a PR.

    line 59
  6. Very specific:

    When creating commits, always include a co-authorship trailer for the tool, e.g.

    line 62

≈ “Common” is an estimate: at least 1 in 5 of the 36,368 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

xarray development setup

Setup

Development environments are managed with pixi, the same ones CI uses (see [environments] in pixi.toml). They are installed on first use.

Run tests

pixi run -e test-py313 -- python -m pytest xarray -n auto  # All tests in parallel
pixi run -e test-py313 -- python -m pytest xarray/tests/test_dataarray.py  # Specific file

Environments like test-py314-no-dask or test-py312-bare-minimum run the tests without some optional dependencies.

See xarray/tests/AGENTS.md for guidelines on writing tests.

Linting & type checking

pixi exec pre-commit run --all-files  # Includes ruff and other checks
pixi run -e test-py314-with-typing -- python -m mypy  # Type checking with mypy

Code Style Guidelines

Import Organization

  • Always place imports at the top of the file in the standard import section
  • Never add imports inside functions or nested scopes unless there's a specific reason (e.g., circular import avoidance, optional dependencies in TYPE_CHECKING)
  • Group imports following PEP 8 conventions:
    1. Standard library imports
    2. Related third-party imports
    3. Local application/library specific imports

Type hints

  • Always add type hints to every function and method you create or edit, including tests (-> None), fixtures and helpers

CI

  • The test-py314 (flaky) job runs tests that depend on external services (e.g. test.opendap.org) and fails regularly for unrelated reasons. It does not block merging, so don't skip or change these tests, ask for reruns, or explain these failures in PRs.

GitHub Interaction Guidelines

  • NEVER impersonate the user on GitHub, always sign off with something like "[This is <tool name> on behalf of Jane Doe]"
  • Never create issues nor pull requests on the xarray GitHub repository unless explicitly instructed
  • Never post "update" messages, progress reports, or explanatory comments on GitHub issues/PRs unless specifically instructed
  • Don't comment on an issue to ask to be assigned or to announce that you are working on it or will open a PR. xarray does not assign issues: just open the PR and reference the issue in its description.
  • When creating commits, always include a co-authorship trailer for the tool, e.g. Co-authored-by: Claude <noreply@anthropic.com>

Download now (ZIP)

Trending

Quiet since February.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 1 mentionMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the pydata/xarray repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about pydata/xarray

The biggest 5 of 59 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 59

Talked about on Stack Overflow, GitHub and Hacker News (59 times).

On Stack Overflow · 30

25 more on Stack Overflow

On GitHub · 27

22 more on GitHub

On Hacker News · 2

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 28,693 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository3 other files it gives its agents.

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.