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

Run streamlit-folium tests as part of our CI #2117

Merged
merged 4 commits into from
Apr 6, 2025

Conversation

hansthen
Copy link
Collaborator

@hansthen hansthen commented Mar 16, 2025

Closes #2112

@hansthen hansthen changed the title WIP first try of running streamlit-folium tests Run streamlit-folium tests as part of our CI Mar 16, 2025
@hansthen hansthen requested a review from Conengmo March 16, 2025 18:44
Copy link
Member

@Conengmo Conengmo left a comment

Choose a reason for hiding this comment

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

Added a comment about how we install Streamlit-folium.

Something else, don't know if you already tried this. It's not critical for merging this, but could be nice. Maybe it's nice to verify this test works as intended by pushing a commit that should fail the test, then see if the pipeline fails. If it does, we know it works and can revert that commit. If we squash merge then the commit history on this branch doesn't really matter.

- name: Test with pytest and retry flaky tests up to 3 times
run: |
cd streamlit_folium
pip install streamlit-folium
Copy link
Member

Choose a reason for hiding this comment

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

This installs the latest release from Pypi. While the tests we run are 'local' and from their main branch. Maybe that can lead to issues if their master branch has new tests that don't work on the latest release. Maybe it's safer to install the local version with pip install -e?

Copy link
Member

Choose a reason for hiding this comment

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

Something else is I would put installing the package in its own step, now it's together with actually running the tests.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Does it make a difference? I don't know much about best practices for the github CI/CD.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This installs the latest release from Pypi. While the tests we run are 'local' and from their main branch. Maybe that can lead to issues if their master branch has new tests that don't work on the latest release. Maybe it's safer to install the local version with pip install -e?

Yes good catch.

Copy link
Member

Choose a reason for hiding this comment

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

Does it make a difference? I don't know much about best practices for the github CI/CD

As far as I know it doesn't make a functional difference, just makes it easier to read and follow.

@hansthen
Copy link
Collaborator Author

Added a comment about how we install Streamlit-folium.

Something else, don't know if you already tried this. It's not critical for merging this, but could be nice. Maybe it's nice to verify this test works as intended by pushing a commit that should fail the test, then see if the pipeline fails. If it does, we know it works and can revert that commit. If we squash merge then the commit history on this branch doesn't really matter.

Yes good idea.

@hansthen hansthen requested a review from Conengmo March 22, 2025 13:37
Copy link
Member

@Conengmo Conengmo left a comment

Choose a reason for hiding this comment

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

Awesome!

@hansthen hansthen merged commit e468548 into python-visualization:main Apr 6, 2025
13 checks passed
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.

Run streamlit-folium test suite
2 participants