From 385c32650a618debcefe98055b0bb393e03f5ced Mon Sep 17 00:00:00 2001 From: Nico Matentzoglu Date: Sat, 18 Mar 2023 13:18:06 +0200 Subject: [PATCH] SSSOM 0.11.1 release (#270) Recreating the SSSOM schema files --------- Co-authored-by: Harshad Hegde --- project/excel/sssom_schema.xlsx | Bin 6918 -> 6969 bytes project/graphql/sssom_schema.graphql | 6 + project/jsonld/sssom_schema.context.jsonld | 8 +- project/jsonld/sssom_schema.jsonld | 192 +++++++++- project/jsonschema/sssom_schema.schema.json | 34 +- project/owl/sssom_schema.owl.ttl | 335 +++++++++------- project/protobuf/sssom_schema.proto | 6 + project/shacl/sssom_schema.shacl.ttl | 400 +++++++++++--------- project/shex/sssom_schema.shex | 10 + project/sqlschema/sssom_schema.sql | 12 +- src/docs/editors.md | 86 +---- src/sssom_schema/datamodel/sssom_schema.py | 43 ++- 12 files changed, 729 insertions(+), 403 deletions(-) diff --git a/project/excel/sssom_schema.xlsx b/project/excel/sssom_schema.xlsx index 46402f7f49ee166cd0d9e87bd4ec499a1c4d7c26..d5d40da440a78ace128852a5e2516ddb4d20c3c4 100644 GIT binary patch delta 4689 zcmZ8lbyQUC*PWp|B!r=nZlndIB!@1ZF@&kU^RO zr1?g__5NIX|F~zZyY{{7Jm=YGKWEA)mf00nedRX*oH8py#Hu zXEXUz2L}(Xhi7sYdETC_EHzh?yu>m{(k-0Z_-o>ZPyM8jwW+FSY(ld=p?5;USioba}fmUBvQk5Z1BG??WH=qs~S?a$= zz;xxA1B+*NcxTurwxT8#;C6$eE|qc=vu}aYH15#gVR{u$QSkv^&U$6kVY<83KH&L< zsdA$Z4PJqw_l#6%<#y{C3(Uy~VqxUe{uN_fy@PlgnP;WMe(IyTp&Racb-$g&5x477 zFB0eP8Z{z;iUbtDssy~d(bkRw06Zauos%%a78vlM$=O~eC^52uE*()eJN|d5K0mh| zoTMJ<777B-a999Kv$(90v!HOq89zUMOQXBZ)Pr-Flj$XR7BpW|2XGBEL-iYEJgJyB zFsT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58e7U@B0>Jqp%bRA|BhH8^&=oA?L_DMK9jWp4peG)1 @ ? ; @linkml:String ? ; @linkml:Uri ? ; + @ ? ; @ ? ; @linkml:String ? ; @linkml:String ? ; pav:authoredOn @linkml:Date ? ; @linkml:Double ? ; + @ * ; + @linkml:String * ; @ * ; @ * ; @linkml:String * ; @@ -86,6 +93,8 @@ linkml:Nodeidentifier NONLITERAL CLOSED { ( $ ( @ ; + @linkml:String ? ; + @linkml:String ? ; @linkml:Uri * ; @ * ; @linkml:Uri ? ; @@ -100,6 +109,7 @@ linkml:Nodeidentifier NONLITERAL @linkml:Uri ; owl:versionInfo @linkml:String ? ; prov:wasDerivedFrom @linkml:Uri * ; + dcterms:title @linkml:String ? ; dcterms:description @linkml:String ? ; dcterms:creator @ * ; @linkml:String * ; diff --git a/project/sqlschema/sssom_schema.sql b/project/sqlschema/sssom_schema.sql index 648d1ff4..59a04a70 100644 --- a/project/sqlschema/sssom_schema.sql +++ b/project/sqlschema/sssom_schema.sql @@ -25,11 +25,14 @@ CREATE TABLE mapping ( object_source TEXT, object_source_version TEXT, mapping_provider TEXT, + mapping_source TEXT, mapping_cardinality VARCHAR(3), mapping_tool TEXT, mapping_tool_version TEXT, mapping_date DATE, confidence FLOAT, + curation_rule TEXT, + curation_rule_text TEXT, subject_match_field TEXT, object_match_field TEXT, match_string TEXT, @@ -40,16 +43,18 @@ CREATE TABLE mapping ( see_also TEXT, other TEXT, comment TEXT, - PRIMARY KEY (subject_id, subject_label, subject_category, predicate_id, predicate_label, predicate_modifier, object_id, object_label, object_category, mapping_justification, author_id, author_label, reviewer_id, reviewer_label, creator_id, creator_label, license, subject_type, subject_source, subject_source_version, object_type, object_source, object_source_version, mapping_provider, mapping_cardinality, mapping_tool, mapping_tool_version, mapping_date, confidence, subject_match_field, object_match_field, match_string, subject_preprocessing, object_preprocessing, semantic_similarity_score, semantic_similarity_measure, see_also, other, comment) + PRIMARY KEY (subject_id, subject_label, subject_category, predicate_id, predicate_label, predicate_modifier, object_id, object_label, object_category, mapping_justification, author_id, author_label, reviewer_id, reviewer_label, creator_id, creator_label, license, subject_type, subject_source, subject_source_version, object_type, object_source, object_source_version, mapping_provider, mapping_source, mapping_cardinality, mapping_tool, mapping_tool_version, mapping_date, confidence, curation_rule, curation_rule_text, subject_match_field, object_match_field, match_string, subject_preprocessing, object_preprocessing, semantic_similarity_score, semantic_similarity_measure, see_also, other, comment) ); CREATE TABLE mapping_registry ( mapping_registry_id TEXT NOT NULL, + mapping_registry_title TEXT, + mapping_registry_description TEXT, imports TEXT, mapping_set_references TEXT, documentation TEXT, homepage TEXT, - PRIMARY KEY (mapping_registry_id, imports, mapping_set_references, documentation, homepage) + PRIMARY KEY (mapping_registry_id, mapping_registry_title, mapping_registry_description, imports, mapping_set_references, documentation, homepage) ); CREATE TABLE mapping_set ( @@ -57,6 +62,7 @@ CREATE TABLE mapping_set ( mapping_set_id TEXT NOT NULL, mapping_set_version TEXT, mapping_set_source TEXT, + mapping_set_title TEXT, mapping_set_description TEXT, creator_id TEXT, creator_label TEXT, @@ -77,7 +83,7 @@ CREATE TABLE mapping_set ( see_also TEXT, other TEXT, comment TEXT, - PRIMARY KEY (mappings, mapping_set_id, mapping_set_version, mapping_set_source, mapping_set_description, creator_id, creator_label, license, subject_type, subject_source, subject_source_version, object_type, object_source, object_source_version, mapping_provider, mapping_tool, mapping_date, subject_match_field, object_match_field, subject_preprocessing, object_preprocessing, see_also, other, comment) + PRIMARY KEY (mappings, mapping_set_id, mapping_set_version, mapping_set_source, mapping_set_title, mapping_set_description, creator_id, creator_label, license, subject_type, subject_source, subject_source_version, object_type, object_source, object_source_version, mapping_provider, mapping_tool, mapping_date, subject_match_field, object_match_field, subject_preprocessing, object_preprocessing, see_also, other, comment) ); CREATE TABLE mapping_set_reference ( diff --git a/src/docs/editors.md b/src/docs/editors.md index 6f67c275..b6a1a62b 100644 --- a/src/docs/editors.md +++ b/src/docs/editors.md @@ -1,66 +1,20 @@ -# Still under development -- not yet ready for prime time - - - -# Template for LinkML based schemas - -## Requirements -* __Python >= 3.7.1__ -* __GNU make__ - A command line gnu make process (Windows users can use [cygwin](https://www.cygwin.com/) - make comes built in on a Mac) -* __pip__ - comes with most python distros - you should be ok -* __virtualenv__ - can be added via `pip install virtualenv` -* __pipenv__ - can be added via `pip install pipenv` -* - -## What is this? - -This is a GitHub template for a [LinkML](https://github.com/linkml/) based projects. - -It allows you to create a project for your schema as quickly as -possible. It takes care of generating a beautiful readthedocs themed -site, as well as downstream artefacts, including: - - * JSON-Schema - * ShEx - * OWL - * RDF (direct mapping) - * JSON-LD Contexts - * SQL DDL (TODO) - * Python classes to represent model elements - * TSV/CSV reports (TODO) - -## Quickstart - - 1. Click the big green "Use this template" button on this page - 2. Name your repo according to your schema, e.g. my-awsome-project-model, and clone it - 3. Edit `model/CONFIG.yaml` to set your specific parameters. The details on the parameters can be found in -the [LinkML Template Configuration Model](https://linkml.github.io/template-config-model/) directory. - (_Note that the Template Configuration Model was built using this very template._) - 4. Configure the repository: - * `make -f MakeConfig reset` - - This will generate a number of files that can be used to make, test, and distribute your final model. Note - that the template-configurator only needs to be run once as a rule. You can, however, re-generate allof - the target artifacts with `make -f MakeConfig reset`. You can also selectively remove artifacts and get them - regenerated with `make -f MakeConfig update` - 5. Rename the schema file in [model/schema](model/schema) to match the `root_schema` named in the CONFIG.yaml file. - Note: `root_schema` does not have the `.yaml` suffix, the file does. As an example, if you specified `root_schema: my-schema`, - the schema would be named model/schema/my-schema.yaml - 6. Edit the root_schema to add your own types, classes and slots. - 7. Type `make` to build your downstream artefacts (jsonschema, owl, etc) - 8. Once satisfied, commit your new project to github, which will rerun the make process. - 9. The package can also be installed in `pypi` - this is an advanced topic, see [PYPI_SETUP]() for details -10. This file (ABOUT.md) and the `images` directory can be removed once you are satisfied - - -## How it works - -This repo is a GitHub "template" repo. When you "Use this template" it will make a copy for your project. - -Everything is orchestrated by a generic single [Makefile](Makefile). For this to work you should follow certain conventions: - - * Keep your schema in src/schema - * Use the `.yaml` suffix for all schema files - * Use the suggested directory layout here. - -To run the Makefile you will need Python (>=3.7): +# Simple Standard for Sharing Ontological Mappings (SSSOM) + +## How to make a new release +* Automated: + * On the main code page, click on Releases (right hand column) + * Click on the `Draft a new release` button + * Click the `Choose a tag` button, create a new tag: `X.X.X` + * Click on the `Generate a new release` button + * Make sure only the `Select as the latest release` checkbox is checked. + * Click `Publish release` button +* Manual: + * `make build` + * `make pypi` + +This triggers a GitHub Action workflow that releases the new version of SSSOM to PyPi. + +## Documentation deployment +This can be done in two ways: +* Automated: Every time a pull request is merged into the `main` branch, a github action is triggered to deploy documentation automatically. +* Manually: The make command to deploy documentation is `make deploy`. \ No newline at end of file diff --git a/src/sssom_schema/datamodel/sssom_schema.py b/src/sssom_schema/datamodel/sssom_schema.py index b5a3245d..91610ce0 100644 --- a/src/sssom_schema/datamodel/sssom_schema.py +++ b/src/sssom_schema/datamodel/sssom_schema.py @@ -1,5 +1,5 @@ # Auto generated from sssom_schema.yaml by pythongen.py version: 0.9.0 -# Generation date: 2022-06-07T11:23:26 +# Generation date: 2023-03-16T14:57:46 # Schema: sssom # # id: https://w3id.org/sssom/schema/ @@ -77,6 +77,7 @@ class MappingSet(YAMLRoot): mappings: Optional[Union[Union[dict, "Mapping"], List[Union[dict, "Mapping"]]]] = empty_list() mapping_set_version: Optional[str] = None mapping_set_source: Optional[Union[Union[str, URI], List[Union[str, URI]]]] = empty_list() + mapping_set_title: Optional[str] = None mapping_set_description: Optional[str] = None creator_id: Optional[Union[Union[str, EntityReference], List[Union[str, EntityReference]]]] = empty_list() creator_label: Optional[Union[str, List[str]]] = empty_list() @@ -119,6 +120,9 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): self.mapping_set_source = [self.mapping_set_source] if self.mapping_set_source is not None else [] self.mapping_set_source = [v if isinstance(v, URI) else URI(v) for v in self.mapping_set_source] + if self.mapping_set_title is not None and not isinstance(self.mapping_set_title, str): + self.mapping_set_title = str(self.mapping_set_title) + if self.mapping_set_description is not None and not isinstance(self.mapping_set_description, str): self.mapping_set_description = str(self.mapping_set_description) @@ -222,11 +226,14 @@ class Mapping(YAMLRoot): object_source: Optional[Union[str, EntityReference]] = None object_source_version: Optional[str] = None mapping_provider: Optional[Union[str, URI]] = None + mapping_source: Optional[Union[str, EntityReference]] = None mapping_cardinality: Optional[Union[str, "MappingCardinalityEnum"]] = None mapping_tool: Optional[str] = None mapping_tool_version: Optional[str] = None mapping_date: Optional[Union[str, XSDDate]] = None confidence: Optional[float] = None + curation_rule: Optional[Union[Union[str, EntityReference], List[Union[str, EntityReference]]]] = empty_list() + curation_rule_text: Optional[Union[str, List[str]]] = empty_list() subject_match_field: Optional[Union[Union[str, EntityReference], List[Union[str, EntityReference]]]] = empty_list() object_match_field: Optional[Union[Union[str, EntityReference], List[Union[str, EntityReference]]]] = empty_list() match_string: Optional[Union[str, List[str]]] = empty_list() @@ -325,6 +332,9 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): if self.mapping_provider is not None and not isinstance(self.mapping_provider, URI): self.mapping_provider = URI(self.mapping_provider) + if self.mapping_source is not None and not isinstance(self.mapping_source, EntityReference): + self.mapping_source = EntityReference(self.mapping_source) + if self.mapping_cardinality is not None and not isinstance(self.mapping_cardinality, MappingCardinalityEnum): self.mapping_cardinality = MappingCardinalityEnum(self.mapping_cardinality) @@ -340,6 +350,14 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): if self.confidence is not None and not isinstance(self.confidence, float): self.confidence = float(self.confidence) + if not isinstance(self.curation_rule, list): + self.curation_rule = [self.curation_rule] if self.curation_rule is not None else [] + self.curation_rule = [v if isinstance(v, EntityReference) else EntityReference(v) for v in self.curation_rule] + + if not isinstance(self.curation_rule_text, list): + self.curation_rule_text = [self.curation_rule_text] if self.curation_rule_text is not None else [] + self.curation_rule_text = [v if isinstance(v, str) else str(v) for v in self.curation_rule_text] + if not isinstance(self.subject_match_field, list): self.subject_match_field = [self.subject_match_field] if self.subject_match_field is not None else [] self.subject_match_field = [v if isinstance(v, EntityReference) else EntityReference(v) for v in self.subject_match_field] @@ -392,6 +410,8 @@ class MappingRegistry(YAMLRoot): class_model_uri: ClassVar[URIRef] = SSSOM.MappingRegistry mapping_registry_id: Union[str, EntityReference] = None + mapping_registry_title: Optional[str] = None + mapping_registry_description: Optional[str] = None imports: Optional[Union[Union[str, URI], List[Union[str, URI]]]] = empty_list() mapping_set_references: Optional[Union[Union[dict, "MappingSetReference"], List[Union[dict, "MappingSetReference"]]]] = empty_list() documentation: Optional[Union[str, URI]] = None @@ -403,6 +423,12 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): if not isinstance(self.mapping_registry_id, EntityReference): self.mapping_registry_id = EntityReference(self.mapping_registry_id) + if self.mapping_registry_title is not None and not isinstance(self.mapping_registry_title, str): + self.mapping_registry_title = str(self.mapping_registry_title) + + if self.mapping_registry_description is not None and not isinstance(self.mapping_registry_description, str): + self.mapping_registry_description = str(self.mapping_registry_description) + if not isinstance(self.imports, list): self.imports = [self.imports] if self.imports is not None else [] self.imports = [v if isinstance(v, URI) else URI(v) for v in self.imports] @@ -563,6 +589,12 @@ class slots: slots.mapping_registry_id = Slot(uri=SSSOM.mapping_registry_id, name="mapping_registry_id", curie=SSSOM.curie('mapping_registry_id'), model_uri=SSSOM.mapping_registry_id, domain=None, range=Union[str, EntityReference]) +slots.mapping_registry_title = Slot(uri=SSSOM.mapping_registry_title, name="mapping_registry_title", curie=SSSOM.curie('mapping_registry_title'), + model_uri=SSSOM.mapping_registry_title, domain=None, range=Optional[str]) + +slots.mapping_registry_description = Slot(uri=SSSOM.mapping_registry_description, name="mapping_registry_description", curie=SSSOM.curie('mapping_registry_description'), + model_uri=SSSOM.mapping_registry_description, domain=None, range=Optional[str]) + slots.imports = Slot(uri=SSSOM.imports, name="imports", curie=SSSOM.curie('imports'), model_uri=SSSOM.imports, domain=None, range=Optional[Union[Union[str, URI], List[Union[str, URI]]]]) @@ -624,6 +656,9 @@ class slots: slots.mapping_set_group = Slot(uri=SSSOM.mapping_set_group, name="mapping_set_group", curie=SSSOM.curie('mapping_set_group'), model_uri=SSSOM.mapping_set_group, domain=None, range=Optional[str]) +slots.mapping_set_title = Slot(uri=DC.title, name="mapping_set_title", curie=DC.curie('title'), + model_uri=SSSOM.mapping_set_title, domain=None, range=Optional[str]) + slots.mapping_set_description = Slot(uri=DC.description, name="mapping_set_description", curie=DC.curie('description'), model_uri=SSSOM.mapping_set_description, domain=None, range=Optional[str]) @@ -702,6 +737,12 @@ class slots: slots.object_preprocessing = Slot(uri=SSSOM.object_preprocessing, name="object_preprocessing", curie=SSSOM.curie('object_preprocessing'), model_uri=SSSOM.object_preprocessing, domain=None, range=Optional[Union[Union[str, EntityReference], List[Union[str, EntityReference]]]]) +slots.curation_rule = Slot(uri=SSSOM.curation_rule, name="curation_rule", curie=SSSOM.curie('curation_rule'), + model_uri=SSSOM.curation_rule, domain=None, range=Optional[Union[Union[str, EntityReference], List[Union[str, EntityReference]]]]) + +slots.curation_rule_text = Slot(uri=SSSOM.curation_rule_text, name="curation_rule_text", curie=SSSOM.curie('curation_rule_text'), + model_uri=SSSOM.curation_rule_text, domain=None, range=Optional[Union[str, List[str]]]) + slots.semantic_similarity_score = Slot(uri=SSSOM.semantic_similarity_score, name="semantic_similarity_score", curie=SSSOM.curie('semantic_similarity_score'), model_uri=SSSOM.semantic_similarity_score, domain=None, range=Optional[float])