From 350d651822cdcfa1b67b3c867f429973a7f43a87 Mon Sep 17 00:00:00 2001 From: cmungall Date: Tue, 2 Jan 2024 18:07:22 -0800 Subject: [PATCH] lint --- notebooks/Tutorial.ipynb | 92 +++++++++---------- src/linkml_transformer/session.py | 2 +- .../test_object_transformer.py | 2 +- 3 files changed, 48 insertions(+), 48 deletions(-) diff --git a/notebooks/Tutorial.ipynb b/notebooks/Tutorial.ipynb index 3d2974e..84008af 100644 --- a/notebooks/Tutorial.ipynb +++ b/notebooks/Tutorial.ipynb @@ -24,8 +24,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-03T02:03:47.468801Z", - "start_time": "2024-01-03T02:03:47.442848Z" + "end_time": "2024-01-03T02:07:05.802136Z", + "start_time": "2024-01-03T02:07:05.768310Z" } }, "id": "63a064b31f623bdd" @@ -97,8 +97,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-03T02:03:47.736863Z", - "start_time": "2024-01-03T02:03:47.473474Z" + "end_time": "2024-01-03T02:07:06.074890Z", + "start_time": "2024-01-03T02:07:05.802747Z" } }, "id": "ef2c60ef7fbcbe20" @@ -136,8 +136,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-03T02:03:47.806549Z", - "start_time": "2024-01-03T02:03:47.736781Z" + "end_time": "2024-01-03T02:07:06.134479Z", + "start_time": "2024-01-03T02:07:06.074052Z" } }, "id": "a6257aa9e6ab021e" @@ -166,8 +166,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-03T02:03:48.040675Z", - "start_time": "2024-01-03T02:03:47.847069Z" + "end_time": "2024-01-03T02:07:06.368605Z", + "start_time": "2024-01-03T02:07:06.138171Z" } }, "id": "47b95e209790b423" @@ -191,7 +191,7 @@ { "data": { "image/svg+xml": "\n\n\n\n\n\n\n\n\nsourcePerson\n\nPerson\n\nfamily_name : string\n\ngiven_name : string\n\nage_in_years : integer\n\nheight_in_cm : float\n\n\n\ntargetIndividual\n\nIndividual\n\nfamily_name : string\n\ngiven_name : string\n\nage : integer\n\nheight : float\n\n\n\nsourcePerson:family_name->targetIndividual:family_name\n\n\n\n\n\nsourcePerson:given_name->targetIndividual:given_name\n\n\n\n\n\nsourcePerson:age_in_years->targetIndividual:age\n\n\n\n\n\nsourcePerson:height_in_cm->targetIndividual:height\n\n\n\n\n\n", - "text/plain": "" + "text/plain": "" }, "execution_count": 5, "metadata": {}, @@ -204,8 +204,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-03T02:03:48.389835Z", - "start_time": "2024-01-03T02:03:48.043124Z" + "end_time": "2024-01-03T02:07:06.816125Z", + "start_time": "2024-01-03T02:07:06.369496Z" } }, "id": "1c623cdc3c1cfbca" @@ -249,8 +249,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-03T02:03:48.401199Z", - "start_time": "2024-01-03T02:03:48.396533Z" + "end_time": "2024-01-03T02:07:06.829871Z", + "start_time": "2024-01-03T02:07:06.823308Z" } }, "id": "9f4d1fc4ca97f80c" @@ -336,8 +336,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-03T02:03:48.424849Z", - "start_time": "2024-01-03T02:03:48.400132Z" + "end_time": "2024-01-03T02:07:06.853312Z", + "start_time": "2024-01-03T02:07:06.832158Z" } }, "id": "687912c18bf6752" @@ -398,8 +398,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-03T02:03:48.467138Z", - "start_time": "2024-01-03T02:03:48.465161Z" + "end_time": "2024-01-03T02:07:06.903169Z", + "start_time": "2024-01-03T02:07:06.848243Z" } }, "id": "789a7b6535ab410f" @@ -422,7 +422,7 @@ { "data": { "image/svg+xml": "\n\n\n\n\n\n\n\n\nsourcePerson\n\nPerson\n\nfamily_name : string\n\ngiven_name : string\n\nage_in_years : integer\n\nheight_in_cm : float\n\n\n\ntargetIndividual\n\nIndividual\n\nname : string\n\nage_in_months : string\n\nheight_in_meters : string\n\n\n\nsourcePerson:given_name->targetIndividual:name\n\n\n\n\n\nsourcePerson:family_name->targetIndividual:name\n\n\n\n\n\nsourcePerson:age_in_years->targetIndividual:age_in_months\n\n\n\n\n\nsourcePerson:height_in_cm->targetIndividual:height_in_meters\n\n\n\n\n\n", - "text/plain": "" + "text/plain": "" }, "execution_count": 9, "metadata": {}, @@ -435,8 +435,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-03T02:03:48.749473Z", - "start_time": "2024-01-03T02:03:48.474494Z" + "end_time": "2024-01-03T02:07:07.250708Z", + "start_time": "2024-01-03T02:07:06.913474Z" } }, "id": "2a18ccb5d7dc469b" @@ -470,8 +470,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-03T02:03:48.756162Z", - "start_time": "2024-01-03T02:03:48.751935Z" + "end_time": "2024-01-03T02:07:07.250930Z", + "start_time": "2024-01-03T02:07:07.244685Z" } }, "id": "5e20e98e2b23751f" @@ -528,8 +528,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-03T02:03:48.763217Z", - "start_time": "2024-01-03T02:03:48.759698Z" + "end_time": "2024-01-03T02:07:07.256503Z", + "start_time": "2024-01-03T02:07:07.252109Z" } }, "id": "7c1f7efef1836364" @@ -608,8 +608,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-03T02:03:48.806746Z", - "start_time": "2024-01-03T02:03:48.772586Z" + "end_time": "2024-01-03T02:07:07.271763Z", + "start_time": "2024-01-03T02:07:07.266055Z" } }, "id": "65a5ce5d97e27f76" @@ -649,8 +649,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-03T02:03:48.834504Z", - "start_time": "2024-01-03T02:03:48.821147Z" + "end_time": "2024-01-03T02:07:07.329627Z", + "start_time": "2024-01-03T02:07:07.293054Z" } }, "id": "bc99bad97970b1b7" @@ -674,8 +674,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-03T02:03:49.116895Z", - "start_time": "2024-01-03T02:03:48.838545Z" + "end_time": "2024-01-03T02:07:07.635126Z", + "start_time": "2024-01-03T02:07:07.330891Z" } }, "id": "831b444d9c47e0ea" @@ -734,8 +734,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-03T02:03:49.123023Z", - "start_time": "2024-01-03T02:03:49.119216Z" + "end_time": "2024-01-03T02:07:07.640576Z", + "start_time": "2024-01-03T02:07:07.635834Z" } }, "id": "b589e0e95550962d" @@ -760,8 +760,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-03T02:03:49.125268Z", - "start_time": "2024-01-03T02:03:49.123133Z" + "end_time": "2024-01-03T02:07:07.645267Z", + "start_time": "2024-01-03T02:07:07.640190Z" } }, "id": "f492b27c0f0fbf88" @@ -776,8 +776,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-03T02:03:49.128462Z", - "start_time": "2024-01-03T02:03:49.126778Z" + "end_time": "2024-01-03T02:07:07.648640Z", + "start_time": "2024-01-03T02:07:07.643720Z" } }, "id": "3ac3f93ab8561300" @@ -792,8 +792,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-03T02:03:49.150469Z", - "start_time": "2024-01-03T02:03:49.136088Z" + "end_time": "2024-01-03T02:07:07.683985Z", + "start_time": "2024-01-03T02:07:07.654269Z" } }, "id": "84262d357323f76e" @@ -825,8 +825,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-03T02:03:49.193334Z", - "start_time": "2024-01-03T02:03:49.160562Z" + "end_time": "2024-01-03T02:07:07.715300Z", + "start_time": "2024-01-03T02:07:07.674231Z" } }, "id": "2f282430f48e13c0" @@ -858,8 +858,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-03T02:03:49.224701Z", - "start_time": "2024-01-03T02:03:49.196222Z" + "end_time": "2024-01-03T02:07:07.747368Z", + "start_time": "2024-01-03T02:07:07.716444Z" } }, "id": "fdd23ae82909770e" @@ -909,8 +909,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-03T02:03:49.266887Z", - "start_time": "2024-01-03T02:03:49.223609Z" + "end_time": "2024-01-03T02:07:07.789903Z", + "start_time": "2024-01-03T02:07:07.759627Z" } }, "id": "e8c1c3f98081d38" @@ -923,8 +923,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-01-03T02:03:49.269348Z", - "start_time": "2024-01-03T02:03:49.266616Z" + "end_time": "2024-01-03T02:07:07.793832Z", + "start_time": "2024-01-03T02:07:07.788230Z" } }, "id": "ee14ace4b1c7d256" diff --git a/src/linkml_transformer/session.py b/src/linkml_transformer/session.py index 036e08c..6c782ec 100644 --- a/src/linkml_transformer/session.py +++ b/src/linkml_transformer/session.py @@ -11,7 +11,7 @@ from linkml_transformer import ObjectTransformer from linkml_transformer.inference.inverter import TransformationSpecificationInverter from linkml_transformer.inference.schema_mapper import SchemaMapper -from project.transformer_model import TransformationSpecification +from linkml_transformer.datamodel.transformer_model import TransformationSpecification logger = logging.getLogger(__name__) diff --git a/tests/test_transformer/test_object_transformer.py b/tests/test_transformer/test_object_transformer.py index c9eb679..5630979 100644 --- a/tests/test_transformer/test_object_transformer.py +++ b/tests/test_transformer/test_object_transformer.py @@ -295,7 +295,7 @@ def test_denormalized_transform_dict(self): assert mset["entities"] == {"X:1": {"name": "x1"}, "Y:1": {"name": "y1"}} tr.index(mset, "MappingSet") target_obj = tr.transform(mset, source_type="MappingSet") - assert type(target_obj) == dict + assert isinstance(target_obj, dict) assert target_obj["mappings"][0] == { "subject_id": "X:1", "subject_name": "x1",