linkml / schema-automator

Automated assistance for the schema development lifecycle
https://linkml.io/schema-automator/
BSD 3-Clause "New" or "Revised" License
33 stars 12 forks source link

Windows fixes (make test suite pass on windows) #104

Closed dalito closed 1 year ago

dalito commented 1 year ago

This fixes all windows issues and adds Windows to the CI test matrix.

To pass all tests without error this PR requires the fixes in https://github.com/INCATools/ontology-access-kit/pull/345

dalito commented 1 year ago

The failure is due to pinning the very old scipy version (1.6.1) in oaklib. The poetry lock file must be updated. I was not sure if I should commit the changed file to https://github.com/INCATools/ontology-access-kit/pull/345 but will do so in a minute.

dalito commented 1 year ago

This should start to pass the tests after the next release of oaklib (v0.1.52) and after updating poetry.lock.

dalito commented 1 year ago

FYI: So far I have no idea what causes the failiure. With exactly the same package versions as in CI, I get no error when I run the test locally on Win10. But I'll continue investigating.

dalito commented 1 year ago

The error is caused by the line endings created by git checkout. Locally I work with the unix convention (LF). However, the windows pipeline uses the windows standard which is CRLF. If I convert my local file tests/resources/prof.ofn from LF to CRLF line endings I get the same error as in the CI pipeline. So the root of the problem is that the text (ofn) file is opened in binary mode. This happens in funowl.

.venv\lib\site-packages\funowl\converters\functional_converter.py:353: in to_python
    fparse(to_bytes_array(defn), 0, consumer)

There was a CRLF-related unit test added recently but no fix made.

dalito commented 1 year ago

@sierra-moxon - Can you restart the workflow? As a first time contributor in this repo I can't do it myself.

Using .gitattributes to set the line-ending to LF should decouple this PR from waiting for a fix in funowl.