You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file provides guidance to GitHub Copilot when working with code in this repository.
4
+
5
+
**IMPORTANT**: Always read [AGENTS.md](../AGENTS.md) at the start of every session before doing any work. It contains comprehensive project context and development guidelines that are essential for working in this codebase.
6
+
7
+
## Quick Reference
8
+
9
+
-**Docker-centric development**: Run tests inside containers, not on host
10
+
-**Import pattern**: `from viral_ngs import core` then `core.samtools.SamtoolsTool()`
11
+
-**Test location**: `tests/unit/<module>/`
12
+
-**Dependencies**: ALL via conda, not pip (see `docker/requirements/*.txt`)
13
+
14
+
## Running Tests
15
+
16
+
```bash
17
+
docker run --rm \
18
+
-v $(pwd):/opt/viral-ngs/source \
19
+
quay.io/broadinstitute/viral-ngs:main-core \
20
+
pytest -rsxX -n auto /opt/viral-ngs/source/tests/unit
21
+
```
22
+
23
+
## Key Files
24
+
25
+
| File | Purpose |
26
+
|------|---------|
27
+
|[AGENTS.md](../AGENTS.md)| Full AI assistant guidance |
Copy file name to clipboardExpand all lines: AGENTS.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,6 +69,21 @@ docker run --rm \
69
69
pytest -rsxX -n auto /opt/viral-ngs/source/tests/unit/classify
70
70
```
71
71
72
+
**Important: Testing source code changes requires re-installing the package.**
73
+
The `-v` mount makes your local files visible on disk, but `viral_ngs` is already installed as a package inside the container image. Python imports resolve to the *installed* copy, not your mounted source files. If you've modified files under `src/viral_ngs/`, you must re-install before running tests:
Changes to test files (`tests/`) and test inputs (`tests/input/`) are picked up automatically via the volume mount — the re-install is only needed when modifying the `src/viral_ngs/` package code.
84
+
85
+
Running pytest directly on the host will generally not work — most dependencies (bioinformatics tools, conda packages) are only available inside the Docker containers. Always test inside Docker.
0 commit comments