diff --git a/CHANGELOG.md b/CHANGELOG.md index 168b39d..59ef909 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,9 +6,15 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p ## [Unreleased] + +### Added + + - defined input and output schema + ### Changed - raise OSError on post result graph error +- removed write_md and produce_graph bool parameters ## [1.0.0beta4] 2024-07-12 diff --git a/cmem_plugin_reason/plugin_reason.py b/cmem_plugin_reason/plugin_reason.py index 66dc6b2..ad4ef8f 100644 --- a/cmem_plugin_reason/plugin_reason.py +++ b/cmem_plugin_reason/plugin_reason.py @@ -12,9 +12,10 @@ from cmem.cmempy.dp.proxy.graph import get from cmem_plugin_base.dataintegration.context import ExecutionContext from cmem_plugin_base.dataintegration.description import Icon, Plugin, PluginParameter -from cmem_plugin_base.dataintegration.entity import Entities +from cmem_plugin_base.dataintegration.entity import Entities, EntityPath, EntitySchema from cmem_plugin_base.dataintegration.parameter.graph import GraphParameterType from cmem_plugin_base.dataintegration.plugins import WorkflowPlugin +from cmem_plugin_base.dataintegration.ports import FixedNumberOfInputs, FixedSchemaPort from cmem_plugin_base.dataintegration.types import BoolParameterType, StringParameterType from cmem_plugin_base.dataintegration.utils import setup_cmempy_user_access from urllib3.exceptions import InsecureRequestWarning @@ -184,12 +185,12 @@ class ReasonPlugin(WorkflowPlugin): """Reason plugin""" - def __init__( # noqa: PLR0913 + def __init__( # noqa: PLR0913, C901 self, data_graph_iri: str = "", ontology_graph_iri: str = "", output_graph_iri: str = "", - reasoner: str = "elk", + reasoner: str = "", class_assertion: bool = False, data_property_characteristic: bool = False, disjoint_classes: bool = False, @@ -265,6 +266,19 @@ def __init__( # noqa: PLR0913 self.input_profiles = input_profiles self.max_ram_percentage = max_ram_percentage + if input_profiles: + self.input_ports = FixedNumberOfInputs([FixedSchemaPort(self.generate_input_schema())]) + else: + self.input_ports = FixedNumberOfInputs([]) + self.output_port = FixedSchemaPort(EntitySchema(type_uri="", paths=[])) + + def generate_input_schema(self) -> EntitySchema: + """Generate the output schema.""" + return EntitySchema( + type_uri="urn:row", + paths=[EntityPath(path="profile"), EntityPath(path="ontology")], + ) + def get_graphs(self, graphs: dict, context: ExecutionContext) -> None: """Get graphs from CMEM""" for graph in graphs: diff --git a/cmem_plugin_reason/plugin_validate.py b/cmem_plugin_reason/plugin_validate.py index 73c482c..55ac901 100644 --- a/cmem_plugin_reason/plugin_validate.py +++ b/cmem_plugin_reason/plugin_validate.py @@ -12,13 +12,9 @@ from cmem.cmempy.workspace.projects.resources.resource import create_resource from cmem_plugin_base.dataintegration.context import ExecutionContext from cmem_plugin_base.dataintegration.description import Icon, Plugin, PluginParameter -from cmem_plugin_base.dataintegration.entity import ( - Entities, - Entity, - EntityPath, - EntitySchema, -) +from cmem_plugin_base.dataintegration.entity import Entities, Entity, EntityPath, EntitySchema from cmem_plugin_base.dataintegration.plugins import WorkflowPlugin +from cmem_plugin_base.dataintegration.ports import FixedNumberOfInputs, FixedSchemaPort from cmem_plugin_base.dataintegration.types import BoolParameterType, StringParameterType from cmem_plugin_base.dataintegration.utils import setup_cmempy_user_access from pathvalidate import is_valid_filename @@ -59,20 +55,6 @@ ONTOLOGY_GRAPH_IRI_PARAMETER, MAX_RAM_PERCENTAGE_PARAMETER, VALIDATE_PROFILES_PARAMETER, - PluginParameter( - param_type=BoolParameterType(), - name="write_md", - label="Write Markdown explanation file", - description="Write Markdown file with explanation to project.", - default_value=False, - ), - PluginParameter( - param_type=BoolParameterType(), - name="produce_graph", - label="Produce output graph", - description="Produce explanation graph.", - default_value=False, - ), PluginParameter( param_type=StringParameterType(), name="output_graph_iri", @@ -104,9 +86,7 @@ def __init__( # noqa: PLR0913 self, ontology_graph_iri: str = "", reasoner: str = "elk", - produce_graph: bool = False, output_graph_iri: str = "", - write_md: bool = False, md_filename: str = "", validate_profile: bool = False, stop_at_inconsistencies: bool = False, @@ -115,13 +95,13 @@ def __init__( # noqa: PLR0913 errors = "" if not validators.url(ontology_graph_iri): errors += 'Invalid IRI for parameter "Ontology graph IRI." ' - if produce_graph and not validators.url(output_graph_iri): + if output_graph_iri and not validators.url(output_graph_iri): errors += 'Invalid IRI for parameter "Output graph IRI". ' - if produce_graph and output_graph_iri == ontology_graph_iri: + if output_graph_iri and output_graph_iri == ontology_graph_iri: errors += "Output graph IRI cannot be the same as the Ontology graph IRI. " if reasoner not in REASONERS: errors += 'Invalid value for parameter "Reasoner". ' - if write_md and not is_valid_filename(md_filename): + if md_filename and not is_valid_filename(md_filename): errors += 'Invalid filename for parameter "Output filename". ' if max_ram_percentage not in range(1, 101): errors += 'Invalid value for parameter "Maximum RAM Percentage". ' @@ -129,14 +109,16 @@ def __init__( # noqa: PLR0913 raise ValueError(errors[:-1]) self.ontology_graph_iri = ontology_graph_iri self.reasoner = reasoner - self.produce_graph = produce_graph self.output_graph_iri = output_graph_iri - self.write_md = write_md self.stop_at_inconsistencies = stop_at_inconsistencies - self.md_filename = md_filename if write_md else "mdfile.md" + self.md_filename = md_filename if md_filename else "mdfile.md" self.validate_profile = validate_profile self.max_ram_percentage = max_ram_percentage + self.input_ports = FixedNumberOfInputs([]) + self.schema = self.generate_output_schema() + self.output_port = FixedSchemaPort(self.schema) + def get_graphs(self, graphs: dict, context: ExecutionContext) -> None: """Get graphs from CMEM""" for graph in graphs: @@ -156,7 +138,7 @@ def explain(self, graphs: dict) -> None: f'--explanation "{self.temp}/{self.md_filename}"' ) - if self.produce_graph: + if self.output_graph_iri: cmd += ( f' annotate --ontology-iri "{self.output_graph_iri}" ' f'--language-annotation rdfs:label "Ontology Validation Result {utctime}" en ' @@ -191,28 +173,32 @@ def add_profiles(self, valid_profiles: list) -> list: if valid_profiles: profiles_str = "\n- ".join(valid_profiles) mdfile.write(f"- {profiles_str}\n") - if self.produce_graph: + if self.output_graph_iri: post_profiles(self, valid_profiles) return valid_profiles + def generate_output_schema(self) -> EntitySchema: + """Generate the output schema.""" + paths = [EntityPath(path="markdown"), EntityPath(path="ontology")] + if self.validate_profile: + paths.append(EntityPath(path="profile")) + return EntitySchema( + type_uri="https://eccenca.com/plugin_validateontology/type", + paths=paths, + ) + def make_entities(self, text: str, valid_profiles: list) -> Entities: """Make entities""" values = [[text], [self.ontology_graph_iri]] - paths = [EntityPath(path="markdown"), EntityPath(path="ontology")] if self.validate_profile: values.append(valid_profiles) - paths.append(EntityPath(path="profile")) entities = [ Entity( uri="https://eccenca.com/plugin_validateontology/result", values=values, ), ] - schema = EntitySchema( - type_uri="https://eccenca.com/plugin_validateontology/type", - paths=paths, - ) - return Entities(entities=entities, schema=schema) + return Entities(entities=entities, schema=self.schema) def _execute(self, context: ExecutionContext) -> Entities: """Run the workflow operator.""" @@ -222,7 +208,7 @@ def _execute(self, context: ExecutionContext) -> Entities: create_xml_catalog_file(self.temp, graphs) self.explain(graphs) - if self.produce_graph: + if self.output_graph_iri: setup_cmempy_user_access(context.user) send_result(self.output_graph_iri, Path(self.temp) / "output.ttl") setup_cmempy_user_access(context.user) @@ -232,7 +218,8 @@ def _execute(self, context: ExecutionContext) -> Entities: self.add_profiles(validate_profiles(self, graphs)) if self.validate_profile else [] ) - if self.write_md: + # if self.write_md: + if self.md_filename: setup_cmempy_user_access(context.user) self.make_resource(context) diff --git a/cmem_plugin_reason/utils.py b/cmem_plugin_reason/utils.py index bd195aa..94dcef4 100644 --- a/cmem_plugin_reason/utils.py +++ b/cmem_plugin_reason/utils.py @@ -45,7 +45,7 @@ name="reasoner", label="Reasoner", description="Reasoner option.", - default_value="elk", + default_value="", ) MAX_RAM_PERCENTAGE_PARAMETER = PluginParameter( diff --git a/poetry.lock b/poetry.lock index c32d200..c47eca0 100644 --- a/poetry.lock +++ b/poetry.lock @@ -485,48 +485,48 @@ files = [ [[package]] name = "memray" -version = "1.13.3" +version = "1.13.4" description = "A memory profiler for Python applications" optional = false python-versions = ">=3.7.0" files = [ - {file = "memray-1.13.3-cp310-cp310-macosx_10_14_x86_64.whl", hash = "sha256:47d2eb555d24e006cd6bac4390627ff227387a9e5cbc4257b08b2842ca202763"}, - {file = "memray-1.13.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:0b32061ef473c35feccf2b65771b3b803bd9f7c2b1c31499ce8dac892f6cb79b"}, - {file = "memray-1.13.3-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:bc5cdde5c0db11bb52ccffe0a155a4324db2d8ffe5a82d222cdc31eea09d927e"}, - {file = "memray-1.13.3-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:8f2856d392e60de240cd024843a4a7902644a2064562390196ad11b87f08e5ed"}, - {file = "memray-1.13.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c644b9408bec95cd66bc1184c46a5dfc084e5305f2b764213bef3438bc75bf63"}, - {file = "memray-1.13.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:e4637da6a98ba546daccc5d033d82f67e8ee1d3e683e8c4d92c4dae94ccf57e9"}, - {file = "memray-1.13.3-cp311-cp311-macosx_10_14_x86_64.whl", hash = "sha256:3d1bbe9208ad5f73c1e327fbe7c42cce4b22a2c656f876944449f817a6f2645c"}, - {file = "memray-1.13.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:26849671728dfbd09c46cfe62e01acb51e6322bc33e3478143d91a5f6b19b6f8"}, - {file = "memray-1.13.3-cp311-cp311-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:d6673df94ddb3216b3ea35ece621e496fcbbaf886edddd2390d63f896a625f55"}, - {file = "memray-1.13.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:86f4ab3d99e3747da26a3ba18884db86ac231789133227a50a8925eceda75c1e"}, - {file = "memray-1.13.3-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c031896590c9b2ec68dcbe05d2d32f4dba1757a46aaffa725a1505afdf956eae"}, - {file = "memray-1.13.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a61155b9b562ffd8485bf171fc656bdb44d429036f90d1739b5d13f9b8c2e50d"}, - {file = "memray-1.13.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:348e06153a2a582019e07c2f773339d64fac6807a05e9c7569c3281215ce5ed4"}, - {file = "memray-1.13.3-cp312-cp312-macosx_10_14_x86_64.whl", hash = "sha256:7377760d9996e92a07bfa9ff4f1d9144c3bc64d144846363fe3b0a19594141f2"}, - {file = "memray-1.13.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:fb77a2b05e22496657cff0692161b2494da69b83d250754377861c484b0f58a6"}, - {file = "memray-1.13.3-cp312-cp312-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:18fb9a6288fcdf054f9130eb94cf029bd69670b5cf961fd670ae02b8dad19331"}, - {file = "memray-1.13.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:772139fbbe48d7a47946b0916ca7c1e20f2d4ae5112dc6e372cce7d997238d81"}, - {file = "memray-1.13.3-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bd064c4bf3e58c872d597036c3c9d4cfd0e360e9b18c22a601864f484771ffd4"}, - {file = "memray-1.13.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c5627ccca0b9b9fcc1a2596486f969d8505dcc7587c73d8b58710aff96ffe3b1"}, - {file = "memray-1.13.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:b1b5e5f33000fe454219f6d3ecc5179d3de667baf4de0438bba5524e7cee62c0"}, - {file = "memray-1.13.3-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:5ef12dbe43815d2b362e32f7672cb8d4a4b89d3e16b1f6272ac34aa4f56ef97e"}, - {file = "memray-1.13.3-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:c796471031ed8d300317141f96308abd6550c5b8d4dd4aebafa07d3c1d193ab8"}, - {file = "memray-1.13.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fc1b6569fdcc352bddf5433bd000b9db4bd5441e9c4afb0c15bdc409370e8cf3"}, - {file = "memray-1.13.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:5828292b53e52c7b77872c351a97d85cc261d6c38f4b6af3b1943591e86151c1"}, - {file = "memray-1.13.3-cp38-cp38-macosx_10_14_x86_64.whl", hash = "sha256:3912adfd99dd8d37d15c5f1f4e2a7e6d9f06db03257a4f25e6da6b87d8dac604"}, - {file = "memray-1.13.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:6ec6ee4197304557c068e9cf0aef9299d9eea414e106d6aef6fb9bca32b88c5f"}, - {file = "memray-1.13.3-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:c4160dd66cd69ef1ad2989b72394c71227b81178deba3ef3941af6055e41feec"}, - {file = "memray-1.13.3-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:7fe9f9a19e22faa1a4101c6c0804b6d8cb6a0e6d040a6e91c4b4f07c88cad7d1"}, - {file = "memray-1.13.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:81d9bbd33856a47800301dbbc5ae51d499107a2cf41542a400d26d7be0ce3c74"}, - {file = "memray-1.13.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:a7419cd8acf5d2e460f70ae62396e65a79cfd3262a655b5fd753a0ef0dee4bc4"}, - {file = "memray-1.13.3-cp39-cp39-macosx_10_14_x86_64.whl", hash = "sha256:549cf4b6ab259bfefabe8b5c688c21d21e3ef6b5e7f9123deee54d84d1334c5d"}, - {file = "memray-1.13.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:8fcc112ed76c3e9d3b1d992fe97e079f51267c601b22bc292ed8a7bc961bd3af"}, - {file = "memray-1.13.3-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:37b87a8ea3e2910286ff6f21dcef7a0044e753a18f6a987a085b728a0ded8f7b"}, - {file = "memray-1.13.3-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f17a4e7c1bd0ed1f890cdc3447567801296b2857b4250d1cd23c40ec929cc50f"}, - {file = "memray-1.13.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:071c5b44ae52f583ba62af0a2cdaeea72a1c2c9513aba53873e32827becc4e1a"}, - {file = "memray-1.13.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:b50ee1121b300371a5686a10fb3ed1a3711fa4fadacb198140e537beb43f176e"}, - {file = "memray-1.13.3.tar.gz", hash = "sha256:3810a5dbafdf91d967255d6ee1ed82928bcbfaf56821eb8745cd630947140281"}, + {file = "memray-1.13.4-cp310-cp310-macosx_10_14_x86_64.whl", hash = "sha256:ed0bfcffbd857cbf78a4db942019e9e153019b754048b0522065844d1c538e8c"}, + {file = "memray-1.13.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fcf71802b2c6d68c5336b1e4ae341eab64dcccd0dcf67687af53f18bc020237b"}, + {file = "memray-1.13.4-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:6c9ae675131492bdfafcc44e86d0b81401ea8d052a9cab7793b1dab642cd58e6"}, + {file = "memray-1.13.4-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:bac9d30ce39aaee40601087d09c1639a071293f414b5e726a152ed3581d25e50"}, + {file = "memray-1.13.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a437c7e28734028a2f43f942c3146e9737033718cea092ea910f6de3cf46221d"}, + {file = "memray-1.13.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:3cae161d5b6769cc3af574cfa0c7ea77f98d6ae714ba5ec508f6f05b84800801"}, + {file = "memray-1.13.4-cp311-cp311-macosx_10_14_x86_64.whl", hash = "sha256:bf407123e175de4f5a7264886eb64ea514f4b388b617f05dfcd857d99ecadd1c"}, + {file = "memray-1.13.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a6f1bd3d0adf84f864e24f74552c1533224e64283dfee33641011acf384fc138"}, + {file = "memray-1.13.4-cp311-cp311-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:ba5bb9a3b7c3c08752f3b55a3b5b360963c9f666e2220eb388ab6f7d1271d843"}, + {file = "memray-1.13.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d1e8cec70e51e81c0e9448e62a5366914b74a3dbb60826cdec8f0e7559e58e74"}, + {file = "memray-1.13.4-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:81497e578017feb57a46e19c349450888e57ff7fb8f0f5134d3e07605c435500"}, + {file = "memray-1.13.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e585d866c82ce92060fa1c925298aa8b89936ca22df9698a25a5f0cf7ca81fa2"}, + {file = "memray-1.13.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:3d048da01dc138711a2c9c70ba693d186690c98fb0ca26fdc3483486d4849238"}, + {file = "memray-1.13.4-cp312-cp312-macosx_10_14_x86_64.whl", hash = "sha256:b6459761046ab46638d2c62d7f3f55eaaf45a947bd1d36dcfb5e860047280557"}, + {file = "memray-1.13.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:637651f5ca2870e9156f189c337e8c6d0002e3f6f7d44d6486ff5baf12a6115e"}, + {file = "memray-1.13.4-cp312-cp312-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:d5b9e10fde6f652ea176cbc0d4d4c563d2831faec4434d3e03c4c0aff8ddc6c0"}, + {file = "memray-1.13.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f1f3ab803b703b9be29259039caf43803ad5abf37f04e77cd9e8373054dd91f6"}, + {file = "memray-1.13.4-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bfdc070da2df9241f78b7429d44f6ee16e924d43eddc587f6ed7218c4cb792d3"}, + {file = "memray-1.13.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:523a63dee71cd4d55eddca866244a045e7549ca5137ec906c62893b87a2161ce"}, + {file = "memray-1.13.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:3bf06f8883a26b779cc828addad97a2d39d7587263e348655dae3ec90b6ee079"}, + {file = "memray-1.13.4-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:ee47b798d5712faa2a38ff60b5c77f73ed8342709e15bd6ed3a46edd9feee089"}, + {file = "memray-1.13.4-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:daed9ae6ceea6a4dcc96ac62cfa00d90f7365ed54ee90886e5287251855a2c02"}, + {file = "memray-1.13.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cc194c5564f5b33d33bbbeca54b0e3f637d985a144c3551f887bf668d896ffec"}, + {file = "memray-1.13.4-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:554cda50101a14e1bca2453bd1013949cdc4ebcd4709065139955578f8b0c354"}, + {file = "memray-1.13.4-cp38-cp38-macosx_10_14_x86_64.whl", hash = "sha256:e3e261995acc40f8bd4a10740b25f37eccc3e413449ceb73263216ec3c6fee7b"}, + {file = "memray-1.13.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:5e8ef7cc755a5a3a4b5d9991cf70428220e9138bc5967b5764b2fa7a1fb4d7a6"}, + {file = "memray-1.13.4-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:7c8ea410c842a31ee07e76b409c273d23e0b670d166c2330488d1164ab42a4d1"}, + {file = "memray-1.13.4-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:22c9656c78a50b4569a8273d062cc6c139e9f7cfec3f793e60ef7e0cb46c2a76"}, + {file = "memray-1.13.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7096401ff3b7ce5f759e45bd71b0899ad50a607924ee23ad02423aa4fa505f52"}, + {file = "memray-1.13.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:2072a454846e055d5833d17b1f5e6106ae18e425974c3968276a1952b0156f2b"}, + {file = "memray-1.13.4-cp39-cp39-macosx_10_14_x86_64.whl", hash = "sha256:f19fb4a20d796af869691531d2d6540d27bfbf0df9118bd17e547a23224a8b3e"}, + {file = "memray-1.13.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b1331de55aab1c409ec295b155770487004e0c6d08db0fe903e9377be978bacd"}, + {file = "memray-1.13.4-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:f43bfa96114012d76025a0ee42206c7d914b6113c491dc221e1b7a901c51242a"}, + {file = "memray-1.13.4-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:e0cc6299a09d3c51fd1a45bd816e9dd68a7092a3eaf62aeaa2ee01068f2a1d0b"}, + {file = "memray-1.13.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4cbaa39bf7041e32282ad84a9fd9bd98622f78f649ccb7d1075382fed84e8125"}, + {file = "memray-1.13.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:59bba975fbbced85fe6f61685aef459777faf3b8a5b4f0de4fa5b99cf6f1a5e7"}, + {file = "memray-1.13.4.tar.gz", hash = "sha256:48f8f9b89b3a84028668244151eb7248189fb3f4f2a761ec1211439adcbb2ad1"}, ] [package.dependencies] @@ -543,43 +543,43 @@ test = ["Cython", "greenlet", "ipython", "pytest", "pytest-cov", "pytest-textual [[package]] name = "mypy" -version = "1.10.1" +version = "1.11.0" description = "Optional static typing for Python" optional = false python-versions = ">=3.8" files = [ - {file = "mypy-1.10.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e36f229acfe250dc660790840916eb49726c928e8ce10fbdf90715090fe4ae02"}, - {file = "mypy-1.10.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:51a46974340baaa4145363b9e051812a2446cf583dfaeba124af966fa44593f7"}, - {file = "mypy-1.10.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:901c89c2d67bba57aaaca91ccdb659aa3a312de67f23b9dfb059727cce2e2e0a"}, - {file = "mypy-1.10.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0cd62192a4a32b77ceb31272d9e74d23cd88c8060c34d1d3622db3267679a5d9"}, - {file = "mypy-1.10.1-cp310-cp310-win_amd64.whl", hash = "sha256:a2cbc68cb9e943ac0814c13e2452d2046c2f2b23ff0278e26599224cf164e78d"}, - {file = "mypy-1.10.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:bd6f629b67bb43dc0d9211ee98b96d8dabc97b1ad38b9b25f5e4c4d7569a0c6a"}, - {file = "mypy-1.10.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a1bbb3a6f5ff319d2b9d40b4080d46cd639abe3516d5a62c070cf0114a457d84"}, - {file = "mypy-1.10.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8edd4e9bbbc9d7b79502eb9592cab808585516ae1bcc1446eb9122656c6066f"}, - {file = "mypy-1.10.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:6166a88b15f1759f94a46fa474c7b1b05d134b1b61fca627dd7335454cc9aa6b"}, - {file = "mypy-1.10.1-cp311-cp311-win_amd64.whl", hash = "sha256:5bb9cd11c01c8606a9d0b83ffa91d0b236a0e91bc4126d9ba9ce62906ada868e"}, - {file = "mypy-1.10.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:d8681909f7b44d0b7b86e653ca152d6dff0eb5eb41694e163c6092124f8246d7"}, - {file = "mypy-1.10.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:378c03f53f10bbdd55ca94e46ec3ba255279706a6aacaecac52ad248f98205d3"}, - {file = "mypy-1.10.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6bacf8f3a3d7d849f40ca6caea5c055122efe70e81480c8328ad29c55c69e93e"}, - {file = "mypy-1.10.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:701b5f71413f1e9855566a34d6e9d12624e9e0a8818a5704d74d6b0402e66c04"}, - {file = "mypy-1.10.1-cp312-cp312-win_amd64.whl", hash = "sha256:3c4c2992f6ea46ff7fce0072642cfb62af7a2484efe69017ed8b095f7b39ef31"}, - {file = "mypy-1.10.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:604282c886497645ffb87b8f35a57ec773a4a2721161e709a4422c1636ddde5c"}, - {file = "mypy-1.10.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:37fd87cab83f09842653f08de066ee68f1182b9b5282e4634cdb4b407266bade"}, - {file = "mypy-1.10.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8addf6313777dbb92e9564c5d32ec122bf2c6c39d683ea64de6a1fd98b90fe37"}, - {file = "mypy-1.10.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5cc3ca0a244eb9a5249c7c583ad9a7e881aa5d7b73c35652296ddcdb33b2b9c7"}, - {file = "mypy-1.10.1-cp38-cp38-win_amd64.whl", hash = "sha256:1b3a2ffce52cc4dbaeee4df762f20a2905aa171ef157b82192f2e2f368eec05d"}, - {file = "mypy-1.10.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:fe85ed6836165d52ae8b88f99527d3d1b2362e0cb90b005409b8bed90e9059b3"}, - {file = "mypy-1.10.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c2ae450d60d7d020d67ab440c6e3fae375809988119817214440033f26ddf7bf"}, - {file = "mypy-1.10.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6be84c06e6abd72f960ba9a71561c14137a583093ffcf9bbfaf5e613d63fa531"}, - {file = "mypy-1.10.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:2189ff1e39db399f08205e22a797383613ce1cb0cb3b13d8bcf0170e45b96cc3"}, - {file = "mypy-1.10.1-cp39-cp39-win_amd64.whl", hash = "sha256:97a131ee36ac37ce9581f4220311247ab6cba896b4395b9c87af0675a13a755f"}, - {file = "mypy-1.10.1-py3-none-any.whl", hash = "sha256:71d8ac0b906354ebda8ef1673e5fde785936ac1f29ff6987c7483cfbd5a4235a"}, - {file = "mypy-1.10.1.tar.gz", hash = "sha256:1f8f492d7db9e3593ef42d4f115f04e556130f2819ad33ab84551403e97dd4c0"}, + {file = "mypy-1.11.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:a3824187c99b893f90c845bab405a585d1ced4ff55421fdf5c84cb7710995229"}, + {file = "mypy-1.11.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:96f8dbc2c85046c81bcddc246232d500ad729cb720da4e20fce3b542cab91287"}, + {file = "mypy-1.11.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1a5d8d8dd8613a3e2be3eae829ee891b6b2de6302f24766ff06cb2875f5be9c6"}, + {file = "mypy-1.11.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:72596a79bbfb195fd41405cffa18210af3811beb91ff946dbcb7368240eed6be"}, + {file = "mypy-1.11.0-cp310-cp310-win_amd64.whl", hash = "sha256:35ce88b8ed3a759634cb4eb646d002c4cef0a38f20565ee82b5023558eb90c00"}, + {file = "mypy-1.11.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:98790025861cb2c3db8c2f5ad10fc8c336ed2a55f4daf1b8b3f877826b6ff2eb"}, + {file = "mypy-1.11.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:25bcfa75b9b5a5f8d67147a54ea97ed63a653995a82798221cca2a315c0238c1"}, + {file = "mypy-1.11.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0bea2a0e71c2a375c9fa0ede3d98324214d67b3cbbfcbd55ac8f750f85a414e3"}, + {file = "mypy-1.11.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d2b3d36baac48e40e3064d2901f2fbd2a2d6880ec6ce6358825c85031d7c0d4d"}, + {file = "mypy-1.11.0-cp311-cp311-win_amd64.whl", hash = "sha256:d8e2e43977f0e09f149ea69fd0556623919f816764e26d74da0c8a7b48f3e18a"}, + {file = "mypy-1.11.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:1d44c1e44a8be986b54b09f15f2c1a66368eb43861b4e82573026e04c48a9e20"}, + {file = "mypy-1.11.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:cea3d0fb69637944dd321f41bc896e11d0fb0b0aa531d887a6da70f6e7473aba"}, + {file = "mypy-1.11.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a83ec98ae12d51c252be61521aa5731f5512231d0b738b4cb2498344f0b840cd"}, + {file = "mypy-1.11.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:c7b73a856522417beb78e0fb6d33ef89474e7a622db2653bc1285af36e2e3e3d"}, + {file = "mypy-1.11.0-cp312-cp312-win_amd64.whl", hash = "sha256:f2268d9fcd9686b61ab64f077be7ffbc6fbcdfb4103e5dd0cc5eaab53a8886c2"}, + {file = "mypy-1.11.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:940bfff7283c267ae6522ef926a7887305945f716a7704d3344d6d07f02df850"}, + {file = "mypy-1.11.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:14f9294528b5f5cf96c721f231c9f5b2733164e02c1c018ed1a0eff8a18005ac"}, + {file = "mypy-1.11.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d7b54c27783991399046837df5c7c9d325d921394757d09dbcbf96aee4649fe9"}, + {file = "mypy-1.11.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:65f190a6349dec29c8d1a1cd4aa71284177aee5949e0502e6379b42873eddbe7"}, + {file = "mypy-1.11.0-cp38-cp38-win_amd64.whl", hash = "sha256:dbe286303241fea8c2ea5466f6e0e6a046a135a7e7609167b07fd4e7baf151bf"}, + {file = "mypy-1.11.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:104e9c1620c2675420abd1f6c44bab7dd33cc85aea751c985006e83dcd001095"}, + {file = "mypy-1.11.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f006e955718ecd8d159cee9932b64fba8f86ee6f7728ca3ac66c3a54b0062abe"}, + {file = "mypy-1.11.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:becc9111ca572b04e7e77131bc708480cc88a911adf3d0239f974c034b78085c"}, + {file = "mypy-1.11.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:6801319fe76c3f3a3833f2b5af7bd2c17bb93c00026a2a1b924e6762f5b19e13"}, + {file = "mypy-1.11.0-cp39-cp39-win_amd64.whl", hash = "sha256:c1a184c64521dc549324ec6ef7cbaa6b351912be9cb5edb803c2808a0d7e85ac"}, + {file = "mypy-1.11.0-py3-none-any.whl", hash = "sha256:56913ec8c7638b0091ef4da6fcc9136896914a9d60d54670a75880c3e5b99ace"}, + {file = "mypy-1.11.0.tar.gz", hash = "sha256:93743608c7348772fdc717af4aeee1997293a1ad04bc0ea6efa15bf65385c538"}, ] [package.dependencies] mypy-extensions = ">=1.0.0" -typing-extensions = ">=4.1.0" +typing-extensions = ">=4.6.0" [package.extras] dmypy = ["psutil (>=4.0)"] @@ -850,13 +850,13 @@ test = ["assertpy (>=1.1)", "beautifulsoup4 (>=4.11.1)", "black (>=22.1.0)", "fl [[package]] name = "pytest-memray" -version = "1.6.0" +version = "1.7.0" description = "A simple plugin to use with pytest" optional = false python-versions = ">=3.8" files = [ - {file = "pytest_memray-1.6.0-py3-none-any.whl", hash = "sha256:267db3f9d3ad3e443c6743e5261ce64caff3e2e8d632850b58c0ae0925fed765"}, - {file = "pytest_memray-1.6.0.tar.gz", hash = "sha256:364152252afd563fc8b58459325f360030d2b0d5673896018a68badb35402339"}, + {file = "pytest_memray-1.7.0-py3-none-any.whl", hash = "sha256:b896718c1adf6d0cd339dfaaaa5620f035c9919e1199a79b3453804a1254306f"}, + {file = "pytest_memray-1.7.0.tar.gz", hash = "sha256:c18fa907d2210b42f4096c093e2d3416dfc002dcaa450ef3f9ba819bc3dd8f5f"}, ] [package.dependencies] @@ -866,7 +866,7 @@ pytest = ">=7.2" [package.extras] docs = ["furo (>=2022.12.7)", "sphinx (>=6.1.3)", "sphinx-argparse (>=0.4)", "sphinx-inline-tabs (>=2022.1.2b11)", "sphinxcontrib-programoutput (>=0.17)", "towncrier (>=22.12)"] lint = ["black (==22.12)", "isort (==5.11.4)", "mypy (==0.991)", "ruff (==0.0.272)"] -test = ["covdefaults (>=2.2.2)", "coverage (>=7.0.5)", "flaky (>=3.7)", "pytest (>=7.2)", "pytest-xdist (>=3.1)"] +test = ["anyio (>=4.4.0)", "covdefaults (>=2.2.2)", "coverage (>=7.0.5)", "flaky (>=3.7)", "pytest (>=7.2)", "pytest-xdist (>=3.1)"] [[package]] name = "pytest-metadata" @@ -1033,18 +1033,19 @@ setuptools = "*" [[package]] name = "setuptools" -version = "70.3.0" +version = "71.1.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "setuptools-70.3.0-py3-none-any.whl", hash = "sha256:fe384da74336c398e0d956d1cae0669bc02eed936cdb1d49b57de1990dc11ffc"}, - {file = "setuptools-70.3.0.tar.gz", hash = "sha256:f171bab1dfbc86b132997f26a119f6056a57950d058587841a0082e8830f9dc5"}, + {file = "setuptools-71.1.0-py3-none-any.whl", hash = "sha256:33874fdc59b3188304b2e7c80d9029097ea31627180896fb549c578ceb8a0855"}, + {file = "setuptools-71.1.0.tar.gz", hash = "sha256:032d42ee9fb536e33087fb66cac5f840eb9391ed05637b3f2a76a7c8fb477936"}, ] [package.extras] +core = ["importlib-metadata (>=6)", "importlib-resources (>=5.10.2)", "jaraco.text (>=3.7)", "more-itertools (>=8.8)", "ordered-set (>=3.1.1)", "packaging (>=24)", "platformdirs (>=2.6.2)", "tomli (>=2.0.1)", "wheel (>=0.43.0)"] doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] -test = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "jaraco.test", "mypy (==1.10.0)", "packaging (>=23.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.*)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf", "pytest-ruff (>=0.3.2)", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] +test = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "jaraco.test", "mypy (==1.11.*)", "packaging (>=23.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.*)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf", "pytest-ruff (<0.4)", "pytest-ruff (>=0.2.1)", "pytest-ruff (>=0.3.2)", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] [[package]] name = "six" @@ -1059,13 +1060,13 @@ files = [ [[package]] name = "textual" -version = "0.72.0" +version = "0.74.0" description = "Modern Text User Interface framework" optional = false -python-versions = "<4.0,>=3.8" +python-versions = "<4.0.0,>=3.8.1" files = [ - {file = "textual-0.72.0-py3-none-any.whl", hash = "sha256:a9886eb96bd6391b8795244d2b8fe592204556c42264ea7513a1211584e17366"}, - {file = "textual-0.72.0.tar.gz", hash = "sha256:14174ce8d49016a85aa6c0669d0881b5419e98cf46d429f263314295409ed262"}, + {file = "textual-0.74.0-py3-none-any.whl", hash = "sha256:69b18904d11400e586274deb1270f5db7b4254a2ac00fe805f23b16c324345e4"}, + {file = "textual-0.74.0.tar.gz", hash = "sha256:808c4e8727283ef84a123620449b217b6033ffde49f3ed195b3d0f98bb042969"}, ] [package.dependencies] diff --git a/tests/test_reason.py b/tests/test_reason.py index 314c3a8..ec51a21 100644 --- a/tests/test_reason.py +++ b/tests/test_reason.py @@ -88,9 +88,7 @@ def test_reasoner(reasoner: str, err_list: list) -> list: def test_validate(errors: str) -> str: result = ValidatePlugin( ontology_graph_iri=VALIDATE_ONTOLOGY_GRAPH_IRI, - produce_graph=True, output_graph_iri=OUTPUT_GRAPH_IRI, - write_md=True, validate_profile=True, md_filename=MD_FILENAME, ).execute((), context=TestExecutionContext(PROJECT_ID))