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

NWS API: Adjust User-Agent header #792

Merged
merged 1 commit into from
Nov 21, 2022
Merged

Conversation

amotl
Copy link
Member

@amotl amotl commented Nov 21, 2022

Coming from #781 (comment), this is hopefully a minor, but sensible improvement. Please let me know if you think it's not.

@amotl amotl requested a review from gutzbenj November 21, 2022 00:31
@amotl amotl marked this pull request as ready for review November 21, 2022 00:40
@@ -4,6 +4,7 @@

import pandas as pd

from wetterdienst import __version__
Copy link
Member Author

Choose a reason for hiding this comment

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

Bummer.

ImportError: cannot import name '__version__' from partially initialized module 'wetterdienst' (most likely due to a circular import) (/home/runner/work/wetterdienst/wetterdienst/wetterdienst/__init__.py)

@amotl amotl force-pushed the amo/nws-adjust-user-agent branch from 7ee8a62 to a5bac17 Compare November 21, 2022 02:03
"User-Agent": "wetterdienst/gutzemann@gmail.com",
"User-Agent": "wetterdienst/0.48.0",
Copy link
Member Author

Choose a reason for hiding this comment

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

Until we can use the real version number at runtime, I think it will be better than nothing.

Copy link
Member

Choose a reason for hiding this comment

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

The reason I put my mail there is their hint
"""
Authentication
A User Agent is required to identify your application. This string can be anything, and the more unique to your application the less likely it will be affected by a security event. If you include contact information (website or email), we can contact you if your string is associated to a security event. This will be replaced with an API key in the future.
User-Agent: (myweatherapp.com, contact@myweatherapp.com)
"""

@amotl
Copy link
Member Author

amotl commented Nov 21, 2022 via email

@gutzbenj gutzbenj merged commit 1638f74 into main Nov 21, 2022
@gutzbenj gutzbenj deleted the amo/nws-adjust-user-agent branch November 21, 2022 17:00
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