Skip to content

Commit

Permalink
Merge branch 'release-2.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Milind220 committed May 20, 2022
2 parents ba281f5 + f0a3f48 commit 4a51502
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 9 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Tests
on: [pull_request, push]

jobs:
test:
name: Run tests (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version:
- '3.8'
- '3.9'
- '3.10'

steps:
- uses: actions/checkout@v2

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
pip install -r requirements.txt
pip install -e .
- name: Run tests with pytest
run: |
pytest
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

![SVG of ozone logo](/src/media/ozone_logo.svg)

[![PyPI version](https://badge.fury.io/py/ozon3.svg)](https://badge.fury.io/py/ozon3) <a href="CONTRIBUTING.md#pull-requests"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome"></a> ![GitHub](https://img.shields.io/github/license/Milind220/Ozone) [![Complete Documentation](https://github.com/Milind220/Ozone/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/Milind220/Ozone/actions/workflows/pages/pages-build-deployment) [![Dependency Review](https://github.com/Milind220/Ozone/actions/workflows/dependency-review.yml/badge.svg)](https://github.com/Milind220/Ozone/actions/workflows/dependency-review.yml)
[![PyPI version](https://badge.fury.io/py/ozon3.svg)](https://badge.fury.io/py/ozon3) <a href="CONTRIBUTING.md#pull-requests"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome"></a> ![GitHub](https://img.shields.io/github/license/Milind220/Ozone) [![Complete Documentation](https://github.com/Milind220/Ozone/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/Milind220/Ozone/actions/workflows/pages/pages-build-deployment) [![Dependency Review](https://github.com/Milind220/Ozone/actions/workflows/dependency-review.yml/badge.svg)](https://github.com/Milind220/Ozone/actions/workflows/dependency-review.yml) [![Tests](https://github.com/Milind220/Ozone/actions/workflows/test.yml/badge.svg)](https://github.com/Milind220/Ozone/actions/workflows/test.yml)
[![Buy Me a Coffee](https://img.shields.io/badge/buy_me_a_coffee-orange.svg?style=flat)](https://www.buymeacoffee.com/MilindSharma)

## The simplest AQI API
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = ozon3
version = 2.0.1
version = 2.0.2
author = Milind Sharma
author_email = [email protected]
description = A package to get air quality data using the WAQI API
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
description="A package to get air quality data using the WAQI API",
license="GPLv3+",
url="https://github.com/Milind220/Ozone",
version="2.0.1",
download_url="https://github.com/Milind220/Ozone/archive/refs/tags/v2.0.1.tar.gz",
version="2.0.2",
download_url="https://github.com/Milind220/Ozone/archive/refs/tags/v2.0.2.tar.gz",
packages=setuptools.find_packages(),
install_requires=[
"numpy; python_version>='3'",
Expand Down
9 changes: 5 additions & 4 deletions src/ozone/ozone.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ def __init__(
Args:
token (str): The users private API token for the WAQI API.
output_path (str): The path to the location where
file_name (str): Name of output file
any output artifacts will be created
file_name (str): Name of output file
"""
self.token: str = token
self._check_token_validity()
Expand Down Expand Up @@ -248,7 +248,8 @@ def _extract_forecast_data(self, data_obj: Any) -> pandas.DataFrame:
the API's response.
Returns:
pandas.DataFrame: A dataframe containing the data."""
pandas.DataFrame: A dataframe containing the data.
"""
forecast = data_obj["forecast"]["daily"]
dict_of_frames = {}
for pol, lst in forecast.items():
Expand Down Expand Up @@ -331,7 +332,7 @@ def _AQI_meaning(self, aqi: float) -> Tuple[str, str]:
aqi (float): Air Quality Index (AQI) value.
Returns:
str: The meaning and health implication of the AQI value.
Tuple[str, str]: The meaning and health implication of the AQI value.
"""

if 0 <= aqi <= 50:
Expand Down Expand Up @@ -387,7 +388,7 @@ def _locate_all_coordinates(
Returns:
list: a list of all coordinates located between lower_bound and
upper_bound. If API request fails then returns [(-1, -1)].
upper_bound.
"""

coordinates_flattened: List[float] = list(
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def pytest_configure(config):
config.addinivalue_line("markers", "slow: mark test as slow to run")


# Skip slow tests unless --run_slow is given
# Run slow tests unless --skip_slow is given
def pytest_collection_modifyitems(config, items):
if config.getoption("--skip-slow"):
skip_slow = pytest.mark.skip(reason="skipped due to --skip-slow")
Expand Down

0 comments on commit 4a51502

Please sign in to comment.