OBOFoundry/COB

Issue running `sh run.sh make main_test`

Closed this issue · 5 comments

Sorry for the barrage of issues, but I guess this is a good test of how well everything works outside of the main developer's hands :)

It seems there's still some dependency issues going on. Note that sssom-0.14.11.dev0 is still there for some reason (funnily, this version is because I think Chris copied parts of the setup configuration from pybel). Ultimately there are still some dependency issues since pandasql is not installed inside the odk docker image

This issue probably belongs somewhere else since it's about ODK and SSSOM-py, but I encountered it here so this is where I put it

sh run.sh make main_test
cob.Makefile:19: warning: overriding recipe for target 'prepare_release'
Makefile:170: warning: ignoring old recipe for target 'prepare_release'
cob.Makefile:45: warning: overriding recipe for target 'cob.owl'
Makefile:373: warning: ignoring old recipe for target 'cob.owl'
cob.Makefile:60: warning: overriding recipe for target 'cob-base.owl'
Makefile:392: warning: ignoring old recipe for target 'cob-base.owl'
cob.Makefile:63: warning: overriding recipe for target 'cob-base-reasoned.owl'
Makefile:408: warning: ignoring old recipe for target 'cob-base-reasoned.owl'
cob.Makefile:66: warning: overriding recipe for target 'cob-examples-reasoned.owl'
Makefile:411: warning: ignoring old recipe for target 'cob-examples-reasoned.owl'
pip install sssom
Requirement already satisfied: sssom in /usr/local/lib/python3.8/dist-packages (0.14.11.dev0)
Requirement already satisfied: click in /usr/local/lib/python3.8/dist-packages (from sssom) (7.1.2)
Requirement already satisfied: pandas in /usr/local/lib/python3.8/dist-packages (from sssom) (1.2.4)
Requirement already satisfied: jsonasobj in /usr/local/lib/python3.8/dist-packages (from sssom) (1.3.1)
Requirement already satisfied: rdflib in /usr/local/lib/python3.8/dist-packages (from sssom) (5.0.0)
Requirement already satisfied: biolinkml in /usr/local/lib/python3.8/dist-packages (from sssom) (1.7.6)
Requirement already satisfied: pyyaml in /usr/local/lib/python3.8/dist-packages (from sssom) (5.4.1)
Requirement already satisfied: hbreader in /usr/local/lib/python3.8/dist-packages (from biolinkml->sssom) (0.9.1)
Requirement already satisfied: prologterms>=0.0.6 in /usr/local/lib/python3.8/dist-packages (from biolinkml->sssom) (0.0.6)
Requirement already satisfied: pyjsg>=0.11.6 in /usr/local/lib/python3.8/dist-packages (from biolinkml->sssom) (0.11.6)
Requirement already satisfied: graphviz>=0.10.1 in /usr/local/lib/python3.8/dist-packages (from biolinkml->sssom) (0.16)
Requirement already satisfied: pyshexc>=0.8.3 in /usr/local/lib/python3.8/dist-packages (from biolinkml->sssom) (0.8.3)
Requirement already satisfied: jsonschema>=3.0.1 in /usr/local/lib/python3.8/dist-packages (from biolinkml->sssom) (3.2.0)
Requirement already satisfied: isodate>=0.6.0 in /usr/local/lib/python3.8/dist-packages (from biolinkml->sssom) (0.6.0)
Requirement already satisfied: pyshex>=0.7.20 in /usr/local/lib/python3.8/dist-packages (from biolinkml->sssom) (0.7.20)
Collecting argparse>=1.4.0
  Downloading argparse-1.4.0-py2.py3-none-any.whl (23 kB)
Requirement already satisfied: watchdog>=0.9.0 in /usr/local/lib/python3.8/dist-packages (from biolinkml->sssom) (2.1.2)
Requirement already satisfied: requests>=2.22 in /usr/lib/python3/dist-packages (from biolinkml->sssom) (2.22.0)
Requirement already satisfied: rdflib-jsonld>=0.5.0 in /usr/local/lib/python3.8/dist-packages (from biolinkml->sssom) (0.5.0)
Requirement already satisfied: prefixcommons>=0.1.7 in /usr/local/lib/python3.8/dist-packages (from biolinkml->sssom) (0.1.9)
Requirement already satisfied: rdflib-pyld-compat in /usr/local/lib/python3.8/dist-packages (from biolinkml->sssom) (0.1.0)
Requirement already satisfied: parse in /usr/local/lib/python3.8/dist-packages (from biolinkml->sssom) (1.19.0)
Requirement already satisfied: pyld in /usr/local/lib/python3.8/dist-packages (from biolinkml->sssom) (2.0.3)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from isodate>=0.6.0->biolinkml->sssom) (1.14.0)
Requirement already satisfied: setuptools in /usr/local/lib/python3.8/dist-packages (from jsonschema>=3.0.1->biolinkml->sssom) (57.0.0)
Requirement already satisfied: attrs>=17.4.0 in /usr/local/lib/python3.8/dist-packages (from jsonschema>=3.0.1->biolinkml->sssom) (21.2.0)
Requirement already satisfied: pyrsistent>=0.14.0 in /usr/local/lib/python3.8/dist-packages (from jsonschema>=3.0.1->biolinkml->sssom) (0.17.3)
Requirement already satisfied: antlr4-python3-runtime~=4.9 in /usr/local/lib/python3.8/dist-packages (from pyjsg>=0.11.6->biolinkml->sssom) (4.9.2)
Requirement already satisfied: sparqlwrapper>=1.8.5 in /usr/local/lib/python3.8/dist-packages (from pyshex>=0.7.20->biolinkml->sssom) (1.8.5)
Requirement already satisfied: urllib3 in /usr/lib/python3/dist-packages (from pyshex>=0.7.20->biolinkml->sssom) (1.25.8)
Requirement already satisfied: cfgraph>=0.2.1 in /usr/local/lib/python3.8/dist-packages (from pyshex>=0.7.20->biolinkml->sssom) (0.2.1)
Requirement already satisfied: shexjsg>=0.7.1 in /usr/local/lib/python3.8/dist-packages (from pyshex>=0.7.20->biolinkml->sssom) (0.7.1)
Requirement already satisfied: sparqlslurper~=0.4 in /usr/local/lib/python3.8/dist-packages (from pyshex>=0.7.20->biolinkml->sssom) (0.4.1)
Requirement already satisfied: pyparsing in /usr/local/lib/python3.8/dist-packages (from rdflib->sssom) (2.4.7)
Requirement already satisfied: pytz>=2017.3 in /usr/local/lib/python3.8/dist-packages (from pandas->sssom) (2021.1)
Requirement already satisfied: numpy>=1.16.5 in /usr/local/lib/python3.8/dist-packages (from pandas->sssom) (1.20.3)
Requirement already satisfied: python-dateutil>=2.7.3 in /usr/local/lib/python3.8/dist-packages (from pandas->sssom) (2.8.1)
Requirement already satisfied: cachetools in /usr/local/lib/python3.8/dist-packages (from pyld->biolinkml->sssom) (4.2.2)
Requirement already satisfied: frozendict in /usr/local/lib/python3.8/dist-packages (from pyld->biolinkml->sssom) (2.0.2)
Requirement already satisfied: lxml in /usr/local/lib/python3.8/dist-packages (from pyld->biolinkml->sssom) (4.6.3)
Requirement already satisfied: testfixtures in /usr/local/lib/python3.8/dist-packages (from rdflib-pyld-compat->biolinkml->sssom) (6.17.1)
Installing collected packages: argparse
Successfully installed argparse-1.4.0
WARNING: Running pip as root will break packages and permissions. You should install packages reliably by using venv: https://pip.pypa.io/warnings/venv
WARNING: You are using pip version 21.1.2; however, version 21.2.4 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
pip install --upgrade --no-deps --force-reinstall sssom==0.3.2
Collecting sssom==0.3.2
  Downloading sssom-0.3.2.tar.gz (65 kB)
     |████████████████████████████████| 65 kB 1.6 MB/s 
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Building wheels for collected packages: sssom
  Building wheel for sssom (PEP 517) ... done
  Created wheel for sssom: filename=sssom-0.3.2-py3-none-any.whl size=72142 sha256=ea4298bc1344e1ce9a57df6faef947a7881fe9a246269b9e1b5299adb67b33e8
  Stored in directory: /root/.cache/pip/wheels/f9/75/a5/bc69622211002e0e6aadabfd7dfa758147b787688317e6e033
Successfully built sssom
Installing collected packages: sssom
  Attempting uninstall: sssom
    Found existing installation: sssom 0.14.11.dev0
    Uninstalling sssom-0.14.11.dev0:
      Successfully uninstalled sssom-0.14.11.dev0
Successfully installed sssom-0.3.2
WARNING: Running pip as root will break packages and permissions. You should install packages reliably by using venv: https://pip.pypa.io/warnings/venv
WARNING: You are using pip version 21.1.2; however, version 21.2.4 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
sssom convert components/cob-to-external.tsv -o tmp/cob-to-external.sssom.owl
Traceback (most recent call last):
  File "/usr/local/bin/sssom", line 5, in <module>
    from sssom.cli import main
  File "/usr/local/lib/python3.8/dist-packages/sssom/cli.py", line 9, in <module>
    from pandasql import sqldf
ModuleNotFoundError: No module named 'pandasql'
make: *** [cob.Makefile:88: tmp/cob-to-external.sssom.owl] Error 1

Thanks for that, no need to apologise, this is a super new pipeline and barely tested, so appreciate all your input; these should fix with the ODK release - in the meantime, could you test whether #177 would fix your issue?

@matentzn that worked, but there's a new error now. I'll keep posting them here as I get new ones. I'll omit the first parts until the python install:

... 
sssom convert components/cob-to-external.tsv -o tmp/cob-to-external.sssom.owl
WARNING:root:dc is already in curie map (http://purl.org/dc/terms/, but with a different value than http://purl.org/dc/elements/1.1/
WARNING:root:dcterms is already in curie map (http://purl.org/dc/terms/, but with a different value than https://dublincore.org/specifications/dublin-core/dcmi-terms/#
WARNING:root:No curie map provided (not recommended), trying to use defaults..
WARNING:root:No attr for notes [104 instances]
WARNING:root:dc is already in curie map (http://purl.org/dc/terms/, but with a different value than http://purl.org/dc/elements/1.1/
WARNING:root:dcterms is already in curie map (http://purl.org/dc/terms/, but with a different value than https://dublincore.org/specifications/dublin-core/dcmi-terms/#
Traceback (most recent call last):
  File "/usr/lib/python3.8/shutil.py", line 788, in move
    os.rename(src, real_dst)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmp7nsq8dqi' -> 'tmp/cob-to-external.sssom.owl'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/sssom", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/sssom/cli.py", line 120, in convert
    convert_file(input_path=input, output_path=output, output_format=output_format)
  File "/usr/local/lib/python3.8/dist-packages/sssom/io.py", line 29, in convert_file
    write_func(doc, output_path, serialisation=fileformat)
  File "/usr/local/lib/python3.8/dist-packages/sssom/writers.py", line 128, in write_owl
    graph.serialize(destination=filename, format=serialisation)
  File "/usr/local/lib/python3.8/dist-packages/rdflib/graph.py", line 982, in serialize
    shutil.move(name, path)
  File "/usr/lib/python3.8/shutil.py", line 802, in move
    copy_function(src, real_dst)
  File "/usr/lib/python3.8/shutil.py", line 432, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.8/shutil.py", line 261, in copyfile
    with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: 'tmp/cob-to-external.sssom.owl'
make: *** [cob.Makefile:88: tmp/cob-to-external.sssom.owl] Error 1

I'll try and provide a fix in SSSOM-py, maybe it's a problem with ensuring directories exist

Seems like an issue with TMPDIR not being made in the makefile

Solution in the meantime: run sh run.sh mkdir tmp before sh run.sh make main_test

I think while its good to add that fixed to SSSOM you provided, its important its fixed on Makefile level:
#180

Thanks for that! Hopefully the PR does it.