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(openweather): implementation to API openweather #762

Closed
wants to merge 8 commits into from

Conversation

jmellano
Copy link
Contributor

@jmellano jmellano commented May 2, 2020

Salut,

j'ai vu que vous vouliez changer la partie météo de darksky vers openweather.
Du coup pour me remettre dans Gladys et surtout la v4, j'ai essayé d'implémenter qqch.
Ce n'est pas fini (cf. todo list en bas), mais je voudrais juste un avis sur le fait que cette feature est toujours identifiée comme prioritaire (pour la sortie d'une RC) et que le code va dans la bonne direction pour toi. (#726 )

Pull Request check-list

To ensure your Pull Request can be accepted as fast as possible, make sure to review and check all of these items:

  • If your changes affects code, did your write the tests?
  • Are tests passing? (npm test on both front/server)
  • Is the linter passing? (npm run eslint on both front/server)
  • Did you run prettier? (npm run prettier on both front/server)
  • If your changes modify the API (REST or Node.js), did you modify the API documentation? (Documentation is based on comments in code)
  • If you are adding a new features/services which needs explanation, did you modify the user documentation? See the GitHub repo and the website.
  • Did you add fake requests data for the demo mode (front/src/config/demo.json) so that the demo website is working without a backend? (if needed) See https://demo.gladysassistant.com.

NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.

Description of change

Please provide a description of the change here. It's always best with screenshots, so don't hesitate to add some!

@jmellano jmellano force-pushed the feat-openweather branch 3 times, most recently from 774e6b9 to 828e29f Compare May 3, 2020 22:21
@Pierre-Gilles Pierre-Gilles changed the title feat(openweather): implementation to API openweather [WIP] feat(openweather): implementation to API openweather May 4, 2020
@Pierre-Gilles
Copy link
Contributor

Nice! I put [WIP] in the title to indicate that this PR is still work in progress.

Feel free to mark this PR as "Ready for review" when the PR is finished :)

Thanks for your work 🙌

@jmellano jmellano force-pushed the feat-openweather branch 2 times, most recently from 314e2ad to 2c84fcf Compare May 4, 2020 15:30
@codecov
Copy link

codecov bot commented May 4, 2020

Codecov Report

Merging #762 into master will increase coverage by 0.32%.
The diff coverage is 93.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #762      +/-   ##
==========================================
+ Coverage   92.38%   92.71%   +0.32%     
==========================================
  Files         419      419              
  Lines        5427     5421       -6     
==========================================
+ Hits         5014     5026      +12     
+ Misses        413      395      -18     
Impacted Files Coverage Δ
server/api/controllers/weather.controller.js 100.00% <ø> (ø)
server/lib/weather/weather.command.js 14.28% <0.00%> (ø)
server/services/openweather/index.js 92.59% <83.33%> (ø)
server/lib/weather/weather.get.js 100.00% <100.00%> (ø)
server/services/index.js 100.00% <100.00%> (ø)
server/services/openweather/lib/formatResults.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9806a07...da02ccc. Read the comment docs.

@jmellano jmellano force-pushed the feat-openweather branch 3 times, most recently from b2c44b8 to 12a844c Compare May 4, 2020 19:53
@jmellano jmellano changed the title [WIP] feat(openweather): implementation to API openweather feat(openweather): implementation to API openweather May 4, 2020
@jmellano
Copy link
Contributor Author

jmellano commented May 4, 2020

Quand tu dis "Feel free to mark this PR as "Ready for review" when the PR is finished"... ca consiste a retirer le WIP du titre, on est bien d'accord ?

Pour le fail sur le codecov/patch... je pense qu'il faut en discuter mais en supprimant la partie "dark sky" ca doit revenir au niveau voulu

@jmellano jmellano force-pushed the feat-openweather branch from 12a844c to 0969a6c Compare May 5, 2020 06:50
@Pierre-Gilles
Copy link
Contributor

Tu retires WIP du titre + tu demandes une review =>

Screenshot 2020-05-05 at 09 26 44

Sinon je ne suis pas notifié et je n'ai aucune idée qu'il faut que je vienne ici :)

je pense qu'il faut en discuter mais en supprimant la partie "dark sky" ca doit revenir au niveau voulu

Tu peux retirer la partie darksky :) Il faut que cette PR ait le bon code coverage sinon elle ne peut pas être mergée !

@jmellano jmellano force-pushed the feat-openweather branch 4 times, most recently from b346e91 to 6c83339 Compare May 6, 2020 20:21
@jmellano
Copy link
Contributor Author

jmellano commented May 6, 2020

@Pierre-Gilles pour la partie "+ tu demandes une review "... je crois que je n'ai pas les droits...

j'ai rien au niveau "Reviewers" qui m'indique que je peux sélectionner qqn...

@Pierre-Gilles Pierre-Gilles self-requested a review May 12, 2020 08:45
@Pierre-Gilles
Copy link
Contributor

Ah mince! Bon je me suis auto ajouté alors :)

Copy link
Contributor

@Pierre-Gilles Pierre-Gilles left a comment

Choose a reason for hiding this comment

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

Thanks for this great PR ! 👏

This is really good work ! I added a few feedbacks, if you can add a look?

Note: there is a conflict with some recent changes on the way we translate services, see #805

server/services/openweather/index.js Outdated Show resolved Hide resolved
@@ -169,7 +169,7 @@
"humidity": 0.99,
"pressure": 1005.09,
"datetime": "2019-05-09T04:27:57.000Z",
"units": "si",
Copy link
Contributor

Choose a reason for hiding this comment

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

Be careful, there are still mention of "si" in the code (search in the code to find where)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

? weird...in my branch there is no more mentions on "si"...even in demo.json file it's "metric"

Copy link
Contributor

Choose a reason for hiding this comment

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

Screenshot 2020-06-01 at 11 13 35

Screenshot 2020-06-01 at 11 13 46

@jmellano jmellano force-pushed the feat-openweather branch from a32c687 to 60cc449 Compare May 28, 2020 21:13
@jmellano jmellano requested a review from Pierre-Gilles May 29, 2020 06:41
@jmellano jmellano force-pushed the feat-openweather branch from 08f1d15 to 887c547 Compare June 2, 2020 08:54
Copy link
Contributor

@Pierre-Gilles Pierre-Gilles left a comment

Choose a reason for hiding this comment

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

Thanks for this great PR 👏

This is now merged in 242bd84

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