-
Notifications
You must be signed in to change notification settings - Fork 32
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
Migrate ign wmts services #166
Migrate ign wmts services #166
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@HaudinFlorence could you do a review of this change please?
xyzservices/tests/test_lib.py
Outdated
def test_callable(): | ||
# only testing the callable functionality to override a keyword, as we | ||
# cannot test the actual providers that need an API key | ||
original_key = str(xyz.GeoportailFrance.plan["apikey"]) | ||
updated_provider = xyz.GeoportailFrance.plan(apikey="mykey") | ||
assert isinstance(updated_provider, TileProvider) | ||
assert "url" in updated_provider | ||
assert updated_provider["apikey"] == "mykey" | ||
# check that original provider dict is not modified | ||
assert xyz.GeoportailFrance.plan["apikey"] == original_key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not necessarily test xyz.GeoportailFrance
tiles but the callable functionality of TileProvider
object. We need to keep the test, just use different TileProvider in there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK.
I will.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All tests passing.
@martinfleis @salahelfarissi Hello. I will have a look within this week, I started today but it will take me some time to be completely back on tracks on the topics, after almost 2 years. Hoping there is not too much time constraint for the PR to be merged right away. |
@HaudinFlorence thanks! There's no rush, it seems that the old URLs are still working. At least according to our CI. |
@martinfleis Thanks for your reply. It is still on my to-do list and will try to have a look in the following days. |
Hello. I have tested the PR and took some time to check that the script Here are my main comments/remarks (some of them are maybe not directly related to the migration itself but more to some maintenance of
|
# Rename for better readability | ||
name_parts = [part.lower().capitalize().replace("-", "_") for part in variant.split(".")] | ||
name = "_".join(name_parts) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This name building should maybe be reviewed to enable the last word of the name to have a capital letter. Maybe a special case should be used for acronyms whatever position it has in the name.
We have them. All if them are autogenerated. You can see them in the pytest log here: https://github.com/geopandas/xyzservices/actions/runs/8393293189/job/22987943322?pr=166 |
Ok. Nice. So sorry, you can forget about my comment. As mentionned I did not checked tests in details and am not very familir to python tests. But now I remember that at some point I was running them and we were trying to reduce the number of failing ones when we introduce the GeoportailFrance tile layers. |
Should I work on the name build or is it okay for this PR ? |
I would try to ensure the names are exactly as they were. It may not be optimal but it is released and some people may expect the exact names. |
Yes you are right @martinfleis. Changing the name now may be misleading. So I don't have any other comment. The PR seems ok to me. It seems to properly generates the data for the providers for GeoportailFrance basemaps. Thanks for your work @salahelfarissi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's give it a go. Thanks!
#165
This PR migrates the ign WMTS services to the new service:
https://data.geopf.fr/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetCapabilities
The new services don't have a categorizing key, like agriculture...
So I removed the apiKey as well as its test.
Edit
The test_callable is actually needed.