mapping-commons / sssom

Simple Standard for Sharing Ontology Mappings
https://mapping-commons.github.io/sssom/
BSD 3-Clause "New" or "Revised" License
141 stars 24 forks source link

Add comprehensive testing of changes to SSSOM data model #115

Open cmungall opened 2 years ago

cmungall commented 2 years ago

We have one action to build products #95.

We should also have one that runs unit tests, should just be make test

Example https://github.com/linkml/linkml-model/blob/main/.github/workflows/pr-test.yaml

Also consider: https://github.com/linkml/linkml-model/blob/main/.github/workflows/pypi-publish.yaml

EDIT (by @matentzn):

We need to make sure that when running a pull request, the sssom toolkit is installed along with a _local version of the sssomschema data classes.

matentzn commented 1 year ago
hrshdhgd commented 6 months ago

Is this still an outstanding issue? If so, what needs to be done? All PRs linked to this thread seem merged or closed.

matentzn commented 6 months ago

Right now we have two tests:

  1. https://github.com/mapping-commons/sssom/blob/9c2af819b212825a89d3dbd5c43f762ba983d065/Makefile#L54
  2. https://github.com/mapping-commons/sssom/blob/9c2af819b212825a89d3dbd5c43f762ba983d065/project.Makefile#L41

Neither of these are comprehensive - the first basically makes sure the schema can be build, the second checks on a small set of test cases in the sssom repo if they are still valid or not - based on the latest version on PyPI rather than the version on the main branch.

To finish this issue, we need to have a simply way to test the schema when changes are proposed. So basically, we need to:

  1. Build the data classes
  2. Somehow check if with the new data classes, a set of test cases can still be passed

I don't know @cmungall full vision on this. As we cannot use linkml convert to parse the TSV files, we may have to build a test suite of 5-10 mapping sets in JSON, and see if we can use linkml-convert to parse them after the changes to the datamodel are proposed. It is worth though to raise this with him and see how he would suggest this to be done, as I assume this should be the exact same thing for all linkml projects.