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

Add file:// to self links that don't have a protocol #1472

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jsignell
Copy link
Member

@jsignell jsignell commented Nov 5, 2024

Related Issue(s):

Description:

Pystac already coerces self links to absolute, so now it adds file:// as well.

Notes:

  • TODO: There are still some tests that are failing. Mostly having to do with normalize.
  • The json schema spec does define how "format": "iri" should be handled, but the Python implementation does seem to validate it very well. For instance this passes:
from jsonschema import validate

validate("any-string", {"type": "string", "format": "iri", "minLength": 1})

PR Checklist:

  • Pre-commit hooks and 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.

@KeynesYouDigIt
Copy link

KeynesYouDigIt commented Nov 16, 2024

Hey there, let me know if you want me to take on any of the todos above, and if so if I should PR to your branch. No worries if you'd rather just stay heads down!

@jsignell
Copy link
Member Author

Hey there, let me know if you want me to take on any of the todos above, and if so if I should PR to your branch. No worries if you'd rather just stay heads down!

Yeah the more I have been thinking about this PR the more I think it should be considered a breaking change and wait until pystac 2.0. Part of the reason why I am leaning that way is because the jsonschema validation does not raise.

@KeynesYouDigIt KeynesYouDigIt mentioned this pull request Nov 23, 2024
5 tasks
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.

Add file:// protocol to self links that currently don't have a protocol
2 participants