funowl
Advanced tools
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
| import os | ||
| import unittest | ||
| from contextlib import redirect_stderr | ||
| from io import StringIO | ||
| from funowl.converters.functional_converter import to_python | ||
| from tests import datadir, SKIP_LONG_TESTS | ||
| class OBILangTagTestCase(unittest.TestCase): | ||
| @unittest.skipIf(SKIP_LONG_TESTS, "obi image must be present to run this") | ||
| def test_obi_issue(self): | ||
| # To run this test: | ||
| # a) Download an image of https://bioportal.bioontology.org/ontologies/OBI from the owl link | ||
| # b) Use protege to load the downloaded image (ext.owl) and save it in OWL functional syntax (obi.owlf.owl) | ||
| # c) Save the output in tests/data/obi.owlf | ||
| txt = StringIO() | ||
| with redirect_stderr(txt): | ||
| with open(os.path.join(datadir, 'obi.owlf')) as f: | ||
| owl = to_python(f.read()) | ||
| print(str(owl)[-1024:]) | ||
| if __name__ == '__main__': | ||
| unittest.main() |
| import sys | ||
| import unittest | ||
| from rdflib import Namespace | ||
| from funowl import EquivalentObjectProperties, Axiom | ||
| from funowl.terminals.TypingHelper import isinstance_ | ||
| EX = Namespace("https://example.org/ex#") | ||
| class AxiomInstanceTestCase(unittest.TestCase): | ||
| def test_axiom_instance(self): | ||
| """ Test axiom instance problem """ | ||
| x = EquivalentObjectProperties(EX.foo, EX.bar) | ||
| self.assertTrue(isinstance_(x, Axiom) if sys.version_info < (3, 10, 0) else isinstance(x, Axiom)) | ||
| if __name__ == '__main__': | ||
| unittest.main() |
@@ -5,3 +5,3 @@ name: Build | ||
| push: | ||
| branches: [ master ] | ||
| branches: [ main ] | ||
@@ -39,3 +39,3 @@ jobs: | ||
| matrix: | ||
| python-version: [ 3.8, 3.9 ] | ||
| python-version: [ 3.8, 3.9, "3.10" ] | ||
@@ -42,0 +42,0 @@ steps: |
+1
-1
@@ -1,1 +0,1 @@ | ||
| hsolbrig <solbrig@jhu.edu> | ||
| Harold Solbrig <solbrig@jhu.edu> |
| Metadata-Version: 1.2 | ||
| Name: funowl | ||
| Version: 0.1.10 | ||
| Version: 0.1.11 | ||
| Summary: Python rendering of the OWL Functional syntax | ||
@@ -5,0 +5,0 @@ Home-page: http://biolink.github.io/hsolbrig |
| bcp47 | ||
| pyjsg>=0.11.6 | ||
| rdflib>=5.0.0,~=5.0 | ||
| rdflib-shim | ||
| rdflib!=6.1.*,>=5.0.0 | ||
| rfc3987 |
@@ -39,2 +39,8 @@ import sys | ||
| # Use the rdflib shim | ||
| from rdflib_shim import RDFLIB_SHIM | ||
| x = RDFLIB_SHIM # Force import to stay put | ||
| # from rdflib.plugins.serializers.turtle import RecursiveSerializer | ||
| # RecursiveSerializer.roundtrip_prefixes = True | ||
| # TODO: Run coverage and test or toss anything that isn't executed | ||
@@ -41,0 +47,0 @@ # TODO: Consider removing the streaming IO feature -- it doesn't seem to do a lot for performance and makes things compicated |
| import logging | ||
| from collections import Iterable, UserList | ||
| from collections.abc import Iterable | ||
| from collections import UserList | ||
| from copy import copy | ||
@@ -4,0 +5,0 @@ from dataclasses import Field, MISSING, field |
@@ -1,2 +0,3 @@ | ||
| from collections import UserList, Iterable | ||
| from collections.abc import Iterable | ||
| from collections import UserList | ||
| from copy import copy | ||
@@ -3,0 +4,0 @@ from dataclasses import field |
+2
-1
@@ -10,5 +10,6 @@ [[source]] | ||
| [packages] | ||
| rdflib = "~=5.0, >=5.0.0" | ||
| rdflib = ">=5.0.0, !=6.1.*" | ||
| rdflib-shim = "*" | ||
| pyjsg = ">=0.11.6" | ||
| rfc3987 = "*" | ||
| bcp47 = "*" |
+47
-24
| { | ||
| "_meta": { | ||
| "hash": { | ||
| "sha256": "5aad704633b1f3aeea78dd70bd24b31643957398e6f75662f26a1904a87e30e2" | ||
| "sha256": "00d611f86cf6fb72afd7bc90b90680e2d83fbfe33450779eae90abdc20b87253" | ||
| }, | ||
@@ -19,5 +19,5 @@ "pipfile-spec": 6, | ||
| "hashes": [ | ||
| "sha256:31f5abdc7faf16a1a6e9bf2eb31565d004359b821b09944436a34361929ae85a" | ||
| "sha256:f224469b4168294902bb1efa80a8bf7855f24c99aef99cbefc1bcd3cce77881b" | ||
| ], | ||
| "version": "==4.9.2" | ||
| "version": "==4.9.3" | ||
| }, | ||
@@ -34,6 +34,6 @@ "bcp47": { | ||
| "hashes": [ | ||
| "sha256:2e364a3d5759479cdb2d37cce6b9376ea504db2ff90252a2e5b7cc89cc9ff2d8", | ||
| "sha256:aa4d33c06640f5352aca96e4b81afd8ab3b47337cc12089822d6f322ac772c81" | ||
| "sha256:0751eece944162659049d35f4f549ed815792b38793f07cf73381c1c87cbed96", | ||
| "sha256:48c5881de7e8b0a0d648cb024c8062dc84e7b840ed81e864c7614fd3c127bde9" | ||
| ], | ||
| "version": "==0.6.0" | ||
| "version": "==0.6.1" | ||
| }, | ||
@@ -49,24 +49,39 @@ "jsonasobj": { | ||
| "hashes": [ | ||
| "sha256:08d9a80f6996af8862e8a2a4e2d90049af695c4ccd84187e7d7a48f600d37952", | ||
| "sha256:3c98d3153a2e4ca8ae8942a4bb213477c68519b145ca2d973648bcb9495208e7" | ||
| "sha256:8679a81c00e2ccb12618adcc2ce5e9a7bef542f4f940ef18e5b7751f5c5a42a4", | ||
| "sha256:b9bf406c87aab4ff62f9372e38b4fcda5cffc0c12385c46a4b01eb83dafd7850" | ||
| ], | ||
| "index": "pypi", | ||
| "version": "==0.11.6" | ||
| "version": "==0.11.9" | ||
| }, | ||
| "pyparsing": { | ||
| "hashes": [ | ||
| "sha256:9e3511118010f112a4b4b435ae50e1eaa610cda191acb9e421d60cf5fde83455", | ||
| "sha256:f8d3fe9fc404576c5164f0f0c4e382c96b85265e023c409c43d48f65da9d60d0" | ||
| "sha256:04ff808a5b90911829c55c4e26f75fa5ca8a2f5f36aa3a51f68e27033341d3e4", | ||
| "sha256:d9bdec0013ef1eb5a84ab39a3b3868911598afa494f5faa038647101504e2b81" | ||
| ], | ||
| "markers": "python_version >= '3.6'", | ||
| "version": "==3.0.3" | ||
| "version": "==3.0.6" | ||
| }, | ||
| "rdflib": { | ||
| "hashes": [ | ||
| "sha256:78149dd49d385efec3b3adfbd61c87afaf1281c30d3fcaf1b323b34f603fb155", | ||
| "sha256:88208ea971a87886d60ae2b1a4b2cdc263527af0454c422118d43fe64b357877" | ||
| "sha256:6136ae056001474ee2aff5fc5b956e62a11c3a9c66bb0f3d9c0aaa5fbb56854e", | ||
| "sha256:b7642daac8cdad1ba157fecb236f5d1b2aa1de64e714dcee80d65e2b794d88a6" | ||
| ], | ||
| "index": "pypi", | ||
| "version": "==5.0.0" | ||
| "version": "==6.0.2" | ||
| }, | ||
| "rdflib-jsonld": { | ||
| "hashes": [ | ||
| "sha256:bcf84317e947a661bae0a3f2aee1eced697075fc4ac4db6065a3340ea0f10fc2", | ||
| "sha256:eda5a42a2e09f80d4da78e32b5c684bccdf275368f1541e6b7bcddfb1382a0e0" | ||
| ], | ||
| "version": "==0.6.1" | ||
| }, | ||
| "rdflib-shim": { | ||
| "hashes": [ | ||
| "sha256:7a853e7750ef1e9bf4e35dea27d54e02d4ed087de5a9e0c329c4a6d82d647081", | ||
| "sha256:d955d11e2986aab42b6830ca56ac6bc9c893abd1d049a161c6de2f1b99d4fc0d" | ||
| ], | ||
| "index": "pypi", | ||
| "version": "==1.0.3" | ||
| }, | ||
| "rfc3987": { | ||
@@ -80,2 +95,10 @@ "hashes": [ | ||
| }, | ||
| "setuptools": { | ||
| "hashes": [ | ||
| "sha256:2404879cda71495fc4d5cbc445ed52fdaddf352b36e40be8dcc63147cb4edabe", | ||
| "sha256:68eb94073fc486091447fcb0501efd6560a0e5a1839ba249e5ff3c4c93f05f90" | ||
| ], | ||
| "markers": "python_version >= '3.7'", | ||
| "version": "==60.5.0" | ||
| }, | ||
| "six": { | ||
@@ -100,7 +123,7 @@ "hashes": [ | ||
| "hashes": [ | ||
| "sha256:e019de665e2bcf9c2b64e2e5aa025fa991da8720daa3c1138cadd2fd1856aed0", | ||
| "sha256:f7af805c321bfa1ce6714c51f254e0d5bb5e5834039bc17db7ebe3a4cec9492b" | ||
| "sha256:876d180e9d7432c5d1dfd4c5d26b72f099d503e8fcc0feb7532c9289be60fcbd", | ||
| "sha256:cb957888737fc0bbcd78e3df769addb41fd1ff8cf950dc9e7ad7793f1bf44455" | ||
| ], | ||
| "markers": "python_version >= '3'", | ||
| "version": "==2.0.7" | ||
| "version": "==2.0.10" | ||
| }, | ||
@@ -117,17 +140,17 @@ "idna": { | ||
| "hashes": [ | ||
| "sha256:6c1246513ecd5ecd4528a0906f910e8f0f9c6b8ec72030dc9fd154dc1a6efd24", | ||
| "sha256:b8aa58f8cf793ffd8782d3d8cb19e66ef36f7aba4353eec859e74678b01b07a7" | ||
| "sha256:68d7c56fd5a8999887728ef304a6d12edc7be74f1cfa47714fc8b414525c9a61", | ||
| "sha256:f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d" | ||
| ], | ||
| "index": "pypi", | ||
| "version": "==2.26.0" | ||
| "version": "==2.27.1" | ||
| }, | ||
| "urllib3": { | ||
| "hashes": [ | ||
| "sha256:4987c65554f7a2dbf30c18fd48778ef124af6fab771a377103da0585e2336ece", | ||
| "sha256:c4fdf4019605b6e5423637e01bc9fe4daef873709a7973e195ceba0a62bbc844" | ||
| "sha256:000ca7f471a233c2251c6c7023ee85305721bfdf18621ebff4fd17a8653427ed", | ||
| "sha256:0e7c33d9a63e7ddfcb86780aac87befc2fbddf46c58dbb487e0855f7ceec283c" | ||
| ], | ||
| "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4'", | ||
| "version": "==1.26.7" | ||
| "version": "==1.26.8" | ||
| } | ||
| } | ||
| } |
+1
-1
| Metadata-Version: 1.2 | ||
| Name: funowl | ||
| Version: 0.1.10 | ||
| Version: 0.1.11 | ||
| Summary: Python rendering of the OWL Functional syntax | ||
@@ -5,0 +5,0 @@ Home-page: http://biolink.github.io/hsolbrig |
+2
-1
@@ -15,3 +15,4 @@ ################################################################################ | ||
| pyjsg>=0.11.6 | ||
| rdflib~=5.0, >=5.0.0 | ||
| rdflib-shim | ||
| rdflib>=5.0.0, !=6.1.* | ||
| rfc3987 |
@@ -8,2 +8,5 @@ import logging | ||
| cwd = os.path.abspath(os.path.dirname(__file__)) | ||
| datadir = os.path.join(cwd, 'data') | ||
| datadir = os.path.join(cwd, 'data') | ||
| # Set this to False if you want to make sure some of the big inputs work | ||
| SKIP_LONG_TESTS = True |
@@ -9,7 +9,4 @@ import os | ||
| from tests import datadir | ||
| from tests import datadir, SKIP_LONG_TESTS | ||
| # Set this to False if you want to make sure some of the big inputs work | ||
| SKIP_LONG_TESTS = True | ||
| OWL_1 = """ | ||
@@ -80,5 +77,2 @@ Prefix(:=<http://www.biopax.org/release/biopax-level3.owl#>) | ||
| # TO Complete -- redirect the part of the stdout that kicks out the errors on URI's | ||
| # Verify that we don't have an error message in it | ||
| # Look up a bit of the OWL that has a PMID in it and make sure that it prints correctly | ||
| txt = StringIO() | ||
@@ -85,0 +79,0 @@ with redirect_stderr(txt): |
| import unittest | ||
| from contextlib import redirect_stderr | ||
| from io import StringIO | ||
| from funowl.converters.functional_converter import to_python | ||
| import requests | ||
@@ -8,0 +6,0 @@ OWL_1 = """ |
@@ -103,3 +103,3 @@ import logging | ||
| expected_rdf = Graph() | ||
| expected_rdf.load(fileloc.replace('.func', '.ttl'), format="turtle") | ||
| expected_rdf.parse(fileloc.replace('.func', '.ttl'), format="turtle") | ||
| actual_rdf_graph = Graph() | ||
@@ -106,0 +106,0 @@ actual_rdf_graph.add = lambda t: add(actual_rdf_graph, t) |
| {"git_version": "0929156", "is_release": false} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
50516923
442.65%2188
0.18%5203
0.7%