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 WMSWebTile.to_dict() method #140

Merged
merged 3 commits into from
Mar 5, 2023
Merged

Conversation

wang-boyu
Copy link
Member

There are two web tiles classes with different kind attributes:

@dataclass
class RasterWebTile:
    ...
    kind: str = "raster_web_tile"
    ...

@dataclass
class WMSWebTile(RasterWebTile):
    ...
    kind = "wms_web_tile"
    ...

Apparently WMSWebTile also needs to type-hint its kind field - otherwise it won't get overwritten, as explained here.

This PR fixes this issue.

@wang-boyu wang-boyu added this to the v0.5.0 milestone Mar 5, 2023
@codecov
Copy link

codecov bot commented Mar 5, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.18 🎉

Comparison is base (bea0f32) 80.18% compared to head (ea7f389) 80.36%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #140      +/-   ##
==========================================
+ Coverage   80.18%   80.36%   +0.18%     
==========================================
  Files          10       10              
  Lines         656      657       +1     
  Branches      136      136              
==========================================
+ Hits          526      528       +2     
  Misses        114      114              
+ Partials       16       15       -1     
Impacted Files Coverage Δ
mesa_geo/tile_layers.py 100.00% <100.00%> (ø)
mesa_geo/visualization/modules/MapVisualization.py 91.66% <100.00%> (+1.83%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@rht
Copy link
Contributor

rht commented Mar 5, 2023

LGTM

@rht rht merged commit 9bc6c58 into projectmesa:main Mar 5, 2023
@wang-boyu wang-boyu deleted the fix/WMSWebTile branch March 5, 2023 23:28
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.

2 participants