diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml index b0a19e9..2a30003 100644 --- a/.github/workflows/black.yml +++ b/.github/workflows/black.yml @@ -8,8 +8,29 @@ on: branches: [ main ] jobs: + check-source-changes: + runs-on: ubuntu-latest + outputs: + run_job: ${{ steps.changed-files.outputs.any_changed }} + steps: + - name: Checkout Sourcecode + uses: actions/checkout@v4 + + - name: Check for changes in source code + id: changed-files + uses: tj-actions/changed-files@v41.0.1 + with: + files: | + purpleair_api/*.py + tests/*.py + tests/*.txt + setup.py + setup.cfg + black: runs-on: ubuntu-latest + needs: check-source-changes + if: needs.check-source-changes.outputs.run_job == 'true' steps: - uses: actions/checkout@v4 - uses: psf/black@23.12.1 \ No newline at end of file diff --git a/.github/workflows/sphinx_build.yml b/.github/workflows/sphinx_build.yml index 32a3daa..0a596c2 100644 --- a/.github/workflows/sphinx_build.yml +++ b/.github/workflows/sphinx_build.yml @@ -8,8 +8,27 @@ on: branches: [ main ] jobs: + check-source-changes: + runs-on: ubuntu-latest + outputs: + run_job: ${{ steps.changed-files.outputs.any_changed }} + steps: + - name: Checkout Sourcecode + uses: actions/checkout@v4 + + - name: Check for changes in source code + id: changed-files + uses: tj-actions/changed-files@v41.0.1 + with: + files: | + sphinx_docs_build/source/*.rst + sphinx_docs_build/source/*.py + sphinx_docs_build/*.txt + sphinx_docs_build: runs-on: ubuntu-latest + needs: check-source-changes + if: needs.check-source-changes.outputs.run_job == 'true' steps: - name: Check out repository code uses: actions/checkout@v4 @@ -19,21 +38,23 @@ jobs: with: python-version: "3.10" - - name: Install python3 requirements... + - name: Install python3/os requirements... uses: carlkidcrypto/os-specific-runner@v2.0.0 with: linux: cd /home/runner/work/purpleair_data_logger/purpleair_data_logger/ && - python -m pip install --upgrade wheel && - python -m pip install --upgrade setuptools && - python -m pip install --upgrade pip && - python -m pip install -r sphinx_docs_build/requirements.txt && - python -m pip install . --user + python -m pip install --upgrade wheel && + python -m pip install --upgrade setuptools && + python -m pip install --upgrade pip && + python -m pip install -r sphinx_docs_build/requirements.txt && + python -m pip install . --user; - name: Run sphinx... uses: carlkidcrypto/os-specific-runner@v2.0.0 with: - linux: cd /home/runner/work/purpleair_data_logger/purpleair_data_logger/sphinx_docs_build ; - make html + linux: cd /home/runner/work/purpleair_data_logger/purpleair_data_logger/sphinx_docs_build; + mkdir source/_static; + mkdir source/_templates; + make clean && make html SPHINXOPTS="-W" - uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ea8b00d..1607699 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,9 +8,29 @@ on: branches: [ main ] jobs: + check-source-changes: + runs-on: ubuntu-latest + outputs: + run_job: ${{ steps.changed-files.outputs.any_changed }} + steps: + - name: Checkout Sourcecode + uses: actions/checkout@v4 + + - name: Check for changes in source code + id: changed-files + uses: tj-actions/changed-files@v41.0.1 + with: + files: | + purpleair_api/*.py + tests/*.py + tests/*.txt + setup.py + setup.cfg + Unit_Tests: name: ${{ matrix.os }} using Python ${{ matrix.python-version }} runs-on: ${{ matrix.os }} + if: needs.check-source-changes.outputs.run_job == 'true' strategy: fail-fast: false matrix: diff --git a/LICENSE b/LICENSE index 9c9bf4b..8fa64e9 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2023 carlkidcrypto +Copyright (c) 2024 carlkidcrypto Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/setup.cfg b/setup.cfg index fb5eff2..4c6ada5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = purpleair_data_logger -version = 1.3.1 +version = 1.3.2 license = MIT author = Carlos Santos author_email = dose.lucky.sake@cloak.id diff --git a/sphinx_docs_build/source/conf.py b/sphinx_docs_build/source/conf.py index 5504d46..53fe534 100644 --- a/sphinx_docs_build/source/conf.py +++ b/sphinx_docs_build/source/conf.py @@ -19,11 +19,11 @@ # -- Project information ----------------------------------------------------- project = "PurpleAir Data Logger(s)" -copyright = "2023, carlkidcrypto" +copyright = "2024, carlkidcrypto" author = "carlkidcrypto" # The full version, including alpha/beta/rc tags -release = "V1.3.0" +release = "V1.3.2" # -- General configuration ---------------------------------------------------