From 7c16f437110861ca9e708c0431a5ab8506caee2e Mon Sep 17 00:00:00 2001 From: Stavros Theocharis <55717550+stavrostheocharis@users.noreply.github.com> Date: Mon, 5 Feb 2024 18:46:23 +0200 Subject: [PATCH] Release fixes (#6) * Fixed setup * Fixed README --- README.md | 94 +++++++++++++++++++++++++++++++++++++------------------ setup.py | 47 +++++++++++++++++++++++++--- 2 files changed, 105 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 9e3f092..3e72104 100644 --- a/README.md +++ b/README.md @@ -1,59 +1,71 @@
-# Weather data retriever -[![Python Version](https://img.shields.io/badge/python-3.7%20%7C%203.8%20%7C%203.9-blue.svg)](#supported-python-versions) -[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) -[![License](https://img.shields.io/badge/License-MIT-informational.svg)](https://github.com/stavrostheocharis/weather_data_retriever/blob/main/LICENSE) +# Weather Data Retriever +[![Python Version](https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-blue.svg)](#supported-python-versions) +[![GitHub](https://badgen.net/badge/icon/GitHub?icon=github&color=black&label)](https://github.com/stavrostheocharis/weather_data_retriever) +[![PyPI](https://badge.fury.io/py/weather-data-retriever.svg)](https://pypi.org/project/weather-data-retriever/) +[![Downloads](https://badgen.net/pypi/dm/weather-data-retriever)](https://pypi.org/project/weather-data-retriever/#files) +[![Code Style: Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) +[![License](https://img.shields.io/github/license/stavrostheocharis/weather-data-retriever)](LICENSE) -**Retriever of multiple sources weather data** -(NASA's larc-power project, open-meteo) +**A tool for retrieving weather data from multiple sources.** +(Currently supporting NASA's POWER Project and Open-Meteo)
## Requirements -### Python version -* Main supported version : 3.9
-* Other supported versions : 3.7 & 3.8 -To use the scripts on your computer, please make sure you have one of these versions installed. +### Python Version +- **Main supported version:** `3.11` +- **Other supported versions:** `3.8`, `3.9`, `3.10` -### Install environment & dependencies +Ensure one of these Python versions is installed on your computer. -In order to install the current repo you have 2 options: -- Installation as a project repo -- Pip install it directly from git inside your prefered repo and use it as a package -#### Installation as a project +### Environment & Dependencies -In order to run the needed scripts you need to have python installed and run the command below. -``` +To install this repository, you have two options: +- Install as a project repository. +- Install directly from Pypu using pip within your preferred environment. + + +#### Project Installation + +Ensure Python is installed, then create a virtual environment and activate it: + +```bash python3 -m venv /path/to/new/virtual/environment + +source /path/to/new/virtual/environment/bin/activate ``` -To activate your `venv` run `source "env_name"/bin/activate`. +Install dependencies with: -To install dependencies run the command: ```bash pip install -r requirements.txt ``` -#### Installation as a package +#### Package Installation + +To use it as a package within your project, execute: -In order to use the current repo as a package you need to run the command below inside your project. ```bash -pip install git+https://github.com/stavrostheocharis/weather_data_retriever.git +pip install weather-data-retriever ``` -## Information about the functionality +## Functionality Overview + +This package aggregates weather data from various open APIs into a simplified form. It utilizes: -This package is based on multiple open weather API'sand combines them in a simple form for use. The API's that are being used are listed below: -- [Nasa's weather open API (larc-power) and 'POWER' tools and application](https://power.larc.nasa.gov/docs/). -- [Open-Meteo's weather API collaborating with national weather services providing open data](https://open-meteo.com/). +- [Nasa's weather open API (larc-power) and 'POWER' tools and application](https://power.larc.nasa.gov/docs/) for historical weather data across different aggregation levels and community cases. +- [Open-Meteo's weather API collaborating with national weather services providing open data](https://open-meteo.com/) for both historical and forecasted weather data from national weather services. + +### NASA's POWER API + +Fetch historical weather data at various aggregation levels: -### Nasa's weather open API (larc-power) -The data that can be fetched are historical. The aggregation cases and the different community cases that can be used are analysed below: [**Aggregation**](https://power.larc.nasa.gov/docs/services/api/temporal/) - *Climatology*: Provides parameters as climatologies for a pre-defined period with monthly average, maximum, and/or minimum values available. @@ -88,11 +100,13 @@ The "T2M", "T2MDEW", "T2MWET", "TS", "RH2M", "PRECTOT", "WS2M", and "ALLSKY SFC Statistics and availability of the data can be found at [power dashboard](https://power.larc.nasa.gov/dashboard/). -Please follow the [quick start notebook](larc_power_quick_start.ipynb) in order to understand how to easily get started. +Refer to the [POWER API Documentatio](https://power.larc.nasa.gov/docs/services/api/temporal/) for detailed information on available data types and the [quick start notebook](larc_power_quick_start.ipynb) for guidance. + -### Open-Meteo's weather API +### Open-Meteo API + +Suitable for accessing both historical and forecasted data: -This part can be used for both historical and forecasted data. [**Aggregation**](https://power.larc.nasa.gov/docs/services/api/temporal/) - *Daily*: Provides parameters by day with average, maximum, and/or minimum values. @@ -121,6 +135,7 @@ Each aggregation level permits a specific set of variables to be used. In additi Open-Meteo's source code is available on [GitHub](https://github.com/open-meteo/open-meteo). Please follow the [quick start notebook](open_meteo_quick_start.ipynb) in order to understand how to easily get started. + #### Licence - Open-Meteo APIs are free for non-commercial use. The access is not restricted, but it is asked for fair use. - All data is provided as is without any warranty. @@ -143,3 +158,20 @@ For more information, see [`CONTRIBUTING`](https://github.com/stavrostheocharis/ ## References 1. [How To Create a Python Package for Fetching Weather Data](https://medium.com/towards-artificial-intelligence/how-to-create-a-python-package-for-fetching-weather-data-b17614627f30) + + +[github_badge]: https://badgen.net/badge/icon/GitHub?icon=github&color=black&label + +[github_link]: https://github.com/stavrostheocharis/weather_data_retriever + +[pypi_badge]: https://badge.fury.io/py/weather-data-retriever.svg + +[pypi_link]: https://pypi.org/project/weather-data-retriever/ + +[download_badge]: https://badgen.net/pypi/dm/weather-data-retriever + +[download_link]: https://pypi.org/project/weather-data-retriever/#files + +[licence_badge]: https://img.shields.io/github/license/stavrostheocharis/weather-data-retriever + +[licence_link]: LICENSE \ No newline at end of file diff --git a/setup.py b/setup.py index 90d7a18..fee855c 100644 --- a/setup.py +++ b/setup.py @@ -3,18 +3,55 @@ with open("LICENSE") as f: license = f.read() +long_description = open("README.md", "r").read() + setup( name="weather_data_retriever", - version="1.1", - author="Stavros Theocharis", + packages=find_packages(exclude="tests"), + version="0.1.0", + license=license, description="Weather data retriever", - long_description="Multiple sources weather data retriever", + long_description=long_description, + long_description_content_type="text/markdown", + author="Stavros Theocharis", + author_email="stavrostheocharis@yahoo.gr", url="https://github.com/stavrostheocharis/weather_data_retriever.git", - packages=find_packages(exclude="tests"), + keywords=[ + "weather data", + "historical data", + "meteo data", + "nasa data" + ] install_requires=[ "pandas", "geopy", "requests", ], - license=license, + classifiers=[ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Topic :: Software Development :: Build Tools", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + ], ) + + +[github_badge]: https://badgen.net/badge/icon/GitHub?icon=github&color=black&label + +[github_link]: https://github.com/stavrostheocharis/easy_explain + +[pypi_badge]: https://badge.fury.io/py/easy-explain.svg + +[pypi_link]: https://pypi.org/project/easy-explain/ + +[download_badge]: https://badgen.net/pypi/dm/easy-explain + +[download_link]: https://pypi.org/project/easy-explain/#files + +[licence_badge]: https://img.shields.io/github/license/stavrostheocharis/streamlit-token-craft + +[licence_link]: LICENSE \ No newline at end of file