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
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+13-15Lines changed: 13 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -114,10 +114,10 @@ See below for specifics of the different packages. Let's have a look at the comm
114
114
115
115
To install the dependencies for all sub-projects, run `make install`.
116
116
***Tooling** we use across the sub-projects to enforce coding styles and tests:
117
-
*`format.sh`: black and isort
118
-
*`lint.sh`: pylint
119
-
*`typecheck.sh`: mypy
120
-
*`test.sh`: pytest and custom scripts
117
+
*`./format.sh`: black and isort
118
+
*`./lint.sh`: pylint
119
+
*`./typecheck.sh`: mypy
120
+
*`./test.sh`: pytest and custom scripts
121
121
122
122
Those are also accessible via make commands from the top-level directory, running the respective scripts for each sub-project
123
123
, e.g. `make format`, `make lint`, …
@@ -138,9 +138,13 @@ The `webknossos` folder contains examples, which are not part of the package, bu
138
138
139
139
The tests also contain functionality for the webKnossos client. There a two modes to run the tests:
140
140
141
-
1.`test.sh --refresh-snapshots`, sending network requests to a webKnossos instance:
142
-
This expects a local webKnossos setup with specific test data, which is shipped with webKnossos. If you're starting and running webKnossos manually, please use port 9000 (the default) and run the `tools/postgres/prepareTestDb.sh` script in the webKnossos repository (⚠️ this overwrites your local webKnossos database). Alternatively, a docker-compose setup is started automatically for the tests, see `test.sh` and `tests/docker-compose.yml` for details. The network requests & response are recorded as "cassettes" by [vcr.py](https://vcrpy.readthedocs.io), see next point:
143
-
2.`test.sh` replays responses from previous network snapshots using [vcr.py](https://vcrpy.readthedocs.io) via [pytest-recording](https://github.com/kiwicom/pytest-recording). No additional network requests are allowed in this mode.
141
+
1.`./test.sh --refresh-snapshots`, sending network requests to a webKnossos instance:
142
+
This expects a local webKnossos setup with specific test data, which is shipped with webKnossos. If you're starting and running webKnossos manually, please use port 9000 (the default) and run the `tools/postgres/prepareTestDb.sh` script in the webKnossos repository (⚠️ this overwrites your local webKnossos database). Alternatively, a docker-compose setup is started automatically for the tests, see `./test.sh` and `tests/docker-compose.yml` for details. The network requests & response are recorded as "cassettes" by [vcr.py](https://vcrpy.readthedocs.io), see next point:
143
+
2.`./test.sh` replays responses from previous network snapshots using [vcr.py](https://vcrpy.readthedocs.io) via [pytest-recording](https://github.com/kiwicom/pytest-recording). No additional network requests are allowed in this mode.
144
+
145
+
`./test.sh --store-durations` updates the durations for
which is used in the CI to split the tests for different runners.
144
148
145
149
The code under `webknossos/client/_generated` is auto-generated! Please don't adapt anything in the `generated` folder manually, but re-run the code generation.
146
150
@@ -154,14 +158,8 @@ To re-generate the code, run
154
158
155
159
#### `wkcuber` package
156
160
157
-
Currently the test setup consists of different scripts as well as pytest tests. The following commands are run in CI:
158
-
```bash
159
-
tar -xzvf testdata/WT1_wkw.tar.gz
160
-
poetry run pytest tests
161
-
poetry run tests/scripts/all_tests.sh
162
-
```
163
-
164
-
There is also a `test.sh` which is currently outdated, see [issue #580](https://github.com/scalableminds/webknossos-libs/issues/580).
161
+
Simply use the default scripts mentioned above, such as
0 commit comments