-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Let non-hierarchical links to hierachical elements be relative paths for self-contained catalogs #1169
Let non-hierarchical links to hierachical elements be relative paths for self-contained catalogs #1169
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #1169 +/- ##
==========================================
+ Coverage 91.99% 92.00% +0.01%
==========================================
Files 51 51
Lines 6792 6808 +16
Branches 1000 1007 +7
==========================================
+ Hits 6248 6264 +16
Misses 368 368
Partials 176 176
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a test case that mirrors the example in the PR description? Thanks!
1cfea0c
to
2fafeaa
Compare
2fafeaa
to
1cda6f0
Compare
b275f65
to
c49c9d9
Compare
c49c9d9
to
ed1f446
Compare
Related Issue(s):
Closes #1112
Description:
This is an attempt to address the unexpected and maybe undesirable behavior identified in #1112. For this, we consider the case of a catalog tree which is defined using hierarchical links. When serialized out as a self-contained catalog, using
to_dict
yields relative links for all elements. Now, when we add additional links that have non-hierarchicalrel
types, but refer to entities which are in the hierarchical tree, the non-standard links are serialized with absolute hrefs.For the following tree
When we serialize
A
, we want to seebecause the referent of the
sibling
link has been serialized elsewhere in the catalog tree using a relative link. This is the result that is delivered by this PR. Whether this should be the default behavior is a separate concern, and we can have that discussion below.PR Checklist:
pre-commit
hooks pass locallyscripts/test
)