Skip to content

fix: added missing Classification parameter title #1539

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

Merged
merged 3 commits into from
Mar 18, 2025

Conversation

jonas-hurst
Copy link
Contributor

@jonas-hurst jonas-hurst commented Mar 18, 2025

Related Issue(s):

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.
  • Changes are added to the CHANGELOG. See the docs for information about adding to the changelog.

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.

Looks great, thanks for the quick fix? Can you add this to the tests, probably here:

def test_classification_object() -> None:
c = Classification.create(
name="dummy", description="empty class", value=0, color_hint="FF00AB"
)
assert c.name == "dummy"
assert c.description == "empty class"
assert c.color_hint == "FF00AB"
assert c.value == 0
assert Classification(c.to_dict()) == c
with pytest.raises(NotImplementedError):
c == "blah"
? Thanks.

@jonas-hurst jonas-hurst requested a review from gadomski March 18, 2025 10:33
@gadomski gadomski enabled auto-merge March 18, 2025 10:53
@gadomski gadomski added this pull request to the merge queue Mar 18, 2025
Copy link

codecov bot commented Mar 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.62%. Comparing base (1b89b9d) to head (f3e7141).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1539      +/-   ##
==========================================
+ Coverage   91.49%   91.62%   +0.12%     
==========================================
  Files          54       54              
  Lines        7571     7580       +9     
  Branches      922      923       +1     
==========================================
+ Hits         6927     6945      +18     
+ Misses        457      451       -6     
+ Partials      187      184       -3     

☔ 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.

Merged via the queue into stac-utils:main with commit 4dc0e0f Mar 18, 2025
19 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.

pystac.extensions.classification.Classification is missing property "title"
2 participants