async-httpd-data-collector 2.0.1__tar.gz → 2.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- async_httpd_data_collector-2.0.1/.github/workflows/publish-pypi.yml → async_httpd_data_collector-2.0.2/.github/workflows/publish.yml +32 -15
- {async_httpd_data_collector-2.0.1 → async_httpd_data_collector-2.0.2}/.github/workflows/test.yml +37 -20
- async_httpd_data_collector-2.0.2/.yamlfmt.yml +6 -0
- async_httpd_data_collector-2.0.2/.yamllint.yml +7 -0
- {async_httpd_data_collector-2.0.1 → async_httpd_data_collector-2.0.2}/PKG-INFO +1 -1
- async_httpd_data_collector-2.0.2/ahttpdc/__init__.py +1 -0
- {async_httpd_data_collector-2.0.1 → async_httpd_data_collector-2.0.2}/ahttpdc/read/database_interface.py +1 -1
- {async_httpd_data_collector-2.0.1 → async_httpd_data_collector-2.0.2}/ahttpdc/read/fetch/fetcher.py +1 -1
- {async_httpd_data_collector-2.0.1 → async_httpd_data_collector-2.0.2}/tests/read/query/test_query.py +1 -1
- {async_httpd_data_collector-2.0.1 → async_httpd_data_collector-2.0.2}/tests/read/test_interface.py +1 -1
- async_httpd_data_collector-2.0.1/ahttpdc/__init__.py +0 -1
- {async_httpd_data_collector-2.0.1 → async_httpd_data_collector-2.0.2}/.gitignore +0 -0
- {async_httpd_data_collector-2.0.1 → async_httpd_data_collector-2.0.2}/LICENSE +0 -0
- {async_httpd_data_collector-2.0.1 → async_httpd_data_collector-2.0.2}/README.md +0 -0
- {async_httpd_data_collector-2.0.1 → async_httpd_data_collector-2.0.2}/ahttpdc/read/__init__.py +0 -0
- {async_httpd_data_collector-2.0.1 → async_httpd_data_collector-2.0.2}/ahttpdc/read/daemon.py +0 -0
- {async_httpd_data_collector-2.0.1 → async_httpd_data_collector-2.0.2}/ahttpdc/read/fetch/__init__.py +0 -0
- {async_httpd_data_collector-2.0.1 → async_httpd_data_collector-2.0.2}/ahttpdc/read/query/__init__.py +0 -0
- {async_httpd_data_collector-2.0.1 → async_httpd_data_collector-2.0.2}/ahttpdc/read/query/interface.py +0 -0
- {async_httpd_data_collector-2.0.1 → async_httpd_data_collector-2.0.2}/ahttpdc/read/query/parse/data.py +0 -0
- {async_httpd_data_collector-2.0.1 → async_httpd_data_collector-2.0.2}/ahttpdc/read/store/__init__.py +0 -0
- {async_httpd_data_collector-2.0.1 → async_httpd_data_collector-2.0.2}/ahttpdc/read/store/collector.py +0 -0
- {async_httpd_data_collector-2.0.1 → async_httpd_data_collector-2.0.2}/ahttpdc/read/store/parse/__init__.py +0 -0
- {async_httpd_data_collector-2.0.1 → async_httpd_data_collector-2.0.2}/ahttpdc/read/store/parse/parser.py +0 -0
- {async_httpd_data_collector-2.0.1 → async_httpd_data_collector-2.0.2}/examples/daemon_example.py +0 -0
- {async_httpd_data_collector-2.0.1 → async_httpd_data_collector-2.0.2}/examples/minima_dashboard_example.py +0 -0
- {async_httpd_data_collector-2.0.1 → async_httpd_data_collector-2.0.2}/examples/query_example.py +0 -0
- {async_httpd_data_collector-2.0.1 → async_httpd_data_collector-2.0.2}/pyproject.toml +0 -0
- {async_httpd_data_collector-2.0.1 → async_httpd_data_collector-2.0.2}/requirements.txt +0 -0
- {async_httpd_data_collector-2.0.1 → async_httpd_data_collector-2.0.2}/tests/dev_server.py +0 -0
- {async_httpd_data_collector-2.0.1 → async_httpd_data_collector-2.0.2}/tests/read/fetch/test_fetcher.py +0 -0
|
@@ -1,38 +1,55 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
# Builds, relases and publishes to PyPi
|
|
3
|
+
# .github/workflows/publish.yml
|
|
4
|
+
name: CD
|
|
5
|
+
|
|
6
|
+
# triggered when testing is finished
|
|
2
7
|
on:
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
-
|
|
8
|
+
workflow_run:
|
|
9
|
+
workflows: ["CI"]
|
|
10
|
+
branches: [master]
|
|
11
|
+
types:
|
|
12
|
+
- completed
|
|
13
|
+
|
|
14
|
+
# add contents: write for the release
|
|
15
|
+
permissions:
|
|
16
|
+
contents: write
|
|
17
|
+
|
|
8
18
|
jobs:
|
|
9
|
-
|
|
19
|
+
|
|
20
|
+
build-release-publish:
|
|
10
21
|
runs-on: ubuntu-latest
|
|
22
|
+
|
|
11
23
|
steps:
|
|
24
|
+
|
|
12
25
|
- name: Checkout repository
|
|
13
26
|
uses: actions/checkout@v2
|
|
27
|
+
|
|
14
28
|
- name: Set up Python
|
|
15
29
|
uses: actions/setup-python@v2
|
|
16
30
|
with:
|
|
17
31
|
python-version: '3.x'
|
|
32
|
+
|
|
18
33
|
- name: Install dependencies
|
|
19
34
|
run: |
|
|
20
35
|
python -m pip install --upgrade pip
|
|
21
36
|
pip install build twine
|
|
22
37
|
pip install -r requirements.txt
|
|
38
|
+
|
|
23
39
|
- name: Build the application
|
|
24
40
|
run: |
|
|
25
41
|
python -m build
|
|
26
|
-
|
|
27
|
-
if: startsWith(github.ref, 'refs/tags/')
|
|
28
|
-
env:
|
|
29
|
-
TWINE_USERNAME: __token__
|
|
30
|
-
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
|
|
31
|
-
run: |
|
|
32
|
-
python -m twine upload dist/*
|
|
42
|
+
|
|
33
43
|
- name: Release
|
|
34
44
|
uses: softprops/action-gh-release@v2
|
|
35
45
|
if: startsWith(github.ref, 'refs/tags/')
|
|
36
46
|
with:
|
|
37
47
|
files: |
|
|
38
|
-
dist
|
|
48
|
+
dist/**
|
|
49
|
+
|
|
50
|
+
- name: Publish to PyPi
|
|
51
|
+
env:
|
|
52
|
+
TWINE_USERNAME: __token__
|
|
53
|
+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
|
|
54
|
+
run: |-
|
|
55
|
+
python -m twine upload dist/*
|
{async_httpd_data_collector-2.0.1 → async_httpd_data_collector-2.0.2}/.github/workflows/test.yml
RENAMED
|
@@ -1,12 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
#
|
|
1
|
+
---
|
|
2
|
+
# Workflow sets up the database and tests the project.
|
|
3
|
+
# .github/workflows/test.yml
|
|
4
|
+
|
|
5
|
+
name: CI
|
|
6
|
+
|
|
7
|
+
# trigger on push to the master
|
|
3
8
|
on:
|
|
4
9
|
push:
|
|
5
10
|
branches:
|
|
6
11
|
- master
|
|
12
|
+
|
|
7
13
|
jobs:
|
|
8
|
-
|
|
14
|
+
continuous-integration:
|
|
9
15
|
runs-on: ubuntu-latest
|
|
16
|
+
|
|
17
|
+
# set up influxdb database and flask server
|
|
10
18
|
services:
|
|
11
19
|
influxdb:
|
|
12
20
|
image: influxdb:2
|
|
@@ -16,24 +24,30 @@ jobs:
|
|
|
16
24
|
image: python:3.9
|
|
17
25
|
ports:
|
|
18
26
|
- 5000:5000
|
|
27
|
+
|
|
19
28
|
steps:
|
|
20
|
-
|
|
29
|
+
|
|
30
|
+
- name: Checkout repository
|
|
21
31
|
uses: actions/checkout@v2
|
|
32
|
+
|
|
33
|
+
# install InfluxDB CLI to authenticate access to the database
|
|
22
34
|
- name: Install InfluxDB CLI
|
|
23
35
|
run: |
|
|
24
36
|
wget https://download.influxdata.com/influxdb/releases/influxdb2-client-2.7.5-linux-amd64.tar.gz
|
|
25
37
|
tar xvzf ./influxdb2-client-2.7.5-linux-amd64.tar.gz
|
|
26
|
-
|
|
38
|
+
cp ./influx /usr/local/bin/
|
|
39
|
+
|
|
27
40
|
- name: Set up InfluxDB
|
|
28
41
|
id: setup-influx
|
|
29
42
|
run: |
|
|
30
|
-
|
|
43
|
+
|
|
44
|
+
# default auth data for the test instance
|
|
31
45
|
INFLUX_USERNAME="test-user"
|
|
32
46
|
INFLUX_PASSWORD="test-password"
|
|
33
47
|
INFLUX_ORG="test-org"
|
|
34
48
|
INFLUX_BUCKET="test-bucket"
|
|
35
49
|
|
|
36
|
-
# setting up the
|
|
50
|
+
# setting up the test instance
|
|
37
51
|
influx setup \
|
|
38
52
|
--username "$INFLUX_USERNAME" \
|
|
39
53
|
--password "$INFLUX_PASSWORD" \
|
|
@@ -41,13 +55,14 @@ jobs:
|
|
|
41
55
|
--bucket "$INFLUX_BUCKET" \
|
|
42
56
|
--force
|
|
43
57
|
|
|
44
|
-
#
|
|
58
|
+
# save the data required for the token generation and testing
|
|
45
59
|
echo "::set-output name=org::${INFLUX_ORG}"
|
|
46
60
|
echo "::set-output name=bucket::${INFLUX_BUCKET}"
|
|
47
|
-
|
|
61
|
+
|
|
62
|
+
- name: Generate token for further authentication
|
|
48
63
|
id: auth
|
|
49
64
|
run: |
|
|
50
|
-
|
|
65
|
+
|
|
51
66
|
INFLUX_TOKEN=$(influx auth create \
|
|
52
67
|
--user "$INFLUX_USERNAME" \
|
|
53
68
|
--org "$INFLUX_ORG" \
|
|
@@ -56,31 +71,33 @@ jobs:
|
|
|
56
71
|
--skip-verify \
|
|
57
72
|
--json | jq '.token')
|
|
58
73
|
|
|
59
|
-
#
|
|
74
|
+
# save the token
|
|
60
75
|
echo "::set-output name=token::${INFLUX_TOKEN}"
|
|
76
|
+
|
|
61
77
|
- name: Set up Python
|
|
62
78
|
uses: actions/setup-python@v2
|
|
63
79
|
with:
|
|
64
80
|
python-version: '3.11'
|
|
81
|
+
|
|
65
82
|
- name: Install dependencies
|
|
66
83
|
run: |
|
|
67
84
|
python -m pip install --upgrade pip
|
|
68
|
-
pip install build
|
|
69
|
-
pip install ruff
|
|
70
|
-
pip install twine
|
|
85
|
+
pip install ruff build twine
|
|
71
86
|
pip install -r requirements.txt
|
|
72
|
-
|
|
87
|
+
|
|
88
|
+
- name: Check formatting
|
|
73
89
|
run: |
|
|
74
|
-
ruff format
|
|
75
90
|
ruff check
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
91
|
+
|
|
92
|
+
- name: Test
|
|
93
|
+
run: |-
|
|
94
|
+
|
|
95
|
+
# run the falsk dev_server
|
|
79
96
|
export FLASK_APP="tests/dev_server"
|
|
80
97
|
flask run --host=0.0.0.0 --port=9000 &
|
|
81
98
|
sleep 5
|
|
82
99
|
|
|
83
|
-
#
|
|
100
|
+
# exporting data required for testing as env variables
|
|
84
101
|
export PYTHONPATH="$PYTHONPATH:$(pwd)"
|
|
85
102
|
export INFLUXDB_HOST="localhost"
|
|
86
103
|
export INFLUXDB_PORT=8086
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: async-httpd-data-collector
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.2
|
|
4
4
|
Summary: Gateway facilitating asyncronous communication between sensory data-emitting devices, InfluxDB and the user.
|
|
5
5
|
Project-URL: Repository, https://github.com/straightchlorine/async-httpd-data-collector
|
|
6
6
|
Project-URL: Issues, https://github.com/straightchlorine/async-httpd-data-collector/issues
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = 'v2.0.2'
|
{async_httpd_data_collector-2.0.1 → async_httpd_data_collector-2.0.2}/ahttpdc/read/fetch/fetcher.py
RENAMED
|
@@ -60,7 +60,7 @@ class AsyncFetcher:
|
|
|
60
60
|
print(f'Error fetching data: {response.status}')
|
|
61
61
|
else:
|
|
62
62
|
# TODO: Add some verification module to check if the JSON response is
|
|
63
|
-
# appropriate for further processing
|
|
63
|
+
# appropriate for further processing.
|
|
64
64
|
|
|
65
65
|
read = await response.json()
|
|
66
66
|
return read
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = 'v2.0.1'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{async_httpd_data_collector-2.0.1 → async_httpd_data_collector-2.0.2}/ahttpdc/read/__init__.py
RENAMED
|
File without changes
|
{async_httpd_data_collector-2.0.1 → async_httpd_data_collector-2.0.2}/ahttpdc/read/daemon.py
RENAMED
|
File without changes
|
{async_httpd_data_collector-2.0.1 → async_httpd_data_collector-2.0.2}/ahttpdc/read/fetch/__init__.py
RENAMED
|
File without changes
|
{async_httpd_data_collector-2.0.1 → async_httpd_data_collector-2.0.2}/ahttpdc/read/query/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{async_httpd_data_collector-2.0.1 → async_httpd_data_collector-2.0.2}/ahttpdc/read/store/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{async_httpd_data_collector-2.0.1 → async_httpd_data_collector-2.0.2}/examples/daemon_example.py
RENAMED
|
File without changes
|
|
File without changes
|
{async_httpd_data_collector-2.0.1 → async_httpd_data_collector-2.0.2}/examples/query_example.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|