-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/NERC-CEH/iot-swarm
- Loading branch information
Showing
17 changed files
with
198 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# Simple workflow for deploying static content to GitHub Pages | ||
name: Deploy static content to Pages | ||
|
||
on: | ||
# Runs on pushes targeting the default branch | ||
workflow_run: | ||
workflows: ["Python Tests"] | ||
branches: ["main"] | ||
types: | ||
- completed | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
# Single deploy job since we're just deploying | ||
deploy: | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v5 | ||
- name: Set up Python | ||
# This is the version of the action for setting up Python, not the Python version. | ||
uses: actions/setup-python@v5 | ||
with: | ||
# Semantic version range syntax or exact version of a Python version | ||
python-version: '3.12' | ||
# Optional - x64 or x86 architecture, defaults to x64 | ||
architecture: 'x64' | ||
cache: 'pip' | ||
- name: Install Dependencies | ||
run: | | ||
pip install --upgrade pip | ||
pip install .[docs] | ||
- name: Build Docs | ||
run: | | ||
python -c "import iotdevicesimulator; print(iotdevicesimulator.__version__)" | ||
pushd docs | ||
. ./make.sh apidoc | ||
. ./make.sh build | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
# Upload entire repository | ||
path: 'docs/_build/html' | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a single version of Python | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | ||
|
||
name: Python Tests | ||
|
||
on: [push, pull_request] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: "3.12" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flake8 | ||
pip install .[test] | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Test with pytest | ||
run: pytest -m "not oracle" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,13 +16,12 @@ dependencies = [ | |
] | ||
name = "iot-device-simulator" | ||
dynamic = ["version"] | ||
# version = "0.0.0" | ||
authors = [{ name = "Lewis Chambers", email = "[email protected]" }] | ||
description = "Package for simulating a net of IoT devices for stress testing." | ||
|
||
[project.optional-dependencies] | ||
test = ["pytest", "pytest-cov", "pytest-asyncio", "parameterized"] | ||
docs = ["sphinx", "sphinx-copybutton"] | ||
docs = ["sphinx", "sphinx-copybutton", "sphinx-rtd-theme"] | ||
|
||
[tool.setuptools.dynamic] | ||
version = { attr = "iotdevicesimulator.__version__" } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
oracle: { | ||
dsn: "wldbase:1521/wla" | ||
user: "lewcha" | ||
password: "Lucid+Barrel8Valley" | ||
} | ||
iot_core: { | ||
endpoint: "a10mem0twl4qxt-ats.iot.eu-west-2.amazonaws.com" | ||
port: 8883 | ||
cert_path: "C:/Users/lewcha/OneDrive - UKCEH/Documents/FDRI/projects/iot-device-simulator/src/iotdevicesimulator/__assets__/.certs/fdri_swarm.cert.pem" | ||
key_path: "C:/Users/lewcha/OneDrive - UKCEH/Documents/FDRI/projects/iot-device-simulator/src/iotdevicesimulator/__assets__/.certs/fdri_swarm.private.key" | ||
ca_cert_path: "C:/Users/lewcha/OneDrive - UKCEH/Documents/FDRI/projects/iot-device-simulator/src/iotdevicesimulator/__assets__/.certs/AmazonRootCA1.pem" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.