Skip to content

Commit 9734861

Browse files
committed
Move more tests from the original repository.
The original ontology-development-kit repository has two other types of configuration tests: * a handful of tests that do not use a configuration file at all; * a test based on an Go-inspired example configuration. We move those tests to the present repository, as they are all tests of the seeding system and workflows.
1 parent cb47d8e commit 9734861

File tree

9 files changed

+651
-1
lines changed

9 files changed

+651
-1
lines changed

examples/chr/project.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
id: chr
2+
title: monochrom
3+
github_org: monarch-initiative
4+
repo: monochrom
5+
contact: mbrush
6+
edit_format: ttl
7+
import_group:
8+
ids:
9+
- ro
10+
- so
11+

examples/go-mini/go-edit.obo

Lines changed: 544 additions & 0 deletions
Large diffs are not rendered by default.

examples/go-mini/project.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
id: go
2+
title: "Gene Ontology (mini example)"
3+
github_org: geneontology
4+
repo: go
5+
#report_fail_on: ERROR
6+
report_fail_on: None
7+
export_formats:
8+
- owl
9+
- obo
10+
- json
11+
import_group:
12+
products:
13+
- id: ro
14+
subset_group:
15+
products:
16+
- id: goslim_metagenomics
17+
- id: goslim_virus
18+
19+
20+

examples/go/project.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
id: go
2+
title: Gene Ontology
3+
github_org: geneontology
4+
repo: envo
5+
report_fail_on: ERROR
6+
export_formats:
7+
- owl
8+
- obo
9+
- json
10+
import_group:
11+
products:
12+
- id: go-bridge
13+
subdir: extensions
14+
native: True
15+
- id: go-gcis
16+
subdir: extensions
17+
native: True
18+
- id: x-disjoint
19+
native: True
20+
- id: go-taxon-groupings
21+
native: True
22+
- id: caro
23+
- id: chebi
24+
- id: cl
25+
- id: fao
26+
- id: oba
27+
- id: pato
28+
- id: pr
29+
- id: ro
30+
- id: so
31+
- id: uberon
32+
subset_group:
33+
ids:
34+
- goslim_agr
35+
36+
37+

examples/minimal/project.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## illustrates the bare minimum config:
2+
## ontology ID
3+
id: minimal

examples/triffo/project.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
id: triffo
2+
title: Triffid Behavior ontology
3+
github_org: cmungall
4+
repo: triffo
5+
import_group:
6+
products:
7+
- id: ro
8+
- id: bfo
9+
- id: pato

examples/unipathway/project.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
id: upa
2+
title: Unipathway
3+
github_org: geneontology
4+
repo: unipathway
5+
contact: amorgat
6+
edit_format: obo
7+
import_group:
8+
ids:
9+
- ro
10+

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ build-backend = "uv_build"
4242
module-name = "incatools.odk"
4343
source-include = [
4444
"NEWS",
45+
"examples/**",
46+
"tests/**",
4547
]
4648

4749
[dependency-groups]

tests/test-configs.sh

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ rm -rf testenv status.txt
88
GITNAME=$(git config --get user.name)
99
GITEMAIL=$(git config --get user.email)
1010

11+
run_odk_seed() {
12+
uv --project .. run odk seed --gitname "$GITNAME" --gitemail "$GITEMAIL" "$@"
13+
}
14+
1115
# Create native ODK environment for testing
1216
mkdir testenv
1317
uv --project .. run odk install testenv
@@ -16,8 +20,18 @@ uv --project .. run odk install testenv
1620
# Seed and build all the test configurations
1721
for t in configs/*.yaml ; do
1822
echo -n "$t... " >> status.txt
19-
uv --project .. run odk seed --gitname "$GITNAME" --gitemail "$GITEMAIL" -c -C $t
23+
run_odk_seed -c -C $t
2024
echo DONE >> status.txt
2125
done
2226

27+
# Additional tests without an explicit config file
28+
run_odk_seed -c -t my-ontology1 my-ont
29+
run_odk_seed -c -d pato -d ro -t my-ontology2 my-ont
30+
run_odk_seed -c -d pato -d cl -d ro -t my-ontology3 my-ont
31+
32+
# Additional "GO mini" test
33+
run_odk_seed -c -D target/go-mini \
34+
-C ../examples/go-mini/project.yaml \
35+
-s ../examples/go-mini/go-edit.obo
36+
2337
rm -rf target testenv status.txt

0 commit comments

Comments
 (0)