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 streamlit-folium incompatibility (add layer to map with new class) #1834

Merged
merged 5 commits into from
Nov 27, 2023

Conversation

Conengmo
Copy link
Member

Fix the compatibility issue between Folium 0.15.0 and streamlit-folium, see randyzwitch/streamlit-folium#148.

When adding layers to the map, don't add the relevant code to the figure object. Instead, add a new class instance to the Layer instance. That way it will get rendered even if only the map and not the figure is being rendered. This is also maybe a bit nicer, since it's more in line with how the rest of Folium works.

@Conengmo Conengmo changed the title Add Layer to map with MacroElement class Fix streamlit-folium incompatibility (add layer to map with new class) Nov 21, 2023
@BastienGauthier
Copy link
Contributor

Works for me !

@Conengmo
Copy link
Member Author

pre-commit.ci autofix

@Conengmo Conengmo merged commit d250952 into python-visualization:main Nov 27, 2023
11 checks passed
@Conengmo Conengmo deleted the fix-layer-in-streamlit branch November 27, 2023 13:58
@Conengmo
Copy link
Member Author

@ocefpaf when you have a moment, could you make a v0.15.1 release please? I already put an update in the changelog: https://github.com/python-visualization/folium/blob/main/CHANGES.txt

@BastienGauthier
Copy link
Contributor

@ocefpaf, if you have time to do the release before the end of next week it could help me quite a lot for my project actually :)
Thanks !

@Conengmo
Copy link
Member Author

Conengmo commented Dec 4, 2023

I think all relevant code to publish to PyPI is in our Github Actions, so I'll give it a try to bake a release later today.

@ocefpaf
Copy link
Member

ocefpaf commented Dec 4, 2023

I can do this today and I'll write a guide so others can do it in my absence.

@Conengmo
Copy link
Member Author

Conengmo commented Dec 4, 2023

Sounds good @ocefpaf, thank you!

@ocefpaf
Copy link
Member

ocefpaf commented Dec 4, 2023

Sounds good @ocefpaf, thank you!

Done! I thought I broke GHA last time but it was in top condition, so all we have to do is:

  1. Go on Draft a new release:
    Screenshot from 2023-12-04 08-21-33

  2. Type the release number with a prefixed v for the tag, like v0.15.2 and vlick on create new tag on publish.

  3. Use the same number for the release version below.

  4. Click on the `Generate release notes" (I usually edit that a bit, like removing bot PRs and writing smaller titles).

  5. Click on publish and wait for the GHA to submit the artifacts to PyPI. Conda-forge bots usually picks the release up automatically after ~1 hour and you don't need to do anything there.

Screenshot from 2023-12-04 08-22-50

@Conengmo
Copy link
Member Author

Conengmo commented Dec 4, 2023

Perfect @ocefpaf, very clear! To be sure, I'll announce any new release in advance.

Let's also stop updating CHANGES.txt from next release onwards. At that time I'll add a line on top to point towards our Github releases. And update our readme as well.

[edit] to be sure we can find this guide again I posted it to the wiki: https://github.com/python-visualization/folium/wiki/How-to-make-a-release

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