Skip to content

Commit

Permalink
first-any_of-range
Browse files Browse the repository at this point in the history
  • Loading branch information
turbomam committed Sep 13, 2024
1 parent 5930939 commit 69c9abf
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 2 deletions.
1 change: 1 addition & 0 deletions assets/MimsSoil-collection_date-absent-report.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[ERROR] [src/data/examples/invalid/MimsSoil-collection_date-absent.yaml/0] 'collection_date' is a required property in /
1 change: 1 addition & 0 deletions assets/MimsSoil-collection_date-from_enum-report.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
No issues found
1 change: 1 addition & 0 deletions assets/MixsCompliantData-001-report.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
No issues found
18 changes: 16 additions & 2 deletions project.Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
RUN=poetry run

src/data/valid/MixsCompliantData-001-report.txt: src/data/examples/valid \
assets/MixsCompliantData-001-report.txt: src/data/examples/valid/MixsCompliantData-001.yaml \
src/mixs_missing_value_sandbox/schema/mixs_missing_value_sandbox.yaml
$(RUN) linkml-validate \
--schema $(word 2,$^) \
--target-class $(shell echo $(basename $(notdir $(word 1,$^))) | cut -d'-' -f1) \
$(word 1,$^) > $@

src/data/valid/MixsCompliantData-001.tsv: src/data/examples/valid \
assets/MimsSoil-collection_date-absent-report.txt: src/data/examples/invalid/MimsSoil-collection_date-absent.yaml \
src/mixs_missing_value_sandbox/schema/mixs_missing_value_sandbox.yaml
$(RUN) linkml-validate \
--schema $(word 2,$^) \
--target-class $(shell echo $(basename $(notdir $(word 1,$^))) | cut -d'-' -f1) \
$(word 1,$^) > $@

assets/MimsSoil-collection_date-from_enum-report.txt: src/data/examples/valid/MimsSoil-collection_date-from_enum.yaml \
src/mixs_missing_value_sandbox/schema/mixs_missing_value_sandbox.yaml
$(RUN) linkml-validate \
--schema $(word 2,$^) \
--target-class $(shell echo $(basename $(notdir $(word 1,$^))) | cut -d'-' -f1) \
$(word 1,$^) > $@

assets/MixsCompliantData-001.tsv: src/data/examples/valid/MixsCompliantData-001.yaml \
src/mixs_missing_value_sandbox/schema/mixs_missing_value_sandbox.yaml
$(RUN) linkml-convert --schema $(word 2,$^) \
--output $@ \
Expand Down
12 changes: 12 additions & 0 deletions src/data/examples/invalid/MimsSoil-collection_date-absent.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
depth: "123"
elev: "123"
project_name: abc
samp_name: abc

env_broad_scale: unicorn [example:999]
env_local_scale: unicorn [example:999]
env_medium: unicorn [example:999]
geo_loc_name: "unicorn: unicorn, unicorn"
lat_lon: 45.67 45.67
samp_taxon_id: unicorn [NCBITaxon:999]
seq_meth: xxx
13 changes: 13 additions & 0 deletions src/data/examples/valid/MimsSoil-collection_date-from_enum.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
depth: "123"
elev: "123"
project_name: abc
samp_name: abc

collection_date: '2013-03-25T12:42:31+01:00'
env_broad_scale: unicorn [example:999]
env_local_scale: unicorn [example:999]
env_medium: unicorn [example:999]
geo_loc_name: "unicorn: unicorn, unicorn"
lat_lon: 45.67 45.67
samp_taxon_id: unicorn [NCBITaxon:999]
seq_meth: xxx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ classes:
mixins:
- Mims
class_uri: MIXS:0010007_0016012
slot_usage:
collection_date:
any_of:
- range: datetime
- range: MixsMissingValueEnum
Mims:
description: Metagenome or Environmental
title: MIMS
Expand Down Expand Up @@ -1882,6 +1887,12 @@ slots:
partial_match: true

enums:
MixsMissingValueEnum:
permissible_values:
missing1: { }
missing2: { }
missing3: { }

DrainageClassEnum:
permissible_values:
excessively drained:
Expand Down

0 comments on commit 69c9abf

Please sign in to comment.