schema-automator icon indicating copy to clipboard operation
schema-automator copied to clipboard

Fix date range without times

Open amc-corey-cox opened this issue 8 months ago • 1 comments

As shown in #160 , we don't properly assign the date range when a field doesn't include time. This should fix that and add a test to ensure it is properly assigned.

amc-corey-cox avatar May 08 '25 18:05 amc-corey-cox

Fixes #160

amc-corey-cox avatar May 08 '25 18:05 amc-corey-cox

Okay, I finally have the workflows all working and everything passing. I'm going to set this for merge and review. I had to disable windows-latest from the current workflow because it is having a jasonobj issue likely due to a stale dependency stack. I'll address the stale dependencies in #164 and #163 .

Fixes #162

amc-corey-cox avatar May 13 '25 17:05 amc-corey-cox

The windows issue is related to linkml-runtime. The problem is in .venv\Lib\site-packages\linkml_runtime\utils\context_utils.py. I have a fix but need to find out how to add a proper test.

I believe it is the same problem as here https://github.com/linkml/linkml/pull/2675/files/eed9908418173ab084ac6963c68ea4e4c65d85ad#r2089780280

dalito avatar May 14 '25 22:05 dalito

Here is a fix for windows: linkml/linkml-runtime#391

With the proposed change this PR passes all tests on Windows (I tested on a local machine). This was still with the old linkml and linkml-runtime from poetry.lock.

After updating all dependencies which brings linkml to 1.9.1 and linkml-runtime to 1.9.2, I had to fix the import of re in schema_automator\annotators\schema_annotator.py. Then I see only one other error:

FAILED tests/test_importers/test_jsonschema_importer.py::TestJsonSchemaImporter::test_import_hca_project -
FileNotFoundError: [Errno 2] No such file or directory: C:\\Users\\david\\MyProg\\gh-dalito\\schema-automator\\tests\\outputs\\hca\\type\\protocol\\sequencing\\module\\process\\sequencing\\S10x.yaml'

dalito avatar May 15 '25 13:05 dalito

@dalito I fixed that one in 617433bc580ab68de99443142910c194e0f962e7. We'll move to that PR once this one is merged.

ptgolden avatar May 15 '25 18:05 ptgolden

@ptgolden Does that look like it deals with the date parsing a little more sensibly?

amc-corey-cox avatar May 16 '25 18:05 amc-corey-cox