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
Python 3.12 is tested in the CI-system and is the recommended version to use.
46
+
47
+
```bash
48
+
poetry python install 3.12
49
+
```
50
+
51
+
5.**Install the project and its dependencies**
43
52
44
53
```bash
45
-
poetry install
54
+
poetry env use 3.12
55
+
poetry install --extras dev
46
56
```
47
57
48
58
**Recommended**: Use `poetry run` to run commands inside the virtual environment:
@@ -71,7 +81,7 @@ You'll need:
71
81
python script.py
72
82
```
73
83
74
-
5.**Install pre-commit hooks**
84
+
6.**Install pre-commit hooks**
75
85
76
86
```bash
77
87
pipx install pre-commit
@@ -107,16 +117,40 @@ You'll need:
107
117
108
118
4.**Run tests locally**
109
119
110
-
Fast unit tests (no external data access):
120
+
Fast unit tests using simulated data (no external data access):
111
121
112
122
```bash
113
-
poetry run pytest -v tests/anoph
123
+
poetry run pytest -v tests --ignore tests/integration
114
124
```
115
125
116
-
All unit tests (requires setting up credentials for legacy tests):
126
+
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).
127
+
128
+
Once access has been granted, [install the Google Cloud CLI](https://cloud.google.com/sdk/docs/install). E.g., if on Linux:
117
129
118
130
```bash
119
-
poetry run pytest -v tests --ignore tests/integration
131
+
./install_gcloud.sh
132
+
```
133
+
134
+
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.
147
+
148
+
6.**Run typechecking**
149
+
150
+
Run static typechecking with mypy:
151
+
152
+
```bash
153
+
poetry run mypy malariagen_data tests --ignore-missing-imports
120
154
```
121
155
122
156
5.**Check code quality**
@@ -150,7 +184,7 @@ ruff format .
150
184
-**Fast tests**: Unit tests should use simulated data when possible (see `tests/anoph/`)
151
185
-**Integration tests**: Tests requiring GCS data access are slower and run separately
152
186
153
-
Run type checking with:
187
+
Run dynamic type checking with:
154
188
155
189
```bash
156
190
poetry run pytest -v tests --typeguard-packages=malariagen_data,malariagen_data.anoph
0 commit comments