Skip to content

Commit

Permalink
Merge pull request #4 from mkashwin/SparkplugB-support
Browse files Browse the repository at this point in the history
Sparkplug b support
  • Loading branch information
himanshudhami authored Dec 16, 2022
2 parents ff817c5 + 1531f33 commit 462d13c
Show file tree
Hide file tree
Showing 64 changed files with 5,172 additions and 142 deletions.
4 changes: 3 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ exclude =
# This contains our built documentation
build,
# This contains builds of flake8 that we don't want to check
dist
dist
# This folder contains auto generated files which doesnt make sense to check
generated
38 changes: 38 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "pip"
directory: "./02_mqtt-cluster/requirements.txt" # Location of package manifests
schedule:
interval: "weekly"
allow:
# Allow both direct and indirect updates for all packages
- dependency-type: "all"

- package-ecosystem: "pip"
directory: "./03_uns_graphdb/requirements.txt" # Location of package manifests
schedule:
interval: "weekly"
allow:
# Allow both direct and indirect updates for all packages
- dependency-type: "all"

- package-ecosystem: "pip"
directory: "./04_uns_historian/requirements.txt" # Location of package manifests
schedule:
interval: "weekly"
allow:
# Allow both direct and indirect updates for all packages
- dependency-type: "all"

- package-ecosystem: "pip"
directory: "./05_sparkplugb/requirements.txt" # Location of package manifests
schedule:
interval: "weekly"
allow:
# Allow both direct and indirect updates for all packages
- dependency-type: "all"
73 changes: 44 additions & 29 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,42 +5,57 @@ name: UNS Project

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest
environment: dev

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f ./02_mqtt-cluster/requirements.txt ]; then pip install -r ./02_mqtt-cluster/requirements.txt; fi
if [ -f ./02_mqtt-cluster/requirements_dev.txt ]; then pip install -r ./02_mqtt-cluster/requirements_dev.txt; fi
if [ -f ./03_uns_graphdb/requirements.txt ]; then pip install -r ./03_uns_graphdb/requirements.txt; fi
if [ -f ./03_uns_graphdb/requirements_dev.txt ]; then pip install -r ./03_uns_graphdb/requirements_dev.txt; fi
if [ -f ./04_uns_historian/requirements.txt ]; then pip install -r ./04_uns_historian/requirements.txt; fi
if [ -f ./04_uns_historian/requirements_dev.txt ]; then pip install -r ./04_uns_historian/requirements_dev.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 ./02_mqtt-cluster/src ./02_mqtt-cluster/test ./03_uns_graphdb/src ./03_uns_graphdb/test ./04_uns_historian/src ./04_uns_historian/test --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 ./02_mqtt-cluster/src ./02_mqtt-cluster/test ./03_uns_graphdb/src ./03_uns_graphdb/test ./04_uns_historian/src ./04_uns_historian/test --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest -m "not integrationtest" ./02_mqtt-cluster/test/
pytest -m "not integrationtest" ./03_uns_graphdb/test/
pytest -m "not integrationtest" ./04_uns_historian/test/
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f ./02_mqtt-cluster/requirements.txt ]; then pip install --upgrade -r ./02_mqtt-cluster/requirements.txt; fi
if [ -f ./02_mqtt-cluster/requirements_dev.txt ]; then pip install --upgrade -r ./02_mqtt-cluster/requirements_dev.txt; fi
if [ -f ./03_uns_graphdb/requirements.txt ]; then pip install --upgrade -r ./03_uns_graphdb/requirements.txt; fi
if [ -f ./03_uns_graphdb/requirements_dev.txt ]; then pip install --upgrade -r ./03_uns_graphdb/requirements_dev.txt; fi
if [ -f ./04_uns_historian/requirements.txt ]; then pip install --upgrade -r ./04_uns_historian/requirements.txt; fi
if [ -f ./04_uns_historian/requirements_dev.txt ]; then pip install --upgrade -r ./04_uns_historian/requirements_dev.txt; fi
if [ -f ./05_sparkplugb/requirements.txt ]; then pip install --upgrade -r ./05_sparkplugb/requirements.txt; fi
if [ -f ./05_sparkplugb/requirements_dev.txt ]; then pip install --upgrade -r ./05_sparkplugb/requirements_dev.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 ./02_mqtt-cluster/src ./02_mqtt-cluster/test ./03_uns_graphdb/src ./03_uns_graphdb/test ./04_uns_historian/src ./04_uns_historian/test ./05_sparkplugb/src ./05_sparkplugb/test --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 ./02_mqtt-cluster/src ./02_mqtt-cluster/test ./03_uns_graphdb/src ./03_uns_graphdb/test ./04_uns_historian/src ./04_uns_historian/test ./05_sparkplugb/src ./05_sparkplugb/test --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
env:
UNS_mqtt.host: ${{ secrets.MQTT_HOST }}
UNS_mqtt.port: ${{ secrets.MQTT_PORT }}
UNS_mqtt.username: ${{ secrets.MQTT_USER }}
UNS_mqtt.password: ${{ secrets.MQTT_PWD }}
UNS_graphdb.url: ${{ secrets.NEO4J_URL }}
UNS_graphdb.username: ${{ secrets.NEO4J_USER }}
UNS_graphdb.password: ${{ secrets.NEO4J_PWD }}

run: |
pytest -m "not integrationtest" ./02_mqtt-cluster/test/
pytest -m "not integrationtest" ./03_uns_graphdb/test/
pytest -m "not integrationtest" ./04_uns_historian/test/
pytest -m "not integrationtest" ./05_sparkplugb/test/
60 changes: 34 additions & 26 deletions .github/workflows/uns_graphdb-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,45 +5,53 @@ name: UNS Graph DB MQTT Client

on:
push:
branches:
- "**"
branches:
- "**"
paths:
- "02_mqtt-cluster/**"
- "03_uns_graphdb/**"
pull_request:
branches:
branches:
- "**"
paths:
- "02_mqtt-cluster/**"
- "03_uns_graphdb/**"
- "03_uns_graphdb/**"
permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest
environment: dev

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f ./03_uns_graphdb/requirements.txt ]; then pip install -r ./03_uns_graphdb/requirements.txt; fi
if [ -f ./03_uns_graphdb/requirements_dev.txt ]; then pip install -r ./03_uns_graphdb/requirements_dev.txt; fi
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f ./03_uns_graphdb/requirements.txt ]; then pip install --upgrade -r ./03_uns_graphdb/requirements.txt; fi
if [ -f ./03_uns_graphdb/requirements_dev.txt ]; then pip install --upgrade -r ./03_uns_graphdb/requirements_dev.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 ./03_uns_graphdb/src ./03_uns_graphdb/test --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 ./03_uns_graphdb/src ./03_uns_graphdb/test --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 ./03_uns_graphdb/src ./03_uns_graphdb/test --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 ./03_uns_graphdb/src ./03_uns_graphdb/test --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest -m "not integrationtest" ./03_uns_graphdb/test/
- name: Test with pytest
env:
UNS_mqtt.host: ${{ secrets.MQTT_HOST }}
UNS_mqtt.port: ${{ secrets.MQTT_PORT }}
UNS_mqtt.username: ${{ secrets.MQTT_USER }}
UNS_mqtt.password: ${{ secrets.MQTT_PWD }}
UNS_graphdb.url: ${{ secrets.NEO4J_URL }}
UNS_graphdb.username: ${{ secrets.NEO4J_USER }}
UNS_graphdb.password: ${{ secrets.NEO4J_PWD }}
run: |
pytest -m "not integrationtest" ./03_uns_graphdb/test/
49 changes: 24 additions & 25 deletions .github/workflows/uns_historian-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,45 +5,44 @@ name: UNS Historian MQTT Client

on:
push:
branches:
branches:
- "**"
paths:
- "02_mqtt-cluster/**"
- "04_uns_historian/**"
pull_request:
branches:
branches:
- "**"
paths:
- "02_mqtt-cluster/**"
- "04_uns_historian/**"
- "04_uns_historian/**"
permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f ./04_uns_historian/requirements.txt ]; then pip install -r ./04_uns_historian/requirements.txt; fi
if [ -f ./04_uns_historian/requirements_dev.txt ]; then pip install -r ./04_uns_historian/requirements_dev.txt; fi
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f ./04_uns_historian/requirements.txt ]; then pip install --upgrade -r ./04_uns_historian/requirements.txt; fi
if [ -f ./04_uns_historian/requirements_dev.txt ]; then pip install --upgrade -r ./04_uns_historian/requirements_dev.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 ./04_uns_historian/src ./04_uns_historian/test --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 ./04_uns_historian/src ./04_uns_historian/test --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 ./04_uns_historian/src ./04_uns_historian/test --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 ./04_uns_historian/src ./04_uns_historian/test --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest -m "not integrationtest" ./04_uns_historian/test/
- name: Test with pytest
run: |
pytest -m "not integrationtest" ./04_uns_historian/test/
48 changes: 48 additions & 0 deletions .github/workflows/uns_sparkplugb-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: UNS Sparkplug B Decoder

on:
push:
branches:
- "**"
paths:
- "02_mqtt-cluster/**"
- "05_sparkplugb/**"
pull_request:
branches:
- "**"
paths:
- "02_mqtt-cluster/**"
- "05_sparkplugb/**"
permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f ./05_sparkplugb/requirements.txt ]; then pip install --upgrade -r ./05_sparkplugb/requirements.txt; fi
if [ -f ./05_sparkplugb/requirements_dev.txt ]; then pip install --upgrade -r ./05_sparkplugb/requirements_dev.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 ./05_sparkplugb/src ./05_sparkplugb/test --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 ./05_sparkplugb/src ./05_sparkplugb/test --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest -m "not integrationtest" ./05_sparkplugb/test/
Loading

0 comments on commit 462d13c

Please sign in to comment.