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
If you only need to run tests, `poetry install --with test` is sufficient.
61
+
48
62
**Recommended**: Use `poetry run` to run commands inside the virtual environment:
49
63
50
64
```bash
@@ -71,7 +85,7 @@ You'll need:
71
85
python script.py
72
86
```
73
87
74
-
5.**Install pre-commit hooks**
88
+
6.**Install pre-commit hooks**
75
89
76
90
```bash
77
91
pipx install pre-commit
@@ -107,16 +121,40 @@ You'll need:
107
121
108
122
4.**Run tests locally**
109
123
110
-
Fast unit tests (no external data access):
124
+
Fast unit tests using simulated data (no external data access):
111
125
112
126
```bash
113
-
poetry run pytest -v tests/anoph
127
+
poetry run pytest -v tests --ignore tests/integration
114
128
```
115
129
116
-
All unit tests (requires setting up credentials for legacy tests):
130
+
To run integration tests which read data from GCS, you'll need to [request access to MalariaGEN data on GCS](https://malariagen.github.io/vector-data/vobs/vobs-data-access.html).
131
+
132
+
Once access has been granted, [install the Google Cloud CLI](https://cloud.google.com/sdk/docs/install). E.g., if on Linux:
117
133
118
134
```bash
119
-
poetry run pytest -v tests --ignore tests/integration
135
+
./install_gcloud.sh
136
+
```
137
+
138
+
You'll then need to obtain application-default credentials, e.g.:
Tests will run slowly the first time, as data required for testing will be read from GCS. Subsequent runs will be faster as data will be cached locally in the "gcs_cache" folder.
151
+
152
+
6.**Run typechecking**
153
+
154
+
Run static typechecking with mypy:
155
+
156
+
```bash
157
+
poetry run mypy malariagen_data tests --ignore-missing-imports
120
158
```
121
159
122
160
5.**Check code quality**
@@ -150,7 +188,7 @@ ruff format .
150
188
-**Fast tests**: Unit tests should use simulated data when possible (see `tests/anoph/`)
151
189
-**Integration tests**: Tests requiring GCS data access are slower and run separately
152
190
153
-
Run type checking with:
191
+
Run dynamic type checking with:
154
192
155
193
```bash
156
194
poetry run pytest -v tests --typeguard-packages=malariagen_data,malariagen_data.anoph
0 commit comments