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

feat: add weather support #2178

Merged
merged 40 commits into from
Dec 23, 2018
Merged

feat: add weather support #2178

merged 40 commits into from
Dec 23, 2018

Conversation

djaiss
Copy link
Member

@djaiss djaiss commented Dec 21, 2018

This PR adds support for weather.

  • Information is pulled from Darksky which provides 1000 free calls per day.
  • Information is based on the latitude longitude.
  • The weather comes from a new service called GetWeatherInformation which takes a Place as a parameter.
  • If the given place doesn't have already a longitude/latitude, it tries to fetch it with the new geolocation service. If this service is not configured, it returns null.
  • Weather information for a given place is retrieved only once per 6 hours, in order to reduce the amount of queries.
  • There are two new ENV variables: ENABLE_WEATHER and DARKSKY_API_KEY to enable this service.

Things that remain to be done

  • Hide lat/longitude
  • Add temperature scale choice in the user settings
  • Changelog

The information is displayed on the left side of the profile page.

image

@djaiss djaiss changed the title feat: add weather support feat: add weather support [wip] Dec 21, 2018
Copy link

@sonarqubecloud sonarqubecloud bot left a comment

Choose a reason for hiding this comment

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

SonarQube analysis found issues:
Bug Bugs: 0
Vulnerability Vulnerabilities: 0
Code Smell Code Smells: 3

Including the following issue(s) which could not be reported in line:

  1. Code Smell Code Smell: 1 duplicated blocks of code must be removed. (more)
  2. Code Smell Code Smell: 1 duplicated blocks of code must be removed. (more)

See all issues in SonarCloud

Copy link
Member

@asbiin asbiin left a comment

Choose a reason for hiding this comment

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

Some changes to made ...

.env.example Outdated Show resolved Hide resolved
@djaiss djaiss changed the title feat: add weather support [wip] feat: add weather support Dec 22, 2018
@asbiin
Copy link
Member

asbiin commented Dec 23, 2018

I've change the darksky call to use SI units, to save temperature in database in celsius. We should only have standards units in our database, and convert it to odd units afterwards.

@djaiss
Copy link
Member Author

djaiss commented Dec 23, 2018

@asbiin awesome, thanks for the review and for the help!

@djaiss djaiss merged commit ca34dec into master Dec 23, 2018
@djaiss djaiss deleted the 2018-11-03-add-weather-support branch December 23, 2018 18:41
@github-actions
Copy link

This pull request has been automatically locked since there
has not been any recent activity after it was closed.
Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants