linkml-runtime icon indicating copy to clipboard operation
linkml-runtime copied to clipboard

Correct `linkml_files.URL_FOR` - add URL resolutiontests

Open sneakers-the-rat opened this issue 1 year ago • 1 comments

Continues: https://github.com/linkml/linkml-runtime/pull/310 Fix: https://github.com/linkml/linkml/issues/2047

Previously I had fixed some problems with linkml_files but didn't test the URL_FOR function. This is used by the ContextGenerator and RDFGenerator, and causes linkml tests and fail and breaks them.

This PR

  • fixes URL_FOR
  • switches tests to pytest
  • Add requests_cache
  • Unskip tests for URL resolution and correctness - these are ~slow-ish, but since we're using them upstream i figure we should test them.
  • Skip fail-prone and unused github URL tests - I can't see where these functions are used within the library and they give us 403's constantly, we might want to remove those? i mostly care about the local path functions here, but also i don't think we should have broken stuff lying around if we can help it

edit: confirmed this does fix test_generators/test_rdfgen.py

sneakers-the-rat avatar Apr 03 '24 02:04 sneakers-the-rat

Codecov Report

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

Project coverage is 64.35%. Comparing base (0f99716) to head (df1a56e). Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #320      +/-   ##
==========================================
+ Coverage   62.70%   64.35%   +1.64%     
==========================================
  Files          63       63              
  Lines        8580     8612      +32     
  Branches     2444     2447       +3     
==========================================
+ Hits         5380     5542     +162     
+ Misses       2583     2456     -127     
+ Partials      617      614       -3     

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

codecov[bot] avatar Apr 03 '24 02:04 codecov[bot]

Merged as the action appears broken, see:

https://github.com/linkml/linkml-runtime/pull/324

cmungall avatar Jun 14 '24 20:06 cmungall

Retrospective note: it turns out the SoT for this file is actually in linkml_model, and any changes such as this PR get wiped out by the metamodel release process. Clearly this is not desirable, and the SoT should probably switch to this repo

cmungall avatar Jun 28 '24 14:06 cmungall