csparpa / pyowm

A Python wrapper around the OpenWeatherMap web API
https://pyowm.readthedocs.io
MIT License
789 stars 171 forks source link

Add One Call functionality: (1) exclude parts and (2) set desired units #326

Closed jwmelvin closed 4 years ago

jwmelvin commented 4 years ago

I added the ability for one call requests to use both an "exclude" parameter and "units" parameter. As part of that, in the OneCall object, I made the hourly weather data optional, and added the ability to handle minutely weather data. I left the current weather as required.

As per the OWM specs, exclude may be set to any subset of: current,minutely,hourly,daily; and units may be set to: metric or imperial.

csparpa commented 4 years ago

@jwmelvin sorry, I've been unable to work on PyOWM for a while! Thank you so much for this PR - could you add a bit of unit testing and user-level documentation to it? Let me know ;-) Thanks!

jwmelvin commented 4 years ago

I did run the unit tests but don't understand the results. I'm happy to add documentation for my added features. Where should I add it?

csparpa commented 4 years ago

Hi @jwmelvin

the documentation can be easily added to the code recipes file here

As regards the unit tests, if you push them on this PR I will be able to take a look and help

Thanks for your work!

jwmelvin commented 4 years ago

Ugh. I did the documentation and the unit tests. But my commit includes another file by mistake, sorry (about timestamps). Hopefully this will get you enough info to proceed?