Skip to content

Commit

Permalink
Rename classes to upper camel case, rename Stations classes to Request
Browse files Browse the repository at this point in the history
  • Loading branch information
gutzbenj committed Mar 6, 2021
1 parent a1a9e46 commit 690222b
Show file tree
Hide file tree
Showing 78 changed files with 1,341 additions and 1,392 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Expand Up @@ -7,6 +7,7 @@ Development
- Add StationsResult and ValuesResult to allow for new workflow and connect stations and
values request
- Add accessor .values to Stations class to get straight to values for a request
- Rename Stations to Request and use upper camel case e.g. DwdObservationRequest

0.14.1 (21.02.2021)
*******************
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Expand Up @@ -211,8 +211,8 @@ Acquisition of historical data for specific stations using ``wetterdienst`` as l

.. code-block:: python
>>> from wetterdienst.dwd.observations import DWDObservationStations
>>> request = DWDObservationStations(
>>> from wetterdienst.dwd.observations import DwdObservationRequest
>>> request = DwdObservationRequest(
... parameter=["climate_summary"],
... resolution="daily",
... start_date="1990-01-01", # Timezone: UTC
Expand Down
139 changes: 108 additions & 31 deletions THIRD_PARTY_NOTICES
Expand Up @@ -42,7 +42,7 @@ http://docs.python-cerberus.org
UNKNOWN

GitPython
3.1.12
3.1.14
BSD License
Sebastian Thiel, Michael Trier
https://github.com/gitpython-developers/GitPython
Expand Down Expand Up @@ -149,7 +149,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


Pillow
8.1.0
8.1.1
Historical Permission Notice and Disclaimer (HPND)
Alex Clark (PIL Fork Author)
https://python-pillow.org
Expand Down Expand Up @@ -220,7 +220,7 @@ SOFTWARE.


Pygments
2.7.4
2.8.0
BSD License
Georg Brandl
https://pygments.org/
Expand Down Expand Up @@ -259,7 +259,7 @@ https://github.com/hsoft/send2trash
UNKNOWN

Sphinx
3.4.3
3.5.1
BSD License
Georg Brandl
http://sphinx-doc.org/
Expand Down Expand Up @@ -465,7 +465,7 @@ https://github.com/ethanfurman/aenum
UNKNOWN

aiohttp
3.7.3
3.7.4
Apache Software License
Nikolay Kim
https://github.com/aio-libs/aiohttp
Expand Down Expand Up @@ -1398,7 +1398,7 @@ one at http://mozilla.org/MPL/2.0/.


cffi
1.14.4
1.14.5
MIT License
Armin Rigo, Maciej Fijalkowski
http://cffi.readthedocs.org
Expand Down Expand Up @@ -1507,9 +1507,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


coverage
5.4
5.5
Apache Software License
Ned Batchelder and 146 others
Ned Batchelder and 148 others
https://github.com/nedbat/coveragepy

Apache License
Expand Down Expand Up @@ -1749,11 +1749,60 @@ DAMAGE.


defusedxml
0.6.0
0.7.0
Python Software Foundation License
Christian Heimes
https://github.com/tiran/defusedxml
UNKNOWN
PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
--------------------------------------------

1. This LICENSE AGREEMENT is between the Python Software Foundation
("PSF"), and the Individual or Organization ("Licensee") accessing and
otherwise using this software ("Python") in source or binary form and
its associated documentation.

2. Subject to the terms and conditions of this License Agreement, PSF
hereby grants Licensee a nonexclusive, royalty-free, world-wide
license to reproduce, analyze, test, perform and/or display publicly,
prepare derivative works, distribute, and otherwise use Python
alone or in any derivative version, provided, however, that PSF's
License Agreement and PSF's notice of copyright, i.e., "Copyright (c)
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Python Software Foundation;
All Rights Reserved" are retained in Python alone or in any derivative
version prepared by Licensee.

3. In the event Licensee prepares a derivative work that is based on
or incorporates Python or any part thereof, and wants to make
the derivative work available to others as provided herein, then
Licensee hereby agrees to include in any such work a brief summary of
the changes made to Python.

4. PSF is making Python available to Licensee on an "AS IS"
basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
INFRINGE ANY THIRD PARTY RIGHTS.

5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.

6. This License Agreement will automatically terminate upon a material
breach of its terms and conditions.

7. Nothing in this License Agreement shall be deemed to create any
relationship of agency, partnership, or joint venture between PSF and
Licensee. This License Agreement does not grant permission to use PSF
trademarks or trade name in a trademark sense to endorse or promote
products or services of Licensee, or any third party.

8. By copying, installing or otherwise using Python, Licensee
agrees to be bound by the terms and conditions of this License
Agreement.



dephell
0.8.3
Expand Down Expand Up @@ -3199,7 +3248,7 @@ THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


importlib-resources
5.1.0
5.1.2
Apache Software License
Barry Warsaw
https://github.com/python/importlib_resources
Expand Down Expand Up @@ -3245,7 +3294,7 @@ http://github.com/RonnyPfannschmidt/iniconfig


ipykernel
5.4.3
5.5.0
BSD License
IPython Development Team
https://ipython.org
Expand Down Expand Up @@ -3593,6 +3642,13 @@ to indicate the copyright and license terms:
# Distributed under the terms of the Modified BSD License.


kiwis-pie
0.10.0
BSD License
Andrew MacDonald
https://github.com/amacd31/kiwis_pie
UNKNOWN

kiwisolver
1.3.1
BSD License
Expand Down Expand Up @@ -6243,7 +6299,7 @@ https://github.com/prometheus/client_python


prompt-toolkit
3.0.14
3.0.16
BSD License
Jonathan Slenders
https://github.com/prompt-toolkit/python-prompt-toolkit
Expand Down Expand Up @@ -6326,7 +6382,7 @@ https://py.readthedocs.io/


pybufrkit
0.2.17
0.2.18
MIT License
Yang Wang
https://github.com/ywangd/pybufrkit
Expand Down Expand Up @@ -6685,7 +6741,7 @@ https://github.com/spyder-ide/pywinpty
UNKNOWN

pyzmq
22.0.2
22.0.3
GNU Library or Lesser General Public License (LGPL), BSD License
Brian E. Granger, Min Ragan-Kelley
https://pyzmq.readthedocs.org
Expand Down Expand Up @@ -7121,13 +7177,41 @@ https://requests.readthedocs.io


ruamel.yaml
0.16.12
0.16.13
MIT License
Anthon van der Neut
https://sourceforge.net/p/ruamel-yaml/code/ci/default/tree
The MIT License (MIT)

Copyright (c) 2014-2020 Anthon van der Neut, Ruamel bvba
Copyright (c) 2014-2021 Anthon van der Neut, Ruamel bvba

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


ruamel.yaml.clib
0.2.2
MIT License
Anthon van der Neut
https://sourceforge.net/p/ruamel-yaml-clib/code/ci/default/tree
The MIT License (MIT)

Copyright (c) 2019-2020 Anthon van der Neut, Ruamel bvba

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -8242,13 +8326,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


soupsieve
2.1
2.2
MIT License
Isaac Muse
https://github.com/facelessuser/soupsieve
MIT License

Copyright (c) 2018 Isaac Muse <isaacmuse@gmail.com>
Copyright (c) 2018 - 2021 Isaac Muse <isaacmuse@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -8763,7 +8847,7 @@ http://github.com/JASchilz/surrogate
UNKNOWN

tabulate
0.8.7
0.8.9
MIT License
Sergey Astanin
https://github.com/astanin/python-tabulate
Expand Down Expand Up @@ -9159,7 +9243,7 @@ http://www.tornadoweb.org/


tqdm
4.56.0
4.58.0
MIT License, Mozilla Public License 2.0 (MPL 2.0)
UNKNOWN
https://github.com/tqdm/tqdm
Expand All @@ -9172,7 +9256,7 @@ Exceptions or notable authors are listed below
in reverse chronological order:

* files: *
MPLv2.0 2015-2020 (c) Casper da Costa-Luis
MPLv2.0 2015-2021 (c) Casper da Costa-Luis
[casperdcl](https://github.com/casperdcl).
* files: tqdm/_tqdm.py
MIT 2016 (c) [PR #96] on behalf of Google Inc.
Expand Down Expand Up @@ -9970,13 +10054,6 @@ Geoffrey Sneddon
https://github.com/SimonSapin/python-webencodings
UNKNOWN

websockets
8.1
BSD License
Aymeric Augustin
https://github.com/aaugustin/websockets
UNKNOWN

yarl
1.6.3
Apache Software License
Expand Down Expand Up @@ -10186,13 +10263,13 @@ https://github.com/aio-libs/yarl/


yaspin
1.3.0
1.4.1
MIT License
Pavlo Dmytrenko
https://github.com/pavdmyt/yaspin
MIT License

Copyright (c) 2020 Pavlo Dmytrenko
Copyright (c) 2021 Pavlo Dmytrenko

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions docs/data/coverage/dwd.rst
Expand Up @@ -117,9 +117,9 @@ parameters can be queried. Take a look at the massive amount of data:

.. ipython:: python
from wetterdienst.dwd.observations import DWDObservationMetadata
from wetterdienst.dwd.observations import DwdObservationMetadata
observations_meta = DWDObservationMetadata()
observations_meta = DwdObservationMetadata()
# Selection of daily historical data
print(
Expand Down
18 changes: 9 additions & 9 deletions docs/img/readme_img.py
Expand Up @@ -6,29 +6,29 @@
import matplotlib.pyplot as plt
import pandas as pd

from wetterdienst.dwd.observations import DWDObservationStations, DWDObservationValues, DWDObservationParameter, DWDObservationParameterSet, DWDObservationResolution, DWDObservationPeriod
from wetterdienst.dwd.observations import DwdObservationRequest, DwdObservationValues, DwdObservationParameter, DwdObservationParameterSet, DwdObservationResolution, DwdObservationPeriod

plt.style.use('ggplot')


def create_temperature_ts_plot():
""" Create plot for README sketch """
stations = DWDObservationStations(
DWDObservationParameterSet.CLIMATE_SUMMARY,
DWDObservationResolution.DAILY,
DWDObservationPeriod.HISTORICAL
stations = DwdObservationRequest(
DwdObservationParameterSet.CLIMATE_SUMMARY,
DwdObservationResolution.DAILY,
DwdObservationPeriod.HISTORICAL
)

df = stations.all()

station_id, _, _, height, lat, lon, station_name, state = df.sort_values("FROM_DATE").iloc[0].values
station_name = station_name.replace(u"ß", "ss")

data = DWDObservationValues(
data = DwdObservationValues(
[station_id],
DWDObservationParameter.DAILY.TEMPERATURE_AIR_200,
DWDObservationResolution.DAILY,
period=[DWDObservationPeriod.HISTORICAL]
DwdObservationParameter.DAILY.TEMPERATURE_AIR_200,
DwdObservationResolution.DAILY,
period=[DwdObservationPeriod.HISTORICAL]
)

df = data.all()
Expand Down

0 comments on commit 690222b

Please sign in to comment.