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 the streamlit with updated dictionary keys #136

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

balugans
Copy link
Contributor

@balugans balugans commented Aug 21, 2024

When querying a surf report on streamlit, we get error which is because of the change in the forecast keys and streamlit_helper not reflecting the changes.

The code ensures the streamlit_helper keys match the new forecast keys.

Summary by Sourcery

Update streamlit_helper to align with new forecast dictionary keys, fixing errors in surf report queries.

Bug Fixes:

  • Fix the streamlit_helper to use updated dictionary keys for surf report forecasts, resolving errors when querying reports.

Copy link
Contributor

sourcery-ai bot commented Aug 21, 2024

Reviewer's Guide by Sourcery

This pull request updates the streamlit_helper.py file to reflect changes in the forecast dictionary keys. The modifications ensure that the correct keys are used when accessing data from the report_dict, preventing errors when querying surf reports on Streamlit.

File-Level Changes

Files Changes
src/streamlit_helper.py Updated the key for accessing surf height from 'height' to 'surf height'
src/streamlit_helper.py Changed the key for accessing swell period from 'period' to 'swell period'
src/streamlit_helper.py Modified the key for accessing swell direction from 'direction' to 'swell direction'

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

👋 Hi! Thanks for submitting your first pull request!
• We appreciate your effort to improve this project.
• If you're enjoying your experience, please consider giving us a star ⭐
• It helps us grow and motivates us to keep improving! 🚀

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @balugans - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

@balugans balugans mentioned this pull request Aug 21, 2024
@ryansurf
Copy link
Owner

@balugans Nice work! Looks good to me 👍

If you'd like to create an issue for the missing streamlit-folium dependency, please feel free to do so!

Thanks for you contribution

@ryansurf
Copy link
Owner

@all-contributors please add @balugans for bug fix

Copy link
Contributor

@ryansurf

I've put up a pull request to add @balugans! 🎉

@ryansurf ryansurf merged commit 86cae5c into ryansurf:main Aug 21, 2024
4 checks passed
Copy link

codecov bot commented Aug 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Files Coverage Δ
src/streamlit_helper.py 0.00% <ø> (ø)

@balugans
Copy link
Contributor Author

@balugans Nice work! Looks good to me 👍

If you'd like to create an issue for the missing streamlit-folium dependency, please feel free to do so!

Thanks for you contribution

Sure will do. i will open the issue

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