Skip to content

Commit

Permalink
test ontload config, version bump for release, ontload fixes
Browse files Browse the repository at this point in the history
amazing what problems testing can reveal, heh
  • Loading branch information
tgbugs committed Feb 19, 2020
1 parent c412da8 commit 74bae1a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ recursive-exclude * *.swp
recursive-exclude * *.swo

include nifstd/scigraph/curie_map.yaml
include nifstd/scigraph/graphload-base-template.yaml
include ttlser/test/nasty.ttl
2 changes: 1 addition & 1 deletion pyontutils/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.1.16'
__version__ = '0.1.17'
3 changes: 2 additions & 1 deletion pyontutils/auth-config.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
'scigraph-api-key': {'environment-variables': 'SCICRUNCH_API_KEY SCIGRAPH_API_KEY'},

# scigraph build
'scigraph-graphload': ['../nifstd/scigraph/graphload-base-template.yaml',],
'scigraph-graphload': ['../nifstd/scigraph/graphload-base-template.yaml', # git
'{:cwd}/nifstd/scigraph/graphload-base-template.yaml',], # ebuild testing # FIXME VERY BAD coupling between test and module location
'scigraph-services': ['../nifstd/scigraph/services-base-template.yaml',],
'zip-location': '/tmp'}
}
7 changes: 6 additions & 1 deletion pyontutils/ontload.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,13 @@ def make_graphload_config(graphload_config_template, graphload_ontologies,
with open(zip_location / config_raw, 'rt') as f:
config = yaml.safe_load(f)

if 'ontologies' not in config:
# FIXME log a warning?
config['ontologies'] = []

config['graphConfiguration']['location'] = graph_path.as_posix()
config['ontologies'] = [{k:v.replace(remote_base, local_base)
lbasposix = local_base.as_posix()
config['ontologies'] = [{k:v.replace(remote_base, lbasposix)
if k == 'url'
else v
for k, v in ont.items()}
Expand Down
3 changes: 2 additions & 1 deletion test/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,9 @@ class TestScripts(Folders, _TestScriptsBase):
],
'necromancy':['necromancy', ban],
'ontload':[['ontload', '--help'],
['ontload', 'imports', 'NIF-Ontology', 'NIF', ban],
['ontload', 'chain', 'NIF-Ontology', 'NIF', nifttl], # this hits the network
['ontload', 'config', 'NIF-Ontology', 'NIF', '--zip-location', './', ban], # FIXME cleanup created configs
['ontload', 'imports', 'NIF-Ontology', 'NIF', ban],
['cd', olr.as_posix() + '/ttl', '&&', 'git', 'checkout', ban]],
'ontutils':[['ontutils', '--help'],
['ontutils', 'deadlinks', nifttl],
Expand Down

0 comments on commit 74bae1a

Please sign in to comment.