Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/py versions #122

Merged
merged 9 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build_and_publish_to_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Install pypa/build
run: >-
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_and_publish_to_test_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Install pypa/build
run: >-
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sphinx_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ jobs:
- name: Check out repository code
uses: actions/checkout@v4

- name: Set up Python 3.10 env for sphinx...
- name: Set up Python 3.11 env for sphinx...
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Install python3/os requirements...
uses: carlkidcrypto/os-specific-runner@v2.1.1
Expand Down
33 changes: 28 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,39 @@ jobs:
setup.cfg

tests:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
needs: check-source-changes
if: needs.check-source-changes.outputs.run_job == 'true'
steps:
- name: Check out repository code
uses: actions/checkout@v4

- name: Set up Python 3.10 env for running unittest tests...
- name: Set up Python ${{ matrix.python-version }} env for running unittest tests...
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "${{ matrix.python-version }}"

- name: Install python3 requirements...
uses: carlkidcrypto/os-specific-runner@v2.1.1
with:
linux: cd /home/runner/work/purpleair_api/purpleair_api/ ;
linux: cd /home/runner/work/purpleair_api/purpleair_api/ ;
python -m pip install --upgrade wheel ;
python -m pip install --upgrade setuptools ;
python -m pip install --upgrade pip ;
python -m pip install coverage ;
python -m pip install requests_mock ;
macos: cd /Users/runner/work/purpleair_api/purpleair_api/ ;
python -m pip install --upgrade wheel ;
python -m pip install --upgrade setuptools ;
python -m pip install --upgrade pip ;
python -m pip install coverage ;
python -m pip install requests_mock ;
windows: cd D:\a\purpleair_api\purpleair_api\ ;
python -m pip install --upgrade wheel ;
python -m pip install --upgrade setuptools ;
python -m pip install --upgrade pip ;
Expand All @@ -54,9 +71,15 @@ jobs:
uses: carlkidcrypto/os-specific-runner@v2.1.1
with:
linux: cd /home/runner/work/purpleair_api/purpleair_api/tests ;
coverage run -m unittest && coverage json ;
coverage run -m unittest && coverage json -o coverage_linux_${{ matrix.os }}_${{ matrix.python-version }}.json ;
macos: cd /Users/runner/work/purpleair_api/purpleair_api/tests ;
coverage run -m unittest && coverage json -o coverage_macos_${{ matrix.os }}_${{ matrix.python-version }}.json ;
windows: cd D:\a\purpleair_api\purpleair_api\tests ;
coverage run -m unittest && coverage json -o coverage_windows_${{ matrix.os }}_${{ matrix.python-version }}.json ;

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
files: coverage_*.json
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ To use the PurpleAirAPI (PAA) api keys are required. You can get API keys by sen
| [![PyPI Distributions](https://github.com/carlkidcrypto/purpleair_api/actions/workflows/build_and_publish_to_pypi.yml/badge.svg)](https://github.com/carlkidcrypto/purpleair_api/actions/workflows/build_and_publish_to_pypi.yml) | [![TestPyPI Distributions](https://github.com/carlkidcrypto/purpleair_api/actions/workflows/build_and_publish_to_test_pypi.yml/badge.svg)](https://github.com/carlkidcrypto/purpleair_api/actions/workflows/build_and_publish_to_test_pypi.yml) | [![Black](https://github.com/carlkidcrypto/purpleair_api/actions/workflows/black.yml/badge.svg)](https://github.com/carlkidcrypto/purpleair_api/actions/workflows/black.yml) |
| --------------- | --------------- | --------------- |

| [![Tests](https://github.com/carlkidcrypto/purpleair_api/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/carlkidcrypto/purpleair_api/actions/workflows/tests.yml) | [![total download count](https://img.shields.io/github/downloads/carlkidcrypto/purpleair_api/total.svg?style=flat-square&label=all%20downloads)](https://github.com/carlkidcrypto/purpleair_api/releases) | [![latest release download count](https://img.shields.io/github/downloads/carlkidcrypto/purpleair_api/v1.2.0/total.svg?style=flat-square)](https://github.com/carlkidcrypto/purpleair_api/releases/tag/v1.2.0) |
| [![Tests](https://github.com/carlkidcrypto/purpleair_api/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/carlkidcrypto/purpleair_api/actions/workflows/tests.yml) | [![total download count](https://img.shields.io/github/downloads/carlkidcrypto/purpleair_api/total.svg?style=flat-square&label=all%20downloads)](https://github.com/carlkidcrypto/purpleair_api/releases) | [![latest release download count](https://img.shields.io/github/downloads/carlkidcrypto/purpleair_api/v1.3.0/total.svg?style=flat-square)](https://github.com/carlkidcrypto/purpleair_api/releases/tag/v1.3.0) |
| --------------- | --------------- | --------------- |

## How to Support This Project
Expand Down
10 changes: 7 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
description-file = README.md
license_files = LICENSE
name = purpleair_api
version = 1.2.0
version = 1.3.0
author = Carlos Santos
author_email = dose.lucky.sake@cloak.id
license = MIT
Expand All @@ -20,6 +20,10 @@ long_description_content_type = text/markdown
platforms = Windows 32/64, Linux 32/64, MacOS 32/64

[options]
python_requires = >=3.8
packages = purpleair_api
install_requires = requests
install_requires = requests
python_requires = >=3.9,<3.14

[tool:black]
line-length = 100
target-version = ['py39', 'py310', 'py311', 'py312', 'py313']
2 changes: 1 addition & 1 deletion sphinx_docs_build/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
author = "carlkidcrypto"

# The full version, including alpha/beta/rc tags
release = "V1.2.0"
release = "V1.3.0"


# -- General configuration ---------------------------------------------------
Expand Down
Loading