linkml / linkml-runtime

Runtime support for linkml generated models
https://linkml.io/linkml/
Creative Commons Zero v1.0 Universal
22 stars 21 forks source link

check that install of "latest dependent packages" of linkml_runtime still results in tests passing (as opposed to running tests only on the poetry.lock dependencies) #288

Closed sierra-moxon closed 7 months ago

sierra-moxon commented 7 months ago

add a check dependencies action that removes the poetry.lock file and reinstalls the linkml-runtime environment (getting the latest compatible packages in the pyproject.toml specification) and then runs the tests as a way of testing the code in a PR on the latest package dependencies

partially resolves #1749.

After discussion during developer days hackathon, we want to limit our downstream build dependencies (e.g. not build out bmt, etc from LinkML packages directly), but makes sense to take this first step towards "latest possible" dependency checking.

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (d45970a) 62.09% compared to head (0579243) 62.09%. Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #288 +/- ## ======================================= Coverage 62.09% 62.09% ======================================= Files 63 63 Lines 8461 8461 Branches 2170 2170 ======================================= Hits 5254 5254 Misses 2599 2599 Partials 608 608 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sierra-moxon commented 7 months ago

I agree it's a little bit pushy w/re to upgrade if this action fails. I did use the methodology downstream in biolink-model to find a breaking change in linkml 1.6.4 that wasn't caught by the existing linkml tests, nor was it caught by the poetry.lock version of the biolink-model repo (as that was still at linkml 1.6.3).

The "pushy" part was that in order to get my biolink-model PR to pass this dependency check, I had to update my poetry.lock file in biolink to use linkml 1.6.4 and then change the biolink-model code generation to follow the new pattern introduced in linkml 1.6.4. I'm glad I caught this and I put in a linkml PR to support the old way for awhile so other models downstream don't inadvertently run into this, but it was a bit hard to decide to tie an upgrade of linkml to an unrelated PR so that the PR would pass its tests.

maybe a compromise would be setting `continue-on-error: true` to the run steps that check downstream dependencies -- that way the submitter gets an email of the failure, but the PR can still go thru