Skip to content

Conversation

@jsignell
Copy link
Member

Related Issue(s):

Description:

The min_version and max_version should always be coerced to STACVersionID objects.

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.

def test_version_range_set_min_and_max_directly(self) -> None:
version_range = STACVersionRange()
version_range.min_version = "1.0.0-beta.1" # type:ignore
version_range.max_version = "1.1.0" # type:ignore
Copy link
Member Author

Choose a reason for hiding this comment

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

Mypy hates this type of coersion apparently. python/mypy#3004 although that got closed in the last few days so maybe we can delete these ignore statements someday?

Copy link
Member

Choose a reason for hiding this comment

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

Yup, and since they're in tests I'm not too worried about adding them now.

@codecov
Copy link

codecov bot commented Jan 27, 2025

Codecov Report

Attention: Patch coverage is 88.88889% with 3 lines in your changes missing coverage. Please review.

Project coverage is 91.47%. Comparing base (79cc5af) to head (2a762d8).
Report is 25 commits behind head on main.

Files with missing lines Patch % Lines
pystac/serialization/identify.py 88.88% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1512      +/-   ##
==========================================
- Coverage   91.47%   91.47%   -0.01%     
==========================================
  Files          54       54              
  Lines        7522     7542      +20     
  Branches      911      915       +4     
==========================================
+ Hits         6881     6899      +18     
  Misses        457      457              
- Partials      184      186       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@gadomski gadomski left a comment

Choose a reason for hiding this comment

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

LGTM ... do you think this is serious enough to do an immediate bugfix release? My instinct is to wait and see if any other reports trickle in this week.

def test_version_range_set_min_and_max_directly(self) -> None:
version_range = STACVersionRange()
version_range.min_version = "1.0.0-beta.1" # type:ignore
version_range.max_version = "1.1.0" # type:ignore
Copy link
Member

Choose a reason for hiding this comment

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

Yup, and since they're in tests I'm not too worried about adding them now.

@jsignell
Copy link
Member Author

do you think this is serious enough to do an immediate bugfix release?

I don't have a good sense of the impact. But seems like waiting a few days should be totally fine

@jsignell jsignell added this pull request to the merge queue Jan 28, 2025
Merged via the queue into stac-utils:main with commit fbc98fa Jan 28, 2025
23 checks passed
@jsignell jsignell deleted the version-range branch January 28, 2025 14:38
@gadomski gadomski mentioned this pull request Feb 19, 2025
kmodali pushed a commit to kmodali/pystac that referenced this pull request Oct 16, 2025
…utils#1512)

* Make sure that VersionRange has VersionIDs rather than strings

* Update changelog
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.

STACVersionID assigned string value in migration

2 participants