You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
With dates in the format 2024-01-22, Schema-Automator assigns the type to date-time in the schema. Validating the data with linkml validate causes the validation to fail because date-time should have the format 2024-01-22T00:00:00Z.
To Reproduce
Create a schema with dates in the 2024-01-22 format, then attempt to validate that data with linkml validate
Expected behavior
Schema-Automator should choose the more appropriate date range to allow validation
Output of the attempt to validate:
$ linkml validate --schema toy_data/schema-automator-data/ToySchema.yaml --target-class sample toy_data/raw_data/sample.tsv
[ERROR] [toy_data/raw_data/sample.tsv/0] '2024-01-22' is not a 'date-time' in /sample_date
[ERROR] [toy_data/raw_data/sample.tsv/1] '2024-01-19' is not a 'date-time' in /sample_date
[ERROR] [toy_data/raw_data/sample.tsv/2] '2024-01-16' is not a 'date-time' in /sample_date
[ERROR] [toy_data/raw_data/sample.tsv/3] '2024-01-16' is not a 'date-time' in /sample_date
The text was updated successfully, but these errors were encountered:
Describe the bug
With dates in the format 2024-01-22, Schema-Automator assigns the type to date-time in the schema. Validating the data with
linkml validate
causes the validation to fail because date-time should have the format 2024-01-22T00:00:00Z.To Reproduce
Create a schema with dates in the 2024-01-22 format, then attempt to validate that data with
linkml validate
Expected behavior
Schema-Automator should choose the more appropriate
date
range to allow validationAdditional context
Here is a quick sample file.
sample_id subject_id sample_type sample_date
SAMP-3343 SUBJ001 Blood 2024-01-22
SAMP-3636 SUBJ002 Blood 2024-01-19
SAMP-3673 SUBJ003 Blood 2024-01-16
SAMP-8569 SUBJ004 Blood 2024-01-16
SAMP-2621 SUBJ005 Saliva 2024-01-20
Output of the attempt to validate:
$ linkml validate --schema toy_data/schema-automator-data/ToySchema.yaml --target-class sample toy_data/raw_data/sample.tsv
[ERROR] [toy_data/raw_data/sample.tsv/0] '2024-01-22' is not a 'date-time' in /sample_date
[ERROR] [toy_data/raw_data/sample.tsv/1] '2024-01-19' is not a 'date-time' in /sample_date
[ERROR] [toy_data/raw_data/sample.tsv/2] '2024-01-16' is not a 'date-time' in /sample_date
[ERROR] [toy_data/raw_data/sample.tsv/3] '2024-01-16' is not a 'date-time' in /sample_date
The text was updated successfully, but these errors were encountered: