Skip to content
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

Preserve relative links when using from_file #972

Closed
wants to merge 3 commits into from

Conversation

gadomski
Copy link
Member

@gadomski gadomski commented Jan 31, 2023

Related Issue(s):

Description:

When reading Catalogs/Collections from files, a user should be able to preserve any relative links e.g. to children. Otherwise, re-saving the Catalog/Collection may produce surprising results (e.g. filesystem-absolute links where previously they were relative, breaking portability).

This is currently a draft PR demonstrating the problem. The fix will likely be adding a catalog_type argument to from_file, but we should explore other options as well, since adding a new argument to such a widely used classmethod is not ideal.

PR Checklist:

  • Code is formatted (run pre-commit run --all-files)
  • Tests pass (run scripts/test)
  • Documentation has been updated to reflect changes, if applicable
  • This PR maintains or improves overall codebase code coverage.
  • Changes are added to the CHANGELOG. See the docs for information about adding to the changelog.

@gadomski gadomski added this to the 1.7 milestone Jan 31, 2023
@gadomski gadomski self-assigned this Jan 31, 2023
@gadomski gadomski force-pushed the issues/838-preserve-relative-hrefs branch 2 times, most recently from 49974ef to 197ad97 Compare February 21, 2023 16:20
@gadomski gadomski force-pushed the issues/838-preserve-relative-hrefs branch from 197ad97 to 247d27c Compare February 21, 2023 17:25
@codecov-commenter
Copy link

Codecov Report

Base: 90.13% // Head: 90.13% // No change to project coverage 👍

Coverage data is based on head (247d27c) compared to base (a573835).
Patch has no changes to coverable lines.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #972   +/-   ##
=======================================
  Coverage   90.13%   90.13%           
=======================================
  Files          47       47           
  Lines        6164     6164           
  Branches      923      923           
=======================================
  Hits         5556     5556           
  Misses        426      426           
  Partials      182      182           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@gadomski
Copy link
Member Author

Closing, as this test wasn't exactly the issue from OP.

@gadomski gadomski closed this Feb 25, 2023
@gadomski gadomski deleted the issues/838-preserve-relative-hrefs branch February 25, 2023 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants