Skip to content

DM-54856: Add support for resolving referenced schemas automatically and convert the CLI to use resource paths and URIs#181

Merged
JeremyMcCormick merged 9 commits into
mainfrom
tickets/DM-54856
May 15, 2026
Merged

DM-54856: Add support for resolving referenced schemas automatically and convert the CLI to use resource paths and URIs#181
JeremyMcCormick merged 9 commits into
mainfrom
tickets/DM-54856

Conversation

@JeremyMcCormick
Copy link
Copy Markdown
Collaborator

@JeremyMcCormick JeremyMcCormick commented May 13, 2026

This PR updates the resolution of relative resource URIs such as uri: drp_base.yaml to use the schema's base path. For instance, if the schema was loaded from file:///tmp/yml/schema.yaml, then for a resource this would resolve to file:///tmp/tmp/drp_base.yaml. Referenced URIs with absolute paths will not trigger this behavior.

The command line interface was also converted to use URIs, because the previous behavior using file streams did not provide URIs for this resolution.

Checklist

  • Ran Jenkins
  • Added a release note for user-visible changes to docs/changes

@codecov
Copy link
Copy Markdown

codecov Bot commented May 13, 2026

Codecov Report

❌ Patch coverage is 94.11765% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.81%. Comparing base (2e63aeb) to head (71a2682).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
python/felis/db/database_context.py 77.77% 3 Missing and 1 partial ⚠️
python/felis/datamodel.py 96.42% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #181      +/-   ##
==========================================
+ Coverage   91.78%   91.81%   +0.03%     
==========================================
  Files          13       13              
  Lines        2046     2066      +20     
  Branches      296      300       +4     
==========================================
+ Hits         1878     1897      +19     
  Misses        110      110              
- Partials       58       59       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JeremyMcCormick JeremyMcCormick force-pushed the tickets/DM-54856 branch 4 times, most recently from 6093a24 to e74e4f7 Compare May 13, 2026 21:35
Comment thread python/felis/cli.py Outdated
Copy link
Copy Markdown
Member

@timj timj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks okay. Still not sure why you didn't change the file to uri and keep the same helper.

Comment thread python/felis/datamodel.py
Comment thread python/felis/datamodel.py Outdated
Comment thread python/felis/datamodel.py
Comment thread python/felis/datamodel.py Outdated
Comment thread python/felis/datamodel.py Outdated
Comment thread python/felis/datamodel.py Outdated
Comment thread python/felis/datamodel.py Outdated
Comment thread python/felis/metadata.py
@JeremyMcCormick
Copy link
Copy Markdown
Collaborator Author

Looks okay. Still not sure why you didn't change the file to uri and keep the same helper.

Please see #181 (comment).

Comment thread python/felis/cli.py Outdated
This changes all logging calls to use printf rather than than f-string
formatting.
There are issues manging the logger when `felis` is used as the logger
name. This changes several loggers to use their full module names
instead.
Copy link
Copy Markdown
Member

@timj timj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing the loggers.

This adds explicit handler config to the `cli` module and sets the
default log level to `DEBUG` when running tests. Log messages will
still be filtered based on the `--log-cli-level` of `pytest`, which is
the desired behavior.
pydocstyle seems to be confusing this with the `Parameters` section
from the docstring.
@JeremyMcCormick JeremyMcCormick merged commit 0d0033e into main May 15, 2026
25 checks passed
@JeremyMcCormick JeremyMcCormick deleted the tickets/DM-54856 branch May 15, 2026 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants