agentleFS
NVIDIAKnown publisherNVIDIA/physicsnemo-curator/.claude/skills/testing/SKILL.md

testing

Skill64 starsChanged 7 months agoApache-2.0View on GitHub

Run Python and Rust tests for physicsnemo-curator using uv + pytest with coverage reporting via pytest-cov, and cargo-nextest for Rust tests. Includes benchmark workflows with pytest-benchmark and criterion.

123 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use oss-pr, pr-automation and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • CES-LtdSkill

    oss-pr

    Use when creating a pull request, after committing changes, or when user invokes /oss-pr. Covers branch management, quality checks, commit, push, and PR creation.

    Also in 3 projects that use this

  • CES-LtdSkill

    pr-automation

    PR Automation Orchestrator: poll open PRs, check CI, run review, fix, and merge eligible PRs. Use when: (1) Invoked by daemon via scripts/pr-automation.sh, (2) User says "/pr-automation".

    Also in 3 projects that use this

  • ffsshhttiikkSkill

    cicd

    Continuous integration and delivery pipelines

    Also in 4 projects that use this

  • ffsshhttiikkSkill

    networking

    Practical application and coding skills for Networking

    Also in 3 projects that use this

  • JohnJBorenSkill

    ci-cd

    CI/CD pipeline design, GitHub Actions, testing automation, and deployment strategies

    Also in 9 projects that use this

  • Cogni-AI-OUSkill

    dotfiles

    Reference for repository dotfiles, including their purposes, standard configurations, and usage guidelines. You MUST load this skill when configuring, troubleshooting, or understanding repository dotfiles.

    Also in 3 projects that use this

  • +2 more from CES-Ltd
  • +1 more from ffsshhttiikk

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 105 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Ensure dev dependencies are installed:

    line 13

“Common” is measured: kept by at least 6 in 10 of the 105 edited versions of this file we could read. “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
SKILL.md

Testing Skill

Prerequisites

Ensure dev dependencies are installed:

make install        # or: uv sync --group dev
make develop        # build native Rust extension: uv run maturin develop

Python Tests

Run the full test suite with coverage

uv run pytest test/ --cov --cov-report=term-missing

Or use the Makefile shortcut:

make test

Run a single test file

uv run pytest test/test_example.py -v

Run a single test function

uv run pytest test/test_example.py::test_my_function -v

Useful pytest flags

FlagPurpose
-vVerbose output
-xStop on first failure
-k "expression"Run tests matching expression
-m "not slow"Skip tests marked as slow
--tb=longFull tracebacks
--pdbDrop into debugger on failure
-n autoParallel execution (requires pytest-xdist)

Coverage reports

# Terminal report with missing lines (default in make test)
uv run pytest test/ --cov --cov-report=term-missing

# HTML report (opens in browser)
uv run pytest test/ --cov --cov-report=html
# Output: htmlcov/index.html

# XML report (for CI integration)
uv run pytest test/ --cov --cov-report=xml
# Output: coverage.xml

# Combined reports
uv run pytest test/ --cov --cov-report=term-missing --cov-report=html --cov-report=xml

Coverage configuration is in pyproject.toml under [tool.coverage.run] and [tool.coverage.report]. The minimum coverage threshold is set to 80%.

Python benchmarks

# Run benchmarks only
uv run pytest test/ --benchmark-only

# Run benchmarks with comparison
uv run pytest test/ --benchmark-compare

# Skip benchmarks during normal test runs
uv run pytest test/ --benchmark-skip

Benchmark tests should be marked with @pytest.mark.benchmark and use the benchmark fixture from pytest-benchmark.

Rust Tests

Run Rust tests with nextest

cargo nextest run --manifest-path src/rust/Cargo.toml

Or use the Makefile shortcut:

make test-rust

Run specific Rust tests

cargo nextest run --manifest-path src/rust/Cargo.toml -E "test(parse)"

Rust benchmarks (criterion)

cargo bench --manifest-path src/rust/Cargo.toml

Benchmark results are saved to src/rust/target/criterion/. HTML reports are generated when the html_reports feature is enabled.

Run everything

make bench    # Python benchmarks + Rust benchmarks
make check    # format-check + lint-check + typecheck + interrogate + deny

ASV Historical Benchmarks

ASV (airspeed velocity) tracks performance across the project's git history, producing an interactive web dashboard.

Configuration

ASV is configured in asv.conf.json at the project root. Benchmarks live in benchmarks/ (separate from the pytest test suite in test/). All ASV artifacts (environments, results, HTML) are stored under .asv/ and gitignored.

Running ASV benchmarks

# Benchmark the current commit
make asv-run
# Equivalent to: uv run asv run --quick HEAD^!

# Dry-run (smoke test, no results saved)
make asv-quick

# Benchmark a range of commits
uv run asv run v0.1.0..HEAD

# Compare two revisions
make asv-compare REF1=main REF2=HEAD
# Equivalent to: uv run asv compare main HEAD

# Find the commit that introduced a regression
uv run asv find v0.1.0..HEAD TimePipelineIteration.time_iterate_all

# Show results for a specific commit
uv run asv show HEAD

Publishing the dashboard

# Build static HTML dashboard
make asv-publish
# Output: .asv/html/

# Preview locally
make asv-preview

# Push to GitHub Pages
uv run asv gh-pages

Writing ASV benchmarks

ASV benchmarks use magic name prefixes:

PrefixMeasures
time_Wall-clock execution time
mem_Memory footprint of returned object
peakmem_Peak resident memory
track_Arbitrary numeric value
timeraw_Execution time in a fresh subprocess

Benchmarks support setup(), teardown(), setup_cache() lifecycle methods and parameterization via params / param_names class attributes.

See benchmarks/bench_pipeline.py for working examples.

Download now (ZIP)

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.