Skip to content

Commit

Permalink
Release/v1.1.3 (#32)
Browse files Browse the repository at this point in the history
* V1.1.3

- prepping for a maintenance release.

* Run only when needed

- attmempting to run only when needed for workflows.

* - a few more checks for source code changes

* workflows

- a few more workflow tweaks

* Workflows

- more work changes

* Workflow

- one more tweaks

* Workflows

- even more workflows tweaks.

* Docs

- uploading new docs
  • Loading branch information
carlkidcrypto authored Jan 5, 2024
1 parent 9857871 commit d184df9
Show file tree
Hide file tree
Showing 36 changed files with 372 additions and 194 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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/[email protected]
62 changes: 62 additions & 0 deletions .github/workflows/sphinx_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: "Pull Request Sphinx Docs Check"

on:
push:
branches: [ main ]

pull_request:
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/[email protected]
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

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

- name: Install python3/os requirements...
uses: carlkidcrypto/[email protected]
with:
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 -r sphinx_docs_build/requirements.txt &&
python -m pip install . --user;

- name: Run sphinx...
uses: carlkidcrypto/[email protected]
with:
linux: cd /home/runner/work/purpleair_api/purpleair_api/sphinx_docs_build;
mkdir source/_static;
mkdir source/_templates;
make clean && make html SPHINXOPTS="-W"

- uses: actions/upload-artifact@v4
with:
name: HTML Documentation
path: docs/
24 changes: 22 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,30 @@ on:
branches: [ main ]

jobs:
tests:
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/[email protected]
with:
files: |
purpleair_api/*.py
tests/*.py
tests/*.txt
setup.py
setup.cfg
tests:
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

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
**/purpleair_api.egg-info/**
test/.coverage
test/coverage_reports/**
**/.DS_Store
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Binary file modified docs/doctrees/PurpleAirAPI.doctree
Binary file not shown.
Binary file modified docs/doctrees/PurpleAirAPIConstants.doctree
Binary file not shown.
Binary file modified docs/doctrees/PurpleAirAPIError.doctree
Binary file not shown.
Binary file modified docs/doctrees/PurpleAirAPIHelpers.doctree
Binary file not shown.
Binary file modified docs/doctrees/PurpleAirLocalAPI.doctree
Binary file not shown.
Binary file modified docs/doctrees/PurpleAirReadAPI.doctree
Binary file not shown.
Binary file modified docs/doctrees/PurpleAirWriteAPI.doctree
Binary file not shown.
Binary file modified docs/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/doctrees/index.doctree
Binary file not shown.
Binary file modified docs/doctrees/modules.doctree
Binary file not shown.
34 changes: 18 additions & 16 deletions docs/html/PurpleAirAPI.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<html class="writer-html5" lang="en" data-content_root="./">
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>PurpleAirAPI module &mdash; PurpleAir API V1.1.2 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<title>PurpleAirAPI module &mdash; PurpleAir API V1.1.3 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />


<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->

<script src="_static/jquery.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=b405dd7c"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
Expand Down Expand Up @@ -90,31 +92,31 @@
<div itemprop="articleBody">

<section id="module-PurpleAirAPI">
<span id="purpleairapi-module"></span><h1>PurpleAirAPI module<a class="headerlink" href="#module-PurpleAirAPI" title="Permalink to this heading"></a></h1>
<span id="purpleairapi-module"></span><h1>PurpleAirAPI module<a class="headerlink" href="#module-PurpleAirAPI" title="Link to this heading"></a></h1>
<p>Copyright 2023 carlkidcrypto, All rights reserved.
A python3 class designed to fetch data from Purple Air’s new API.
<a class="reference external" href="https://api.purpleair.com/#api-welcome">https://api.purpleair.com/#api-welcome</a></p>
<dl class="py class">
<dt class="sig sig-object py" id="PurpleAirAPI.PurpleAirAPI">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">PurpleAirAPI.</span></span><span class="sig-name descname"><span class="pre">PurpleAirAPI</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">your_api_read_key</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">your_api_write_key</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">your_ipv4_address</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#PurpleAirAPI.PurpleAirAPI" title="Permalink to this definition"></a></dt>
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">PurpleAirAPI.</span></span><span class="sig-name descname"><span class="pre">PurpleAirAPI</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">your_api_read_key</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">your_api_write_key</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">your_ipv4_address</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#PurpleAirAPI.PurpleAirAPI" title="Link to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">PurpleAirReadAPI</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">PurpleAirWriteAPI</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">PurpleAirLocalAPI</span></code></p>
<p>The PurpleAirAPI class designed to send valid
PurpleAirAPI requests.</p>
<dl class="py property">
<dt class="sig sig-object py" id="PurpleAirAPI.PurpleAirAPI.get_api_key_last_checked">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">get_api_key_last_checked</span></span><a class="headerlink" href="#PurpleAirAPI.PurpleAirAPI.get_api_key_last_checked" title="Permalink to this definition"></a></dt>
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">get_api_key_last_checked</span></span><a class="headerlink" href="#PurpleAirAPI.PurpleAirAPI.get_api_key_last_checked" title="Link to this definition"></a></dt>
<dd><p>A method to return the timestamp of when the API read/write keys were last checked.</p>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="PurpleAirAPI.PurpleAirAPI.get_api_key_type">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">get_api_key_type</span></span><a class="headerlink" href="#PurpleAirAPI.PurpleAirAPI.get_api_key_type" title="Permalink to this definition"></a></dt>
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">get_api_key_type</span></span><a class="headerlink" href="#PurpleAirAPI.PurpleAirAPI.get_api_key_type" title="Link to this definition"></a></dt>
<dd><p>A method to return the API key types being used.</p>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="PurpleAirAPI.PurpleAirAPI.get_api_versions">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">get_api_versions</span></span><a class="headerlink" href="#PurpleAirAPI.PurpleAirAPI.get_api_versions" title="Permalink to this definition"></a></dt>
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">get_api_versions</span></span><a class="headerlink" href="#PurpleAirAPI.PurpleAirAPI.get_api_versions" title="Link to this definition"></a></dt>
<dd><p>A method to return the API versions being used for both read/write keys.</p>
</dd></dl>

Expand All @@ -133,7 +135,7 @@
<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2023, carlkidcrypto.</p>
<p>&#169; Copyright 2024, carlkidcrypto.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Expand Down
Loading

0 comments on commit d184df9

Please sign in to comment.