Skip to content

feat: Print human readable type name in error messages #498

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

Conversation

l0b0
Copy link
Contributor

@l0b0 l0b0 commented Jun 29, 2021

Based on https://stackoverflow.com/a/13477954/96588.

Also add tests to verify the exception being thrown.

Related Issue(s): #331

Description:

PR Checklist:

  • Code is formatted (run pre-commit run --all-files)
  • 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.

@codecov-commenter
Copy link

codecov-commenter commented Jun 29, 2021

Codecov Report

Merging #498 (c364212) into main (c0f0b6d) will increase coverage by 0.10%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #498      +/-   ##
==========================================
+ Coverage   95.43%   95.54%   +0.10%     
==========================================
  Files          71       71              
  Lines        9978    10008      +30     
==========================================
+ Hits         9523     9562      +39     
+ Misses        455      446       -9     
Impacted Files Coverage Δ
pystac/extensions/datacube.py 62.64% <ø> (+0.37%) ⬆️
pystac/extensions/eo.py 96.69% <ø> (ø)
pystac/extensions/file.py 95.38% <ø> (ø)
pystac/extensions/item_assets.py 68.29% <ø> (+2.43%) ⬆️
pystac/extensions/label.py 96.63% <ø> (ø)
pystac/extensions/pointcloud.py 96.69% <ø> (ø)
pystac/extensions/projection.py 97.60% <ø> (+0.79%) ⬆️
pystac/extensions/raster.py 90.97% <ø> (+0.36%) ⬆️
pystac/extensions/sat.py 96.92% <ø> (+1.53%) ⬆️
pystac/extensions/scientific.py 96.91% <ø> (+0.61%) ⬆️
... and 16 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c0f0b6d...c364212. Read the comment docs.

l0b0 added 2 commits June 30, 2021 12:39
Based on <https://stackoverflow.com/a/13477954/96588>.

Also add tests to verify the exception being thrown.
@l0b0 l0b0 force-pushed the print-human-readable-type-name-in-error-messages branch from 8669809 to c364212 Compare June 30, 2021 00:42
@l0b0 l0b0 requested a review from duckontheweb June 30, 2021 00:42
@l0b0 l0b0 marked this pull request as ready for review June 30, 2021 00:42
Copy link
Contributor

@duckontheweb duckontheweb left a comment

Choose a reason for hiding this comment

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

👍

@duckontheweb duckontheweb merged commit e8a9c82 into stac-utils:main Jun 30, 2021
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.

3 participants