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

doc: add example, interval selection on a map #3275

Merged
merged 3 commits into from
Nov 27, 2023

Conversation

mattijn
Copy link
Contributor

@mattijn mattijn commented Nov 25, 2023

This PR adds a new example showing how one can use the selection interval on a map:

image

ref: #1232

@mattijn
Copy link
Contributor Author

mattijn commented Nov 25, 2023

@binste, do you know how I can avoid this mypy error?

error: Cannot find implementation or library stub 
for module named "geopandas"  [import-not-found]

@binste
Copy link
Contributor

binste commented Nov 26, 2023

In the lint workflow, only normal and dev dependencies are being installed. geopandas is a doc dependency so far and hence, mypy can't find it. As we now use it in this example which is also a test, geopandas should be moved from doc dependencies to dev in pyproject.toml. As geopandas is not a typed package as far as I know, you'll first get another error:

tests/examples_methods_syntax/interval_selection_map_quakes.py:11: error: Skipping analyzing "geopandas": module is installed, but missing library stubs or py.typed marker  [import-untyped]

which you can solve by adding geopandas.* to the modules under [[tool.mypy.overrides]] in pyproject.toml.

These two steps should make mypy happy :)

Copy link
Contributor

@binste binste left a comment

Choose a reason for hiding this comment

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

Great example! Could you harmonize the usage of single and double quotes to one of them (my preference is double quotes). Apart from that, looks good to me.

@mattijn
Copy link
Contributor Author

mattijn commented Nov 27, 2023

Thanks for the review @binste. Applied your suggestions. Tests are happy, so merging.

@mattijn mattijn merged commit 13d2cc6 into main Nov 27, 2023
20 checks passed
@binste
Copy link
Contributor

binste commented Nov 28, 2023

I like the idea of "happy" tests. Petition for GitHub to replace the red X and green check mark with grumpy and happy smilies ;)

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.

None yet

2 participants