Skip to content

Commit 87fb7af

Browse files
Copilotforsyth2
andcommitted
Add AGENTS.md repository guide
Co-authored-by: forsyth2 <30700190+forsyth2@users.noreply.github.com>
1 parent 591dd42 commit 87fb7af

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

AGENTS.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# AGENTS
2+
3+
## Repository purpose
4+
5+
`zppy` is a post-processing workflow tool that runs specialized
6+
post-processing tools.
7+
8+
Each task is defined by:
9+
10+
1. A Python task file in `zppy/` that reads user-provided `cfg` values.
11+
2. A Jinja2 bash template in `zppy/templates/`.
12+
3. A generated bash script that `zppy` launches.
13+
14+
`zppy-interfaces` is a distinct repository and contains plotting packages used
15+
by `zppy`.
16+
17+
## Key directories
18+
19+
- `docs/source`: documentation sources.
20+
- `tests/`: test files.
21+
- `zppy/`: Python task and workflow control logic.
22+
- `zppy/templates`: bash templates used to control individual tasks.
23+
24+
## Typical test workflow
25+
26+
### Unit and integration tests in this repo
27+
28+
```bash
29+
python -m pip install .
30+
pytest tests/test_*.py
31+
```
32+
33+
For integration tests, see `tests/integration/` and run:
34+
35+
```bash
36+
pytest tests/integration/test_*.py
37+
```
38+
39+
### Full weekly/integration workflow context
40+
41+
The common workflow is:
42+
43+
1. Prepare clean conda environments for:
44+
- `e3sm_diags`
45+
- `zppy-interfaces`
46+
- `zppy`
47+
2. Install each package from source in its environment.
48+
3. Update `tests/integration/utils.py` `TEST_SPECIFICS` environment command
49+
values for the current environment names.
50+
4. Generate integration cfg files:
51+
52+
```bash
53+
python tests/integration/utils.py
54+
```
55+
56+
5. Launch `zppy` with generated cfg files in `tests/integration/generated/`.
57+
6. Check generated `*status` files (for example with `grep -v "OK" *status`).
58+
7. Run integration pytest files under `tests/integration/`.
59+
8. For `test_images.py`, run on a compute node and inspect
60+
`test_images_summary.md`.

0 commit comments

Comments
 (0)