Skip to content

Commit 69bfd20

Browse files
committed
Add valid and invalid MappingSpecification YAML test data
Introduces new YAML files under tests/data/valid and tests/data/invalid to provide examples of both valid and invalid MappingSpecification objects. These files can be used for testing schema validation and error handling.
1 parent 58eb02e commit 69bfd20

6 files changed

Lines changed: 100 additions & 0 deletions
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Invalid MappingSpecification - author is a string instead of Agent object
2+
---
3+
author: "Jane Smith"
4+
content: https://example.org/mappings/invalid.sssom.tsv
5+
subject_source:
6+
name: Source X
7+
content: https://example.org/source-x
8+
content_type: text/plain
9+
object_source:
10+
name: Source Y
11+
content: https://example.org/source-y
12+
content_type: text/plain
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Invalid MappingSpecification - subject_source is a string instead of Source object
2+
---
3+
author:
4+
id: example:author456
5+
name: Test Author
6+
content: https://example.org/mapping.txt
7+
subject_source: "Source A"
8+
object_source:
9+
name: Source B
10+
content: https://example.org/source-b
11+
content_type: text/plain
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Invalid MappingSpecification - creator is a list instead of Agent object
2+
---
3+
author:
4+
id: example:author789
5+
name: Another Author
6+
creator:
7+
- John Doe
8+
- Jane Smith
9+
content: https://example.org/mapping.txt
10+
subject_source:
11+
name: Valid Source
12+
content: https://example.org/source-valid
13+
content_type: text/plain
14+
object_source:
15+
name: Another Source
16+
content: https://example.org/source-invalid
17+
content_type: text/plain
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Valid MappingSpecification example - SSSOM mapping between two ontologies
2+
---
3+
publication_date: "2024-01-15"
4+
license: CC-BY-4.0
5+
version: "1.0.0"
6+
description: Mappings between disease ontologies DO and MONDO
7+
type: SSSOM
8+
mapping_method: manual curation
9+
documentation: https://example.org/do-mondo-mappings/docs
10+
content: https://example.org/mappings/do-mondo.sssom.tsv
11+
subject_source:
12+
name: Disease Ontology
13+
version: "2024-01-01"
14+
type: owl ontology
15+
documentation: https://disease-ontology.org/
16+
content: http://purl.obolibrary.org/obo/doid.owl
17+
content_type: application/rdf+xml
18+
object_source:
19+
name: Mondo Disease Ontology
20+
version: "2024-01-10"
21+
type: owl ontology
22+
documentation: https://mondo.monarchinitiative.org/
23+
content: http://purl.obolibrary.org/obo/mondo.owl
24+
content_type: application/rdf+xml
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Valid MappingSpecification example - R2RML mapping between database and RDF
2+
---
3+
4+
publication_date: "2023-11-20"
5+
license: Apache-2.0
6+
version: "2.1.0"
7+
description: R2RML mapping from legacy patient database to FHIR RDF
8+
type: R2RML
9+
mapping_method: automated generation with manual review
10+
documentation: https://example.org/patient-fhir-mapping
11+
content: https://example.org/mappings/patient-db-to-fhir.r2rml.ttl
12+
subject_source:
13+
name: Patient Database
14+
version: "v5.2"
15+
type: relational database
16+
documentation: https://example.org/db-schema
17+
content: postgresql://example.org:5432/patients
18+
content_type: application/sql
19+
object_source:
20+
name: FHIR RDF Ontology
21+
version: "4.0.1"
22+
type: rdf vocabulary
23+
documentation: http://hl7.org/fhir/
24+
content: http://hl7.org/fhir/fhir.ttl
25+
content_type: text/turtle
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Valid MappingSpecification example - minimal required fields only
2+
---
3+
content: https://example.org/minimal-mapping.txt
4+
subject_source:
5+
name: Source A
6+
content: https://example.org/source-a
7+
content_type: text/plain
8+
object_source:
9+
name: Source B
10+
content: https://example.org/source-b
11+
content_type: text/plain

0 commit comments

Comments
 (0)