-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
7,902 additions
and
10,464 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,9 @@ __pycache__/ | |
*.py[cod] | ||
*$py.class | ||
|
||
# | ||
*.DS_Store | ||
|
||
# C extensions | ||
*.so | ||
|
||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
## Testing | ||
|
||
Run tests with `nox` or `pytest`: | ||
|
||
```bash | ||
nox | ||
``` | ||
|
||
```bash | ||
pytest <args> | ||
``` | ||
|
||
## Regenerating the test data | ||
For testing there were some files generated at some point in the past. These files shouldn't be changed. However, | ||
there are cases when they might need to be recreated. E.g. an `anndata` update could lead to warnings when loading h5ads | ||
saved with older versions of `anndata` or similar things. In this case, the test data can be regenerated by running: | ||
|
||
1. For test data etc.: | ||
Run the functions of the file `tests/_generate_test_files.py`. (not implemented yet) | ||
|
||
2. For tests that compare their outputs to previously generated outputs (mainly plots): | ||
- Run the according tests | ||
- Find out the temp directory of pytest: e.g. from `python`: | ||
```python | ||
import tempfile | ||
tempfile.gettempdir() | ||
``` | ||
The newest outputs should be in a folder like `<tempdir>/pytest-of-<user>/pytest-<pid>/test_<testname>/` | ||
- Copy the new outputs to the according test subfolder `tests/...` and overwrite the old ones. | ||
|
||
3. Some tests don't save their outputs to files but compare them directly to some reference values. In this case, there | ||
should be a comment in the test code that explains how to regenerate the reference values. E.g. function `test_knns_shared_comp` in `spapros/tests/evaluation/test_metrics.py`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
tests/evaluation/test_data/evaluation_results_4_sets/adata1_summary.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
,cluster_similarity nmi_5_20,cluster_similarity nmi_21_60,knn_overlap mean_overlap_AUC,forest_clfs accuracy,forest_clfs perct acc > 0.8,gene_corr 1 - mean,gene_corr perct max < 0.8,marker_corr per marker,marker_corr per celltype,marker_corr per marker mean > 0.025 | ||
ref_random,0.0623647871374067,0.0927104946422492,0.0009030800347461,0.2759546038164502,0.1561642009862721,0.992915456785802,1.0,0.1432902447379042,0.1275892204195234,0.1432902447379042 | ||
ref_PCA,0.805877546541095,0.7593064103029448,0.5675193925865685,0.9119385995927008,0.9431187524990003,0.7606639919179323,0.7511645800130607,0.4385151503152752,0.5133844442314954,0.4385151503152752 | ||
ref_DE,0.6975060455506337,0.6764212270254311,0.3661317202740812,0.901557706693009,0.8580713265600309,0.8332276216127024,0.6135335909572877,0.5737896071421181,0.5994240338272974,0.5737896071421181 | ||
ref_random,0.062364787137406716,0.09271049464224926,0.0009030800347461037,0.27595460381645026,0.15616420098627212,0.992915456785802,1.0,0.14329024473790428,0.12758922041952342,0.14329024473790428 | ||
ref_PCA,0.805877546541095,0.7593064103029448,0.5675193925865685,0.9119385995927007,0.9431187524990005,0.7606639919179323,0.7511645800130607,0.4385151503152752,0.5133844442314954,0.4385151503152752 | ||
ref_DE,0.6975060455506337,0.6764212270254311,0.36613172027408125,0.901557706693009,0.8580713265600309,0.8332276216127024,0.6135335909572877,0.5737896071421181,0.5994240338272974,0.5737896071421181 | ||
spapros_selection,0.8105865177394072,0.7569520384925248,0.5389194419268526,0.9229008935605123,0.9895748367319737,0.7777080096564589,0.7608637851426177,0.4709711093592685,0.5348414461486936,0.4709711093592685 |
Oops, something went wrong.