cidgoh / DataHarmonizer

A standardized browser-based spreadsheet editor and validator that can be run offline and locally, and which includes templates for SARS-CoV-2 and Monkeypox sampling data. This project, created by the Centre for Infectious Disease Genomics and One Health (CIDGOH), at Simon Fraser University, is now an open-source collaboration with contributions from the National Microbiome Data Collaborative (NMDC), the LinkML development team, and others.
MIT License
91 stars 23 forks source link

Use existing todos conventions for min/max constraints #426

Closed pkalita-lbl closed 6 months ago

pkalita-lbl commented 6 months ago

These changes update the Validator class to be consistent with existing conventions around storing minimum and maximum date values in todos with the >= and <= prefixes. It also allows enables the use of the convention of >={other slot name} or <={other slot name} in todos to indicate that the min/max value for one slot is dependent on the value of another slot.

I added cases to the unit test and did some basic interactive testing with the covid template. I think it's working as expected without any changes to the existing schema. But please give it a good test and let me know if you find any existing schemas that aren't being interpreted correctly!