Skip to content
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

Fix minzoom and maxzoom attribute error #226

Merged
merged 3 commits into from
Oct 27, 2024
Merged

Conversation

giswqs
Copy link
Contributor

@giswqs giswqs commented Oct 24, 2024

rio-tiler v0.7.0.1 has removed min/max zoom attribute in the Info response.
Fix #225

@codecov-commenter
Copy link

codecov-commenter commented Oct 24, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 33.33333% with 4 lines in your changes missing coverage. Please review.

Project coverage is 83.52%. Comparing base (4ba30af) to head (7ffc5ec).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #226      +/-   ##
==========================================
- Coverage   83.74%   83.52%   -0.23%     
==========================================
  Files          26       26              
  Lines        1046     1050       +4     
==========================================
+ Hits          876      877       +1     
- Misses        170      173       +3     

@@ -89,11 +89,17 @@ def band_names(self):

@property
def min_zoom(self):
return self.info.minzoom
if hasattr(self, "info") and hasattr(self.info, "minzoom"):
Copy link
Owner

Choose a reason for hiding this comment

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

the first hasattr check here isn't necessary as the client has info as a defined property. Just the secod check is all that is needed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It has been fixed. I wasn't sure if rio-tiler has removed the info attribute entirely

Copy link
Owner

Choose a reason for hiding this comment

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

Oh, I see what you mean. I’ll take a look at this

Copy link
Owner

Choose a reason for hiding this comment

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

The Info class is still present, just min/max zoom attributes were removed.

@banesullivan banesullivan merged commit b19e7d0 into banesullivan:main Oct 27, 2024
8 checks passed
@giswqs
Copy link
Contributor Author

giswqs commented Oct 27, 2024

Good to know. Thanks for confirming

@banesullivan
Copy link
Owner

0.10.5 is tagged and should be released shortly

@giswqs giswqs deleted the rio branch October 28, 2024 00:26
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.

AttributeError: 'Info' object has no attribute 'minzoom'
3 participants