Back to .md Directory

AGENTS.md for hep-data-llm package

Defines development environment, testing, and code style conventions for a Python package that uses LLMs to generate particle physics plots.

May 2, 2026
0 downloads
0 views
agent llm rag
View source

What this file does

Defines development environment, testing, and code style conventions for a Python package that uses LLMs to generate particle physics plots.

When to use it

  • Starting a Python package with hatch, typer, and pydantic
  • Setting up pytest with Docker and non-Docker test modes
  • Establishing black and flake8 formatting rules for a project
  • Organizing tests alongside source files in a Python project

Assumes this stack

Python 3.13+hatchtyperpydanticpytestblack

AGENTS.md for hep-data-llm package

This is a proof of principle package for LLM's that can code up particle physics plots and other tasks.

Dev environment tips

  • Run pip install -e .[test] to get everything properly installed for testing and development.
  • Package uses hatch to build the package.
  • Use typer for the CLI. Commands and sub commands are encouraged.
  • Use pydantic objects where it makes sense (reading config from files, etc.).
  • We are coding for python 3.13 and above. No need for things like annotations.

Testing instructions

  • Use pytest to test all tests, and pytest --no-docker if in an environment without docker.
  • Use pytest fixtures when needed, including ones like tmp_path to keep tests clean.
  • When adding new code make sure it is tested.
  • Tests are located under the tests directory, and each source file's test can be found in test_<source-file>.py. Always put new unit tests in the corresponding file of the code file you are testing.
  • Make sure black . runs on all new code without changing it (e.g. black formatting rules). You can ignore any errors in notebooks.
  • Make sure flake8 src/ and flake8 tests/ also run. Line length is 99.

What's inside

1 dev environment tip, 1 testing section with 5 bullet points

Change this for your project

  • Replace pip install -e.[test] with your package's test extras
  • Replace hep-data-llm with your own package name
  • Replace tests directory path if your tests live elsewhere

Where it goes

Save as AGENTS.md in your repository root. Read by Codex, Cursor and other agents that follow the AGENTS.md convention.

Related Documents