Skip to content

Commit 0178c2d

Browse files
authored
Merge pull request #60 from INCATools/rg-tab
Refactor to use relation-graph TSV output
2 parents e198d74 + 1016476 commit 0178c2d

38 files changed

+2095
-1230
lines changed

.github/workflows/main.yaml

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -77,30 +77,11 @@ jobs:
7777
# install your root project, if required
7878
#----------------------------------------------
7979
- name: Install library
80-
run: poetry install --no-interaction --extras gilda
80+
run: poetry install --no-interaction
8181

8282
#----------------------------------------------
8383
# run test suite
8484
#----------------------------------------------
8585
- name: Run tests
8686
run: poetry run python -m unittest discover
8787

88-
#----------------------------------------------
89-
# coverage report
90-
#----------------------------------------------
91-
- name: Generate coverage results
92-
run: |
93-
poetry run coverage run -m unittest discover
94-
poetry run coverage xml
95-
poetry run coverage report -m
96-
97-
#----------------------------------------------
98-
# upload coverage results
99-
#----------------------------------------------
100-
- name: Upload coverage report
101-
uses: codecov/[email protected]
102-
with:
103-
name: codecov-results-${{ matrix.python-version }}
104-
token: ${{ secrets.CODECOV_TOKEN }}
105-
file: ./coverage.xml
106-
fail_ci_if_error: true

Makefile

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,32 @@ PREFIX_DIR = $(BUILDER_DIR)/prefixes
1313
ALL_OBO_ONTS := $(shell cat reports/obo.tsv)
1414
SELECTED_ONTS = obi mondo go envo ro hp mp zfa wbphenotype ecto upheno uberon_cm doid chebi pr wbphenotype fbbt dron
1515

16+
# EXTRA_ONTOLOGIES is defined in ontologies.Makefile
17+
ALL_ONTS = $(ALL_OBO_ONTS) $(EXTRA_ONTOLOGIES)
18+
19+
STAGED_ONTOLOGIES = $(patsubst %,stage/%.db.gz,$(ALL_ONTS))
20+
1621
TEST_ONTOLOGIES = go-nucleus robot-example
1722

23+
1824
all: build_all stage_all
19-
build_all: $(patsubst %,all-%,$(ALL_OBO_ONTS))
20-
stage_all: $(patsubst %,stage/%.db.gz,$(ALL_OBO_ONTS))
25+
build_all: $(patsubst %,all-%,$(ALL_ONTS))
26+
stage_all: $(STAGED_ONTOLOGIES)
2127

2228
selected: $(patsubst %,all-%,$(SELECTED_ONTS))
2329

2430
all-%: db/%.db
2531
sqlite3 $< "SELECT COUNT(*) FROM statements"
2632
stage/%.db.gz: db/%.db
2733
gzip -c $< > $@.tmp && mv $@.tmp $@
34+
.PRECIOUS: stage/%.db.gz
35+
36+
list-onts:
37+
echo $(ALL_ONTS)
38+
list-extra:
39+
echo $(EXTRA_ONTOLOGIES)
40+
list-staged:
41+
ls -alt $(STAGED_ONTOLOGIES)
2842

2943
# INSTALL
3044
include install.Makefile
@@ -97,10 +111,6 @@ db/obo-ontologies.owl:
97111
reports/obo.tsv: db/obo-ontologies.db
98112
sqlite3 $< "SELECT subject FROM ontology_status_statement WHERE value = 'active'" | perl -npe 's@^obo:@@' > $@
99113

100-
# to test
101-
list-onts:
102-
echo $(ALL_OBO_ONTS)
103-
104114

105115

106116

@@ -119,21 +129,6 @@ reports/%.problems.tsv: db/%.db target/%.views
119129
STAMP:
120130
touch $@
121131

122-
# download OWL, ensuring converted to RDF/XML
123-
db/%.owl: STAMP
124-
robot merge -I http://purl.obolibrary.org/obo/$*.owl -o $@
125-
.PRECIOUS: db/%.owl
126-
127-
db/foodon.owl: STAMP
128-
robot merge -I $(OBO)/foodon.owl relax reduce -c true -o $@
129-
130-
db/go.owl: STAMP
131-
curl -L -s http://purl.obolibrary.org/obo/go/extensions/go-plus.owl > $@
132-
133-
db/monarch.owl:
134-
robot merge -I http://purl.obolibrary.org/obo/upheno/monarch.owl -o $@
135-
136-
137132
db/reactome-Homo-sapiens.owl: download/reactome-biopax.zip db/biopax.owl
138133
unzip -p $< Homo_sapiens.owl > $@.tmp &&\
139134
robot merge -i $@.tmp -i db/biopax.owl -o $@

install.Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ bin/rdftab:
1717
curl -L -o $@ $(RDFTAB_URL)
1818
chmod +x $@
1919

20-
RG_VERSION=2.2.0
20+
RG_VERSION=2.3.0
2121
bin/relation-graph:
2222
curl -L -s https://github.com/balhoff/relation-graph/releases/download/v$(RG_VERSION)/relation-graph-cli-$(RG_VERSION).tgz | tar -zxv && mv relation-graph-cli-$(RG_VERSION) relation-graph && (cd bin && ln -s ../relation-graph/bin/relation-graph)
2323

0 commit comments

Comments
 (0)