diff --git a/FILE_STRUCTURE.md b/FILE_STRUCTURE.md index 10e31c9..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) @@ -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. diff --git a/setup.cfg b/setup.cfg index 25700e3..a260755 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = ozon3 -version = 4.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 e8f6c12..c40b84a 100644 --- a/setup.py +++ b/setup.py @@ -11,8 +11,8 @@ "accurate and simple.", license="GPLv3+", url="https://github.com/Ozon3Org/Ozon3", - version="4.0.0", - download_url="https://github.com/Ozon3Org/Ozon3/archive/refs/tags/v4.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'", diff --git a/src/ozon3/ozon3.py b/src/ozon3/ozon3.py index 4581a42..967caaf 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 @@ -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 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 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