stac-utils / stac-utils/pystac

Object serialization should not make network requests by default

Open
#960 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

breaking
Dominant language
Python
Stars
463
Forks
134
Avg merge
10h
Merged PRs (30d)
4

Description

As discussed in https://github.com/stac-utils/pystac/issues/958, Item.to_dict can make one or more network requests if an object's root is unresolved and transform_hrefs == True (the default). This can lead to a huge number of near-simultaneous network requests, e.g. in the case of large scale batch processing of Items read in from a data store (e.g. a geoparquet table).

The simplest fix would be to make transform_hrefs default to False for all of PySTAC. This would be a breaking change, since the default behavior would be changing in potentially unexpected ways. This issue is intended to track this potential change, with the goal of gathering feedback and alternatives before a future PySTAC v2.0.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading issue #958 and tracing Item.to_dict with transform_hrefs=True. Review the affected PySTAC serialization APIs and gather feedback on the default, alternatives, and compatibility concerns. Done means reaching an agreed direction for a future PySTAC v2.0 change.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.