From 1c7f760d11edaad6953d8d1c6368c97fc3177d50 Mon Sep 17 00:00:00 2001 From: Milind Sharma Date: Tue, 26 Jul 2022 09:17:26 +0800 Subject: [PATCH 1/7] refactor: Remove faulty version up shell script --- updateVersion.sh | 61 ------------------------------------------------ 1 file changed, 61 deletions(-) delete mode 100644 updateVersion.sh diff --git a/updateVersion.sh b/updateVersion.sh deleted file mode 100644 index 565ef43..0000000 --- a/updateVersion.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/bash - -# This script is used for automating the process of updating patch numbers. -# Specifically, it updates the version number in setup.cfg (Line 3) and setup.py (Line 12 & 13) -# You can provide the script with either major, minor or patch (Case sensitive) -# Example usage: -# If the current version is 1.4.0, running './updateVersion.sh major' will change -# the current version to 2.0.0 - -if [ "$1" = "" ]; then -echo "You must provide an argument for this script" -echo "Your argument must be either major, minor or patch" -echo "See version semantics for more" -exit -fi - -if [ "$1" != "major" ] && [ "$1" != "minor" ] && [ "$1" != "patch" ]; then -echo "Incorrect argument provided" -echo "Your argument must be either major, minor or patch (Case sensitive)" -exit -fi - -VERSION_STRING=$(cat setup.cfg | grep "version") - -IFS=' ' -read -ra VERSION_STRING_ARR <<< $VERSION_STRING - -VERSION="${VERSION_STRING_ARR[@]:2:2}" - -echo "Current Version: $VERSION" - -IFS='.' - -read -ra VERSION_NUMBERS <<< $VERSION - -MAJOR=${VERSION_NUMBERS[@]::1} -MINOR=${VERSION_NUMBERS[@]:1:1} -PATCH=${VERSION_NUMBERS[@]:2:2} - -if [ "$1" = "major" ]; then -PATCH="0" -MINOR="0" -MAJOR=$(( $MAJOR + 1)) -fi - -if [ "$1" = "minor" ]; then -PATCH="0" -MINOR=$(( $MINOR + 1)) -fi - -if [ "$1" = "patch" ]; then -PATCH=$(( $PATCH + 1)) -fi - -UPDATED_VERSION="${MAJOR}.${MINOR}.${PATCH}" - -echo "Updated Version: $UPDATED_VERSION" - -sed -i "s/version = ${VERSION}/version = ${UPDATED_VERSION}/" setup.cfg -sed -i "s/^ version=\"${VERSION}\",/ version=\"${UPDATED_VERSION}\",/" setup.py -sed -i "s/^ download_url=\"https:\/\/github.com\/Ozon3Org\/Ozon3\/archive\/refs\/tags\/v${VERSION}.tar.gz\",/ download_url=\"https:\/\/github.com\/Ozon3Org\/Ozon3\/archive\/refs\/tags\/v${UPDATED_VERSION}.tar.gz\",/" setup.py From a68baaa564ccbae72a5109ead9f53fdb0e77af7f Mon Sep 17 00:00:00 2001 From: Milind Sharma Date: Tue, 26 Jul 2022 09:20:27 +0800 Subject: [PATCH 2/7] refactor[FILE_STRUCTURE]: Del updateVersion here --- FILE_STRUCTURE.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/FILE_STRUCTURE.md b/FILE_STRUCTURE.md index 10e31c9..87d587d 100644 --- a/FILE_STRUCTURE.md +++ b/FILE_STRUCTURE.md @@ -17,7 +17,6 @@ This document is a reference primer on Ozon3's files: what, where, and for what. - [.pre-commit-config.yaml](#pre-commit-configyaml) - [pyproject.toml, setup.py, and setup.cfg](#pyprojecttoml-setuppy-and-setupcfg) - [requirements.txt](#requirementstxt) -- [updateVersion.sh](#updateversionsh) - [.github/](#github) - [ISSUE_TEMPLATE/](#issue_template) - [workflows/](#workflows) @@ -89,10 +88,6 @@ Files used for purposes of packaging and installation. Also contains package inf Dependency requirement file for development. Non-developing users won't need to install packages in this file, as the installation process will install the user requirements automatically. -## updateVersion.sh - -A custom shell script to automatically increment version. This is purely a convenience script so that each time Ozon3 needs a new release, we won't need to alter the version numbers in multiple places by hand. - ## .github/ This folder is related to GitHub repository and not necessarily part of Ozon3 package. From 2fb823a47d00de7d93834c87f978f33d606e757d Mon Sep 17 00:00:00 2001 From: Milind Sharma Date: Sun, 16 Oct 2022 23:05:54 +0800 Subject: [PATCH 3/7] refactor[utils.py]: Ignore mypy type, remove unused import --- tests/utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/utils.py b/tests/utils.py index 489a18e..d4cad7c 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -1,4 +1,3 @@ -from pathlib import Path from urllib.parse import urlsplit, urlunsplit, urlencode import vcr from decouple import config @@ -36,4 +35,4 @@ def before_record_response(response): # Prepare a global Ozon3 object WAQI_TOKEN = config("WAQI_TOKEN", default="DUMMY_TOKEN") with vcr.use_cassette("tests/cassettes/ozon3_init.yaml", **vcr_kwargs): - api = Ozon3(WAQI_TOKEN) + api = Ozon3(WAQI_TOKEN) # type: ignore From 4c763a812904cbed219fea189b487044fdf60273 Mon Sep 17 00:00:00 2001 From: Milind Sharma Date: Wed, 2 Nov 2022 15:09:43 +0800 Subject: [PATCH 4/7] style [ozon3.py]: Edit file length --- src/ozon3/ozon3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ozon3/ozon3.py b/src/ozon3/ozon3.py index 4581a42..b3c6702 100644 --- a/src/ozon3/ozon3.py +++ b/src/ozon3/ozon3.py @@ -425,7 +425,7 @@ def get_range_coordinates_air( upper_bound: Tuple[float, float], df: pandas.DataFrame = pandas.DataFrame(), ) -> pandas.DataFrame: - """Get air quality data for range of coordinates between lower_bound and upper_bound + """Get aqi data for range of coordinates b/w lower_bound and upper_bound Args: lower_bound (tuple): start coordinate From 6fbea7126aa166b8901a369dff22f716c0a622f5 Mon Sep 17 00:00:00 2001 From: Milind Sharma Date: Tue, 24 Jan 2023 13:55:51 +0800 Subject: [PATCH 5/7] style [ozon3.py]: Add MyPy ignore line --- src/ozon3/ozon3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ozon3/ozon3.py b/src/ozon3/ozon3.py index b3c6702..967caaf 100644 --- a/src/ozon3/ozon3.py +++ b/src/ozon3/ozon3.py @@ -539,7 +539,7 @@ def get_city_station_options(self, city: str) -> pandas.DataFrame: ).sort_values(by=["score"], ascending=False) def get_historical_data( - self, city: str = None, city_id: int = None + self, city: str = None, city_id: int = None # type: ignore ) -> pandas.DataFrame: """Get historical air quality data for a city From d4bdd68c9006ecc27b2c1234a56370faeda25893 Mon Sep 17 00:00:00 2001 From: Milind Sharma Date: Tue, 24 Jan 2023 13:57:45 +0800 Subject: [PATCH 6/7] style [FILE_STRUCTURE]: Correct grammar --- FILE_STRUCTURE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FILE_STRUCTURE.md b/FILE_STRUCTURE.md index 87d587d..0c2917e 100644 --- a/FILE_STRUCTURE.md +++ b/FILE_STRUCTURE.md @@ -1,5 +1,5 @@ # File Structure -This document is a reference primer on Ozon3's files: what, where, and for what. +This document is a reference primer on Ozon3's files: what, where, and why. - [src/](#src) - [media/](#media) From 2e188f206c5b074f476c37209522206b6aa7bd10 Mon Sep 17 00:00:00 2001 From: Milind Sharma Date: Tue, 24 Jan 2023 14:00:49 +0800 Subject: [PATCH 7/7] chore: Update release version to v4.0.1 --- setup.cfg | 2 +- setup.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.cfg b/setup.cfg index f30df8d..a260755 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = ozon3 -version = 3.0.0 +version = 4.0.1 author = Milind Sharma author_email = milindsharma8@gmail.com description = An open-source package to easily obtain real-time, historical, or forecasted air quality data for anywhere in the world. Reliable, accurate and simple. diff --git a/setup.py b/setup.py index f9f577e..c40b84a 100644 --- a/setup.py +++ b/setup.py @@ -11,8 +11,8 @@ "accurate and simple.", license="GPLv3+", url="https://github.com/Ozon3Org/Ozon3", - version="3.0.0", - download_url="https://github.com/Ozon3Org/Ozon3/archive/refs/tags/v3.0.0.tar.gz", + version="4.0.1", + download_url="https://github.com/Ozon3Org/Ozon3/archive/refs/tags/v4.0.1.tar.gz", packages=setuptools.find_packages(), install_requires=[ "numpy; python_version>='3'",