Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

first-any_of-range #10

Merged
merged 1 commit into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading