Skip to content

Conversation

@mielvds
Copy link
Collaborator

@mielvds mielvds commented Nov 4, 2025

This PR moves functionality from context_resolver.py to iri_resolver.py so it can be maintained and tested separately.
This includes:

  • isolating the resolving of relative to absolute IRIs in a separate resolve() function and adding unittests
  • moving the existing function remove_dot_segments() and adding unittests

This work is inspired by https://github.com/rubensworks/relative-to-absolute-iri.js (which is used in https://github.com/rubensworks/jsonld-streaming-parser.js) and can be considered a JS to Python port. The unittests are also ported from that repo as they battle-test both functions.

This PR is work in progress and currently uses pytest for convenience (this might change later).

@mielvds mielvds added this to the v2.0.5 milestone Nov 4, 2025
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