Skip to content

feat: V2 links updates#1693

Merged
ircwaves merged 12 commits intostac-utils:v2from
ircwaves:v2-links-updates-pt1
Apr 27, 2026
Merged

feat: V2 links updates#1693
ircwaves merged 12 commits intostac-utils:v2from
ircwaves:v2-links-updates-pt1

Conversation

@ircwaves
Copy link
Copy Markdown
Member

@ircwaves ircwaves commented Apr 6, 2026

Related Issue(s):

  • Pystac v2: Get tests/v1 passing #1657
  • adds Container.get_item
  • adds Link.clone via deepcopy
  • adds Link.target setter with deprecation notice
  • adds Link.get_absolute_href, as it was needed for some v1 tests
  • restores Link.resolve_stac_object
  • restores convenience methods for common link types (child, collection, item, derived_from)

Description:

PR Checklist:

  • Pre-commit hooks pass (run pre-commit run --all-files)
  • Tests pass (run pytest)
  • Documentation has been updated to reflect changes, if applicable
  • This PR maintains or improves overall codebase code coverage
  • This PR's title is formatted per conventional commits

@ircwaves ircwaves changed the title V2 links updates pt1 feat: V2 links updates pt1 Apr 6, 2026
@ircwaves ircwaves mentioned this pull request Apr 20, 2026
23 tasks
@ircwaves ircwaves force-pushed the v2-links-updates-pt1 branch from 72eed09 to b6aab34 Compare April 20, 2026 20:01
@ircwaves ircwaves marked this pull request as ready for review April 20, 2026 20:06
@ircwaves ircwaves changed the title feat: V2 links updates pt1 feat: V2 links updates Apr 21, 2026
@ircwaves ircwaves force-pushed the v2-links-updates-pt1 branch from 060d2f5 to f62e8ab Compare April 22, 2026 14:07
Comment thread src/pystac/container.py Outdated
@ircwaves ircwaves force-pushed the v2-links-updates-pt1 branch from f62e8ab to a2ebb38 Compare April 22, 2026 15:13
Comment thread src/pystac/link.py
Comment thread tests/v1/test_link.py
mime_type = "example/stac_thing"
link = pystac.Link(rel, target, mime_type, "a title", extra_fields={"a": "b"})
link = pystac.Link(
rel, target, media_type=mime_type, title="a title", extra_fields={"a": "b"}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we should look for extra_fields in init kwargs and if they are in there, raise a warning, but use them to update kwargs. It would be a surprising change to have extra_fields show up in the dict.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good point. incoming

Comment thread tests/v1/test_link.py
Copy link
Copy Markdown
Member

@jsignell jsignell left a comment

Choose a reason for hiding this comment

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

This looks good to me!

@ircwaves ircwaves merged commit 614bae0 into stac-utils:v2 Apr 27, 2026
14 checks passed
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