Skip to content

Commit

Permalink
Merge pull request #18 from linkml/issue-15
Browse files Browse the repository at this point in the history
Use ucumvert as a UCUM to Pint bridge. Fixes #15
  • Loading branch information
cmungall authored Jan 18, 2024
2 parents fe56019 + cf1478d commit 71c91ff
Show file tree
Hide file tree
Showing 6 changed files with 1,747 additions and 1,363 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ See [tests/test_mapper/test_schema_mapper.py](tests/test_schema_mapper/test_sche
## Not supported

- Aggregation
- ...

## Why another framework?

Expand Down Expand Up @@ -337,6 +338,7 @@ precise mappings between *entities* (e.g. schema.org Person is the same as DBPed
that many people wanted to extend the language to perform more complex mappings. To address this, we
help a workshop at the Biocuration conference in Padua, Italy in 2022.

- [Discussion](https://github.com/orgs/linkml/discussions/1829)
- [SSSOM paper](https://academic.oup.com/database/article/doi/10.1093/database/baac035/6591806)
- [SSSOM Update 2023](https://ceur-ws.org/Vol-3591/om2023_STpaper3.pdf)
- [SSSOM Complex Mappings Workshop 2023](https://www.youtube.com/playlist?list=PLqu_J7ADQtKyX55F7RqZtaSS7TwGd3MoR)
Expand Down
92 changes: 46 additions & 46 deletions notebooks/Tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2024-01-03T02:07:05.802136Z",
"start_time": "2024-01-03T02:07:05.768310Z"
"end_time": "2024-01-17T22:29:59.302402Z",
"start_time": "2024-01-17T22:29:58.965289Z"
}
},
"id": "63a064b31f623bdd"
Expand Down Expand Up @@ -97,8 +97,8 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2024-01-03T02:07:06.074890Z",
"start_time": "2024-01-03T02:07:05.802747Z"
"end_time": "2024-01-17T22:29:59.378265Z",
"start_time": "2024-01-17T22:29:58.988218Z"
}
},
"id": "ef2c60ef7fbcbe20"
Expand Down Expand Up @@ -136,8 +136,8 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2024-01-03T02:07:06.134479Z",
"start_time": "2024-01-03T02:07:06.074052Z"
"end_time": "2024-01-17T22:30:01.239725Z",
"start_time": "2024-01-17T22:29:59.312872Z"
}
},
"id": "a6257aa9e6ab021e"
Expand Down Expand Up @@ -166,8 +166,8 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2024-01-03T02:07:06.368605Z",
"start_time": "2024-01-03T02:07:06.138171Z"
"end_time": "2024-01-17T22:30:01.484509Z",
"start_time": "2024-01-17T22:30:01.238874Z"
}
},
"id": "47b95e209790b423"
Expand All @@ -191,7 +191,7 @@
{
"data": {
"image/svg+xml": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Generated by graphviz version 5.0.1 (20220820.1526)\n -->\n<!-- Pages: 1 -->\n<svg width=\"324pt\" height=\"121pt\"\n viewBox=\"0.00 0.00 324.00 121.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 117)\">\n<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-117 320,-117 320,4 -4,4\"/>\n<!-- sourcePerson -->\n<g id=\"node1\" class=\"node\">\n<title>sourcePerson</title>\n<polygon fill=\"none\" stroke=\"black\" points=\"8.5,-87.5 8.5,-108.5 135.5,-108.5 135.5,-87.5 8.5,-87.5\"/>\n<text text-anchor=\"start\" x=\"52\" y=\"-95.3\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\">Person</text>\n<polyline fill=\"none\" stroke=\"black\" points=\"8.5,-87.5 8.5,-66.5 135.5,-66.5 135.5,-87.5\"/>\n<text text-anchor=\"start\" x=\"14.5\" y=\"-73.3\" font-family=\"Times,serif\" font-size=\"14.00\">family_name : string</text>\n<polyline fill=\"none\" stroke=\"black\" points=\"8.5,-66.5 8.5,-45.5 135.5,-45.5 135.5,-66.5\"/>\n<text text-anchor=\"start\" x=\"17.5\" y=\"-52.3\" font-family=\"Times,serif\" font-size=\"14.00\">given_name : string</text>\n<polyline fill=\"none\" stroke=\"black\" points=\"8.5,-45.5 8.5,-24.5 135.5,-24.5 135.5,-45.5\"/>\n<text text-anchor=\"start\" x=\"11.5\" y=\"-31.3\" font-family=\"Times,serif\" font-size=\"14.00\">age_in_years : integer</text>\n<polyline fill=\"none\" stroke=\"black\" points=\"8.5,-24.5 8.5,-3.5 135.5,-3.5 135.5,-24.5\"/>\n<text text-anchor=\"start\" x=\"16\" y=\"-10.3\" font-family=\"Times,serif\" font-size=\"14.00\">height_in_cm : float</text>\n</g>\n<!-- targetIndividual -->\n<g id=\"node2\" class=\"node\">\n<title>targetIndividual</title>\n<polygon fill=\"none\" stroke=\"black\" points=\"187.5,-87.5 187.5,-108.5 308.5,-108.5 308.5,-87.5 187.5,-87.5\"/>\n<text text-anchor=\"start\" x=\"217.5\" y=\"-95.3\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\">Individual</text>\n<polyline fill=\"none\" stroke=\"black\" points=\"187.5,-87.5 187.5,-66.5 308.5,-66.5 308.5,-87.5\"/>\n<text text-anchor=\"start\" x=\"190.5\" y=\"-73.3\" font-family=\"Times,serif\" font-size=\"14.00\">family_name : string</text>\n<polyline fill=\"none\" stroke=\"black\" points=\"187.5,-66.5 187.5,-45.5 308.5,-45.5 308.5,-66.5\"/>\n<text text-anchor=\"start\" x=\"193.5\" y=\"-52.3\" font-family=\"Times,serif\" font-size=\"14.00\">given_name : string</text>\n<polyline fill=\"none\" stroke=\"black\" points=\"187.5,-45.5 187.5,-24.5 308.5,-24.5 308.5,-45.5\"/>\n<text text-anchor=\"start\" x=\"214\" y=\"-31.3\" font-family=\"Times,serif\" font-size=\"14.00\">age : integer</text>\n<polyline fill=\"none\" stroke=\"black\" points=\"187.5,-24.5 187.5,-3.5 308.5,-3.5 308.5,-24.5\"/>\n<text text-anchor=\"start\" x=\"213\" y=\"-10.3\" font-family=\"Times,serif\" font-size=\"14.00\">height : float</text>\n</g>\n<!-- sourcePerson&#45;&gt;targetIndividual -->\n<g id=\"edge1\" class=\"edge\">\n<title>sourcePerson:family_name&#45;&gt;targetIndividual:family_name</title>\n<path fill=\"none\" stroke=\"black\" d=\"M136.5,-77.5C154.9,-77.5 161.88,-77.5 176.35,-77.5\"/>\n<polygon fill=\"black\" stroke=\"black\" points=\"176.5,-81 186.5,-77.5 176.5,-74 176.5,-81\"/>\n</g>\n<!-- sourcePerson&#45;&gt;targetIndividual -->\n<g id=\"edge2\" class=\"edge\">\n<title>sourcePerson:given_name&#45;&gt;targetIndividual:given_name</title>\n<path fill=\"none\" stroke=\"black\" d=\"M136.5,-55.5C154.9,-55.5 161.88,-55.5 176.35,-55.5\"/>\n<polygon fill=\"black\" stroke=\"black\" points=\"176.5,-59 186.5,-55.5 176.5,-52 176.5,-59\"/>\n</g>\n<!-- sourcePerson&#45;&gt;targetIndividual -->\n<g id=\"edge3\" class=\"edge\">\n<title>sourcePerson:age_in_years&#45;&gt;targetIndividual:age</title>\n<path fill=\"none\" stroke=\"black\" d=\"M136.5,-34.5C154.9,-34.5 161.88,-34.5 176.35,-34.5\"/>\n<polygon fill=\"black\" stroke=\"black\" points=\"176.5,-38 186.5,-34.5 176.5,-31 176.5,-38\"/>\n</g>\n<!-- sourcePerson&#45;&gt;targetIndividual -->\n<g id=\"edge4\" class=\"edge\">\n<title>sourcePerson:height_in_cm&#45;&gt;targetIndividual:height</title>\n<path fill=\"none\" stroke=\"black\" d=\"M136.5,-13.5C154.9,-13.5 161.88,-13.5 176.35,-13.5\"/>\n<polygon fill=\"black\" stroke=\"black\" points=\"176.5,-17 186.5,-13.5 176.5,-10 176.5,-17\"/>\n</g>\n</g>\n</svg>\n",
"text/plain": "<graphviz.graphs.Digraph at 0x7f851874a250>"
"text/plain": "<graphviz.graphs.Digraph at 0x7fb238cb5550>"
},
"execution_count": 5,
"metadata": {},
Expand All @@ -204,8 +204,8 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2024-01-03T02:07:06.816125Z",
"start_time": "2024-01-03T02:07:06.369496Z"
"end_time": "2024-01-17T22:30:02.244818Z",
"start_time": "2024-01-17T22:30:01.486984Z"
}
},
"id": "1c623cdc3c1cfbca"
Expand Down Expand Up @@ -249,8 +249,8 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2024-01-03T02:07:06.829871Z",
"start_time": "2024-01-03T02:07:06.823308Z"
"end_time": "2024-01-17T22:30:02.251017Z",
"start_time": "2024-01-17T22:30:02.241183Z"
}
},
"id": "9f4d1fc4ca97f80c"
Expand Down Expand Up @@ -336,8 +336,8 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2024-01-03T02:07:06.853312Z",
"start_time": "2024-01-03T02:07:06.832158Z"
"end_time": "2024-01-17T22:30:02.260147Z",
"start_time": "2024-01-17T22:30:02.253561Z"
}
},
"id": "687912c18bf6752"
Expand Down Expand Up @@ -398,8 +398,8 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2024-01-03T02:07:06.903169Z",
"start_time": "2024-01-03T02:07:06.848243Z"
"end_time": "2024-01-17T22:30:02.326085Z",
"start_time": "2024-01-17T22:30:02.258015Z"
}
},
"id": "789a7b6535ab410f"
Expand All @@ -422,7 +422,7 @@
{
"data": {
"image/svg+xml": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Generated by graphviz version 5.0.1 (20220820.1526)\n -->\n<!-- Pages: 1 -->\n<svg width=\"346pt\" height=\"122pt\"\n viewBox=\"0.00 0.00 346.00 121.50\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 117.5)\">\n<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-117.5 342,-117.5 342,4 -4,4\"/>\n<!-- sourcePerson -->\n<g id=\"node1\" class=\"node\">\n<title>sourcePerson</title>\n<polygon fill=\"none\" stroke=\"black\" points=\"8.5,-88 8.5,-109 135.5,-109 135.5,-88 8.5,-88\"/>\n<text text-anchor=\"start\" x=\"52\" y=\"-95.8\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\">Person</text>\n<polyline fill=\"none\" stroke=\"black\" points=\"8.5,-88 8.5,-67 135.5,-67 135.5,-88\"/>\n<text text-anchor=\"start\" x=\"14.5\" y=\"-73.8\" font-family=\"Times,serif\" font-size=\"14.00\">family_name : string</text>\n<polyline fill=\"none\" stroke=\"black\" points=\"8.5,-67 8.5,-46 135.5,-46 135.5,-67\"/>\n<text text-anchor=\"start\" x=\"17.5\" y=\"-52.8\" font-family=\"Times,serif\" font-size=\"14.00\">given_name : string</text>\n<polyline fill=\"none\" stroke=\"black\" points=\"8.5,-46 8.5,-25 135.5,-25 135.5,-46\"/>\n<text text-anchor=\"start\" x=\"11.5\" y=\"-31.8\" font-family=\"Times,serif\" font-size=\"14.00\">age_in_years : integer</text>\n<polyline fill=\"none\" stroke=\"black\" points=\"8.5,-25 8.5,-4 135.5,-4 135.5,-25\"/>\n<text text-anchor=\"start\" x=\"16\" y=\"-10.8\" font-family=\"Times,serif\" font-size=\"14.00\">height_in_cm : float</text>\n</g>\n<!-- targetIndividual -->\n<g id=\"node2\" class=\"node\">\n<title>targetIndividual</title>\n<polygon fill=\"none\" stroke=\"black\" points=\"187.5,-67 187.5,-88 330.5,-88 330.5,-67 187.5,-67\"/>\n<text text-anchor=\"start\" x=\"228.5\" y=\"-74.8\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\">Individual</text>\n<polyline fill=\"none\" stroke=\"black\" points=\"187.5,-67 187.5,-46 330.5,-46 330.5,-67\"/>\n<text text-anchor=\"start\" x=\"222.5\" y=\"-52.8\" font-family=\"Times,serif\" font-size=\"14.00\">name : string</text>\n<polyline fill=\"none\" stroke=\"black\" points=\"187.5,-46 187.5,-25 330.5,-25 330.5,-46\"/>\n<text text-anchor=\"start\" x=\"196\" y=\"-31.8\" font-family=\"Times,serif\" font-size=\"14.00\">age_in_months : string</text>\n<polyline fill=\"none\" stroke=\"black\" points=\"187.5,-25 187.5,-4 330.5,-4 330.5,-25\"/>\n<text text-anchor=\"start\" x=\"190.5\" y=\"-10.8\" font-family=\"Times,serif\" font-size=\"14.00\">height_in_meters : string</text>\n</g>\n<!-- sourcePerson&#45;&gt;targetIndividual -->\n<g id=\"edge1\" class=\"edge\">\n<title>sourcePerson:given_name&#45;&gt;targetIndividual:name</title>\n<path fill=\"none\" stroke=\"black\" stroke-dasharray=\"5,2\" d=\"M136.5,-56C154.91,-56 161.87,-56.69 176.35,-56.92\"/>\n<polygon fill=\"black\" stroke=\"black\" points=\"176.47,-60.42 186.5,-57 176.53,-53.42 176.47,-60.42\"/>\n</g>\n<!-- sourcePerson&#45;&gt;targetIndividual -->\n<g id=\"edge2\" class=\"edge\">\n<title>sourcePerson:family_name&#45;&gt;targetIndividual:name</title>\n<path fill=\"none\" stroke=\"black\" stroke-dasharray=\"5,2\" d=\"M136.5,-78C156.65,-78 161.21,-63.33 176.24,-58.51\"/>\n<polygon fill=\"black\" stroke=\"black\" points=\"177.12,-61.92 186.5,-57 176.1,-54.99 177.12,-61.92\"/>\n</g>\n<!-- sourcePerson&#45;&gt;targetIndividual -->\n<g id=\"edge3\" class=\"edge\">\n<title>sourcePerson:age_in_years&#45;&gt;targetIndividual:age_in_months</title>\n<path fill=\"none\" stroke=\"black\" stroke-dasharray=\"5,2\" d=\"M136.5,-35C154.9,-35 161.88,-35 176.35,-35\"/>\n<polygon fill=\"black\" stroke=\"black\" points=\"176.5,-38.5 186.5,-35 176.5,-31.5 176.5,-38.5\"/>\n</g>\n<!-- sourcePerson&#45;&gt;targetIndividual -->\n<g id=\"edge4\" class=\"edge\">\n<title>sourcePerson:height_in_cm&#45;&gt;targetIndividual:height_in_meters</title>\n<path fill=\"none\" stroke=\"black\" stroke-dasharray=\"5,2\" d=\"M136.5,-14C154.9,-14 161.88,-14 176.35,-14\"/>\n<polygon fill=\"black\" stroke=\"black\" points=\"176.5,-17.5 186.5,-14 176.5,-10.5 176.5,-17.5\"/>\n</g>\n</g>\n</svg>\n",
"text/plain": "<graphviz.graphs.Digraph at 0x7f85187b9a00>"
"text/plain": "<graphviz.graphs.Digraph at 0x7fb238d156a0>"
},
"execution_count": 9,
"metadata": {},
Expand All @@ -435,8 +435,8 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2024-01-03T02:07:07.250708Z",
"start_time": "2024-01-03T02:07:06.913474Z"
"end_time": "2024-01-17T22:30:03.283023Z",
"start_time": "2024-01-17T22:30:02.345894Z"
}
},
"id": "2a18ccb5d7dc469b"
Expand Down Expand Up @@ -470,8 +470,8 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2024-01-03T02:07:07.250930Z",
"start_time": "2024-01-03T02:07:07.244685Z"
"end_time": "2024-01-17T22:30:03.283868Z",
"start_time": "2024-01-17T22:30:03.278695Z"
}
},
"id": "5e20e98e2b23751f"
Expand Down Expand Up @@ -528,8 +528,8 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2024-01-03T02:07:07.256503Z",
"start_time": "2024-01-03T02:07:07.252109Z"
"end_time": "2024-01-17T22:30:03.290589Z",
"start_time": "2024-01-17T22:30:03.286701Z"
}
},
"id": "7c1f7efef1836364"
Expand Down Expand Up @@ -608,8 +608,8 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2024-01-03T02:07:07.271763Z",
"start_time": "2024-01-03T02:07:07.266055Z"
"end_time": "2024-01-17T22:30:03.323328Z",
"start_time": "2024-01-17T22:30:03.300567Z"
}
},
"id": "65a5ce5d97e27f76"
Expand Down Expand Up @@ -649,8 +649,8 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2024-01-03T02:07:07.329627Z",
"start_time": "2024-01-03T02:07:07.293054Z"
"end_time": "2024-01-17T22:30:03.365363Z",
"start_time": "2024-01-17T22:30:03.321298Z"
}
},
"id": "bc99bad97970b1b7"
Expand All @@ -674,8 +674,8 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2024-01-03T02:07:07.635126Z",
"start_time": "2024-01-03T02:07:07.330891Z"
"end_time": "2024-01-17T22:30:03.622621Z",
"start_time": "2024-01-17T22:30:03.370531Z"
}
},
"id": "831b444d9c47e0ea"
Expand Down Expand Up @@ -734,8 +734,8 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2024-01-03T02:07:07.640576Z",
"start_time": "2024-01-03T02:07:07.635834Z"
"end_time": "2024-01-17T22:30:03.629604Z",
"start_time": "2024-01-17T22:30:03.624546Z"
}
},
"id": "b589e0e95550962d"
Expand All @@ -760,8 +760,8 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2024-01-03T02:07:07.645267Z",
"start_time": "2024-01-03T02:07:07.640190Z"
"end_time": "2024-01-17T22:30:03.630816Z",
"start_time": "2024-01-17T22:30:03.629262Z"
}
},
"id": "f492b27c0f0fbf88"
Expand All @@ -776,8 +776,8 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2024-01-03T02:07:07.648640Z",
"start_time": "2024-01-03T02:07:07.643720Z"
"end_time": "2024-01-17T22:30:03.661717Z",
"start_time": "2024-01-17T22:30:03.635358Z"
}
},
"id": "3ac3f93ab8561300"
Expand All @@ -792,8 +792,8 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2024-01-03T02:07:07.683985Z",
"start_time": "2024-01-03T02:07:07.654269Z"
"end_time": "2024-01-17T22:30:03.662631Z",
"start_time": "2024-01-17T22:30:03.646582Z"
}
},
"id": "84262d357323f76e"
Expand Down Expand Up @@ -825,8 +825,8 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2024-01-03T02:07:07.715300Z",
"start_time": "2024-01-03T02:07:07.674231Z"
"end_time": "2024-01-17T22:30:03.709283Z",
"start_time": "2024-01-17T22:30:03.667849Z"
}
},
"id": "2f282430f48e13c0"
Expand Down Expand Up @@ -858,8 +858,8 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2024-01-03T02:07:07.747368Z",
"start_time": "2024-01-03T02:07:07.716444Z"
"end_time": "2024-01-17T22:30:03.739195Z",
"start_time": "2024-01-17T22:30:03.711288Z"
}
},
"id": "fdd23ae82909770e"
Expand Down Expand Up @@ -909,8 +909,8 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2024-01-03T02:07:07.789903Z",
"start_time": "2024-01-03T02:07:07.759627Z"
"end_time": "2024-01-17T22:30:03.781498Z",
"start_time": "2024-01-17T22:30:03.754420Z"
}
},
"id": "e8c1c3f98081d38"
Expand All @@ -923,8 +923,8 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2024-01-03T02:07:07.793832Z",
"start_time": "2024-01-03T02:07:07.788230Z"
"end_time": "2024-01-17T22:30:03.785065Z",
"start_time": "2024-01-17T22:30:03.782845Z"
}
},
"id": "ee14ace4b1c7d256"
Expand Down
Loading

0 comments on commit 71c91ff

Please sign in to comment.