Skip to content

Commit 7c426c2

Browse files
hrshdhgdmatentzn
andauthored
Implementation of sssom-schema as a package (#264)
* changes w.r.t changing source of truth * dependency added for `sssom-schema` for tox * data update * replaced `match_type` => `mapping_justification` * provided by `sssom-schema` * linted * updated test file * correct json * new test file * new test data as per sssom-schema * edited as per sssom-schema changes * formatting * multivalued_slots is now dynamically deduced * linted * flake8 ed * formatted * constants moved to one place and refactored * linted * linted * fixed errors * wrong import * smarter way of getting multivalued slots * typo fixed semapv instea of ssemapv * deleted * unnecessary at this point. * typo * replace with https://w3id.org/sssom/ * addedprefix map # semapv: "https://w3id.org/semapv/" * linted * update checkout and setup python versions * whitelist sssom-schema * rolled back whitelisting * dropped 3.7 testing * rolled back to 3.7 * test * added self install * removed unnecessary dependency * commented * undid last few commits * grade unnecessary * test * anchored veresion * testing * removed version * undo deps * refactored * refactored * refactored * removed datamodel and yaml * test * fixed in sssom-schema * explicilty install sssom-schema * added enum for mapping_justifications * remove explcit install of sssom-schema * removed sci-kit learn * Update cli.py * switched link back to master branch Co-authored-by: Nico Matentzoglu <[email protected]>
1 parent 482acad commit 7c426c2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+7760
-10691
lines changed

Diff for: .github/workflows/qc.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,23 @@ on:
99

1010
jobs:
1111
build:
12-
1312
runs-on: ${{ matrix.os }}
1413
strategy:
1514
matrix:
1615
python-version: ["3.7", "3.9", "3.10"]
1716
os: [ ubuntu-latest, windows-latest ]
1817

1918
steps:
20-
- uses: actions/checkout@v2
19+
- uses: actions/checkout@v3
2120
- name: Set up Python ${{ matrix.python-version }}
22-
uses: actions/setup-python@v2
21+
uses: actions/setup-python@v3
2322
with:
2423
python-version: ${{ matrix.python-version }}
24+
2525
- name: Install dependencies
2626
run: |
2727
pip install --upgrade pip
28-
pip install --upgrade tox
28+
pip install tox
2929
- name: Check manifest
3030
run: tox -e manifest
3131
- name: Lint with flake8

Diff for: MANIFEST.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ global-exclude *.py[cod] __pycache__ *.so *.dylib .DS_Store *.gpickle
2323
exclude odk.bat environment.sh cli.md Makefile tox.ini
2424

2525
# Specific files to include
26-
include LICENSE sssom/sssom.yaml
26+
include LICENSE

Diff for: Makefile

-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ sssom/external_context.py: schema/sssom.external.context.jsonld
4444
sssom/internal_context.py: schema/sssom.context.jsonld
4545
echo "\"\"\"This module contains an autogenerated copy of the internal SSSOM context.\"\"\"" > $@
4646
echo "" >> $@
47-
echo "# This is autogenerated and super hacky." >> $@
48-
echo "multivalued_slots = [\"match_type\", \"creator_id\", \"creator_label\", \"author_id\", \"author_label\", \"reviewer_id\", \"reviewer_label\", \"license\", \"mapping_set_source\", \"subject_match_field\", \"object_match_field\", \"match_string\", \"subject_preprocessing\", \"object_preprocessing\",\"see_also\",]" >> $@
4947
echo "sssom_context = \"\"\"" >> $@
5048
cat $< >> $@
5149
echo "\"\"\"" >> $@

Diff for: schema/cliquesummary.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
id: http://w3id.org/sssom/schema/cliquesummary/
1+
id: https://w3id.org/sssom/schema/cliquesummary/
22
name: sssom-cliquesummary
33
description: Data dictionary for clique summaries
44
imports:
55
- biolinkml:types
66
prefixes:
77
biolinkml: https://w3id.org/biolink/biolinkml/
8-
sssom: http://w3id.org/sssom/
9-
sssom.cs: http://w3id.org/sssom/cliquesummary
8+
sssom: https://w3id.org/sssom/
9+
sssom.cs: https://w3id.org/sssom/cliquesummary
1010
see_also:
11-
- http://w3id.org/sssom/SSSOM.md
11+
- https://w3id.org/sssom/SSSOM.md
1212
default_curi_maps:
1313
- semweb_context
1414
- obo_context

Diff for: schema/sssom.context.jsonld

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"_comments": "Auto generated from sssom.yaml by jsonldcontextgen.py version: 0.1.1\n Generation date: 2022-02-14T15:33:37\n Schema: sssom\n metamodel version: 1.7.0\n model version: None\n \n id: http://w3id.org/sssom/schema/\n description: Datamodel for Simple Standard for Sharing Ontology Mappings (SSSOM)\n license: https://creativecommons.org/publicdomain/zero/1.0/\n ",
2+
"_comments": "Auto generated from sssom.yaml by jsonldcontextgen.py version: 0.1.1\n Generation date: 2022-02-14T15:33:37\n Schema: sssom\n metamodel version: 1.7.0\n model version: None\n \n id: https://w3id.org/sssom/schema/\n description: Datamodel for Simple Standard for Sharing Ontology Mappings (SSSOM)\n license: https://creativecommons.org/publicdomain/zero/1.0/\n ",
33
"@context": {
44
"Orphanet": {
55
"@id": "http://www.orpha.net/ORDO/Orphanet_",
@@ -20,8 +20,8 @@
2020
"prov": "http://www.w3.org/ns/prov#",
2121
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
2222
"skos": "http://www.w3.org/2004/02/skos/core#",
23-
"sssom": "http://w3id.org/sssom/",
24-
"@vocab": "http://w3id.org/sssom/",
23+
"sssom": "https://w3id.org/sssom/",
24+
"@vocab": "https://w3id.org/sssom/",
2525
"author_id": {
2626
"@type": "rdfs:Resource",
2727
"@id": "pav:authoredBy"
@@ -82,7 +82,7 @@
8282
"meaning": "@id"
8383
}
8484
},
85-
"match_type": {
85+
"mapping_justification": {
8686
"@context": {
8787
"@vocab": "@null",
8888
"text": "skos:notation",

Diff for: schema/sssom.schema.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"$ref": "#/$defs/MatchTermTypeEnum",
7777
"description": "Specifies what type of terms are being matched (class, property, or individual)."
7878
},
79-
"match_type": {
79+
"mapping_justification": {
8080
"description": "The kind of match that led to the mapping, e.g. Logical or Lexical.",
8181
"items": {
8282
"$ref": "#/$defs/MatchTypeEnum"
@@ -201,7 +201,7 @@
201201
"subject_id",
202202
"predicate_id",
203203
"object_id",
204-
"match_type"
204+
"mapping_justification"
205205
],
206206
"title": "Mapping",
207207
"type": "object"
@@ -395,7 +395,7 @@
395395
"type": "string"
396396
}
397397
},
398-
"$id": "http://w3id.org/sssom/schema/",
398+
"$id": "https://w3id.org/sssom/schema/",
399399
"$schema": "http://json-schema.org/draft-07/schema#",
400400
"additionalProperties": true,
401401
"metamodel_version": "1.7.0",

0 commit comments

Comments
 (0)