linkml / schema-automator

Automated assistance for the schema development lifecycle
https://linkml.io/schema-automator/
BSD 3-Clause "New" or "Revised" License
36 stars 13 forks source link

resinstate tests #43

Closed turbomam closed 8 months ago

turbomam commented 2 years ago

poetry run pytest tests/

The currently activated Python version 3.8.10 is not supported by the project (^3.9). Trying to find and use a compatible version. Using python3.9 (3.9.5) =============================================================================================== test session starts =============================================================================================== platform linux -- Python 3.9.5, pytest-6.2.5, py-1.11.0, pluggy-1.0.0 rootdir: /home/mark/gitrepos/cm/linkml-model-enrichment collected 18 items / 1 error / 17 selected

===================================================================================================== ERRORS ====================================================================================================== ____ ERROR collecting tests/test_combined_tsvenum.py ____ ImportError while importing test module '/home/mark/gitrepos/cm/linkml-model-enrichment/tests/test_combined_tsv_enum.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: /usr/lib/python3.9/importlib/init.py:127: in import_module return _bootstrap._gcd_import(name[level:], package, level) tests/test_combined_tsv_enum.py:9: in from linkml_model_enrichment.annotators.enum_annotator import all_enums_to_ols E ImportError: cannot import name 'all_enums_to_ols' from 'linkml_model_enrichment.annotators.enum_annotator' (/home/mark/gitrepos/cm/linkml-model-enrichment/linkml_model_enrichment/annotators/enum_annotator.py) ================================================================================================ warnings summary ================================================================================================= ../../../.cache/pypoetry/virtualenvs/linkml-model-enrichment-ZIv2sEqv-py3.9/lib/python3.9/site-packages/rdflib_jsonld/init.py:9 /home/mark/.cache/pypoetry/virtualenvs/linkml-model-enrichment-ZIv2sEqv-py3.9/lib/python3.9/site-packages/rdflib_jsonld/init.py:9: DeprecationWarning: The rdflib-jsonld package has been integrated into rdflib as of rdflib==6.0.0. Please remove rdflib-jsonld from your project's dependencies. warnings.warn(

../../../.cache/pypoetry/virtualenvs/linkml-model-enrichment-ZIv2sEqv-py3.9/lib/python3.9/site-packages/funowl/base/cast_function.py:2 /home/mark/.cache/pypoetry/virtualenvs/linkml-model-enrichment-ZIv2sEqv-py3.9/lib/python3.9/site-packages/funowl/base/cast_function.py:2: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working from collections import Iterable, UserList

-- Docs: https://docs.pytest.org/en/stable/warnings.html ============================================================================================= short test summary info ============================================================================================= ERROR tests/test_combined_tsv_enum.py !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ========================================================================================== 2 warnings, 1 error in 1.04s =========================================================================================== mark@nuc-two-ups:~/gitrepos/cm/linkml-model-enrichment$

turbomam commented 2 years ago

See also #23

turbomam commented 2 years ago

ls -1 tests/*py

test results
tests/init.py
tests/test_combined_tsv_enum.py fails
tests/test_convert_shacl.py passes with warnings: The rdflib-jsonld package has been integrated into rdflib as of rdflib==6.0.0. Please remove rdflib-jsonld from your project's dependencies. and Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
tests/test_dosdp.py passes
tests/test_fk_inference.py passes
tests/test_from_json.py passes
tests/test_from_jsonschema.py passes
tests/test_from_owl.py passes with rdflib-jsonld and ABCs warnings
tests/test_from_owl_schemaorg.py passes with rdflib-jsonld and ABCs warnings
tests/test_from_rdf.py passes with rdflib-jsonld warning
tests/test_from_robot_template.py passes wiht warning: DeprecationWarning: Call to deprecated method all_class. (Use all_classes instead)
tests/test_from_tsv.py passes
tests/test_schema_annotator.py passes
tests/test_sparql_import.py passes
turbomam commented 2 years ago

PR check action triggered by push and PR?

sierra-moxon commented 1 year ago

@turbomam Hi Mark - sorry again, do you think this is still worth a ticket? :)

turbomam commented 8 months ago

Hi @sierra-moxon!

I am having problems with import-owl now. I will either update or close this issue based on that.

turbomam commented 8 months ago

I'm not sure if this is, or my import-owl problems in general, are related in any way to

@sneakers-the-rat provided an owl input snippet and specified a version. I'll try to repeat that.

as:Activity a owl:Class ;
  rdfs:label "Activity"@en ;
  rdfs:subClassOf as:Object ;
  rdfs:comment "An Object representing some form of Action that has been taken"@en .

after converting to functional notation:

schemauto import-owl activitystreams2.ofn -o ./activitystreams.yaml

with schema_automator: v0.3.0

My current environment is 0.3.1