async-httpd-data-collector 0.2.2__tar.gz → 2.0.1__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 +38 -0
- async_httpd_data_collector-0.2.2/.github/workflows/publish.yml → async_httpd_data_collector-2.0.1/.github/workflows/test.yml +2 -35
- async_httpd_data_collector-2.0.1/LICENSE +674 -0
- async_httpd_data_collector-2.0.1/PKG-INFO +1010 -0
- async_httpd_data_collector-2.0.1/README.md +274 -0
- async_httpd_data_collector-2.0.1/ahttpdc/__init__.py +1 -0
- async_httpd_data_collector-2.0.1/ahttpdc/read/daemon.py +103 -0
- async_httpd_data_collector-2.0.1/ahttpdc/read/database_interface.py +159 -0
- async_httpd_data_collector-2.0.1/ahttpdc/read/fetch/fetcher.py +66 -0
- async_httpd_data_collector-2.0.1/ahttpdc/read/query/interface.py +158 -0
- async_httpd_data_collector-2.0.1/ahttpdc/read/query/parse/data.py +82 -0
- async_httpd_data_collector-2.0.1/ahttpdc/read/store/__init__.py +0 -0
- async_httpd_data_collector-2.0.1/ahttpdc/read/store/collector.py +59 -0
- async_httpd_data_collector-2.0.1/ahttpdc/read/store/parse/__init__.py +0 -0
- async_httpd_data_collector-2.0.1/ahttpdc/read/store/parse/parser.py +109 -0
- async_httpd_data_collector-2.0.1/examples/daemon_example.py +66 -0
- async_httpd_data_collector-0.2.2/examples/minimal_dashboard.py → async_httpd_data_collector-2.0.1/examples/minima_dashboard_example.py +50 -16
- async_httpd_data_collector-2.0.1/examples/query_example.py +70 -0
- {async_httpd_data_collector-0.2.2 → async_httpd_data_collector-2.0.1}/pyproject.toml +5 -9
- async_httpd_data_collector-2.0.1/tests/read/fetch/test_fetcher.py +35 -0
- async_httpd_data_collector-2.0.1/tests/read/query/test_query.py +138 -0
- async_httpd_data_collector-2.0.1/tests/read/test_interface.py +86 -0
- async_httpd_data_collector-0.2.2/LICENSE +0 -21
- async_httpd_data_collector-0.2.2/PKG-INFO +0 -152
- async_httpd_data_collector-0.2.2/README.md +0 -69
- async_httpd_data_collector-0.2.2/ahttpdc/__init__.py +0 -1
- async_httpd_data_collector-0.2.2/ahttpdc/reads/fetch/async_fetch.py +0 -203
- async_httpd_data_collector-0.2.2/ahttpdc/reads/interface.py +0 -174
- async_httpd_data_collector-0.2.2/ahttpdc/reads/query/async_query.py +0 -250
- async_httpd_data_collector-0.2.2/examples/fetch.py +0 -34
- async_httpd_data_collector-0.2.2/examples/query.py +0 -42
- async_httpd_data_collector-0.2.2/influx +0 -0
- async_httpd_data_collector-0.2.2/influxdb2-client-2.7.5-linux-amd64.tar.gz +0 -0
- async_httpd_data_collector-0.2.2/tests/reads/fetch/test_fetcher.py +0 -77
- async_httpd_data_collector-0.2.2/tests/reads/query/test_query.py +0 -148
- async_httpd_data_collector-0.2.2/tests/reads/test_interface.py +0 -111
- {async_httpd_data_collector-0.2.2 → async_httpd_data_collector-2.0.1}/.gitignore +0 -0
- {async_httpd_data_collector-0.2.2/ahttpdc/reads → async_httpd_data_collector-2.0.1/ahttpdc/read}/__init__.py +0 -0
- {async_httpd_data_collector-0.2.2/ahttpdc/reads → async_httpd_data_collector-2.0.1/ahttpdc/read}/fetch/__init__.py +0 -0
- {async_httpd_data_collector-0.2.2/ahttpdc/reads → async_httpd_data_collector-2.0.1/ahttpdc/read}/query/__init__.py +0 -0
- {async_httpd_data_collector-0.2.2 → async_httpd_data_collector-2.0.1}/requirements.txt +0 -0
- {async_httpd_data_collector-0.2.2 → async_httpd_data_collector-2.0.1}/tests/dev_server.py +0 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: Publish Python Package
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches:
|
|
5
|
+
- master
|
|
6
|
+
tags:
|
|
7
|
+
- 'v*'
|
|
8
|
+
jobs:
|
|
9
|
+
build-and-publish:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- name: Checkout repository
|
|
13
|
+
uses: actions/checkout@v2
|
|
14
|
+
- name: Set up Python
|
|
15
|
+
uses: actions/setup-python@v2
|
|
16
|
+
with:
|
|
17
|
+
python-version: '3.x'
|
|
18
|
+
- name: Install dependencies
|
|
19
|
+
run: |
|
|
20
|
+
python -m pip install --upgrade pip
|
|
21
|
+
pip install build twine
|
|
22
|
+
pip install -r requirements.txt
|
|
23
|
+
- name: Build the application
|
|
24
|
+
run: |
|
|
25
|
+
python -m build
|
|
26
|
+
- name: Publish to PyPi
|
|
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/*
|
|
33
|
+
- name: Release
|
|
34
|
+
uses: softprops/action-gh-release@v2
|
|
35
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
36
|
+
with:
|
|
37
|
+
files: |
|
|
38
|
+
dist/*
|
|
@@ -1,40 +1,32 @@
|
|
|
1
1
|
name: Python CI
|
|
2
|
-
|
|
3
2
|
# publish on push to master
|
|
4
3
|
on:
|
|
5
4
|
push:
|
|
6
5
|
branches:
|
|
7
6
|
- master
|
|
8
|
-
|
|
9
7
|
jobs:
|
|
10
8
|
deploy:
|
|
11
9
|
runs-on: ubuntu-latest
|
|
12
|
-
|
|
13
10
|
services:
|
|
14
11
|
influxdb:
|
|
15
12
|
image: influxdb:2
|
|
16
13
|
ports:
|
|
17
14
|
- 8086:8086
|
|
18
|
-
|
|
19
15
|
flask:
|
|
20
16
|
image: python:3.9
|
|
21
17
|
ports:
|
|
22
18
|
- 5000:5000
|
|
23
|
-
|
|
24
19
|
steps:
|
|
25
20
|
- name: Check out repository
|
|
26
21
|
uses: actions/checkout@v2
|
|
27
|
-
|
|
28
22
|
- name: Install InfluxDB CLI
|
|
29
23
|
run: |
|
|
30
24
|
wget https://download.influxdata.com/influxdb/releases/influxdb2-client-2.7.5-linux-amd64.tar.gz
|
|
31
25
|
tar xvzf ./influxdb2-client-2.7.5-linux-amd64.tar.gz
|
|
32
26
|
sudo cp ./influx /usr/local/bin/
|
|
33
|
-
|
|
34
27
|
- name: Set up InfluxDB
|
|
35
28
|
id: setup-influx
|
|
36
29
|
run: |
|
|
37
|
-
|
|
38
30
|
# passes to test database with no data
|
|
39
31
|
INFLUX_USERNAME="test-user"
|
|
40
32
|
INFLUX_PASSWORD="test-password"
|
|
@@ -52,11 +44,9 @@ jobs:
|
|
|
52
44
|
# saving information required for connection later
|
|
53
45
|
echo "::set-output name=org::${INFLUX_ORG}"
|
|
54
46
|
echo "::set-output name=bucket::${INFLUX_BUCKET}"
|
|
55
|
-
|
|
56
47
|
- name: Authorization for InfluxDB
|
|
57
48
|
id: auth
|
|
58
49
|
run: |
|
|
59
|
-
|
|
60
50
|
# authenticating the connection
|
|
61
51
|
INFLUX_TOKEN=$(influx auth create \
|
|
62
52
|
--user "$INFLUX_USERNAME" \
|
|
@@ -65,15 +55,13 @@ jobs:
|
|
|
65
55
|
--description "testing token" \
|
|
66
56
|
--skip-verify \
|
|
67
57
|
--json | jq '.token')
|
|
68
|
-
|
|
58
|
+
|
|
69
59
|
# saving the token for the connection
|
|
70
60
|
echo "::set-output name=token::${INFLUX_TOKEN}"
|
|
71
|
-
|
|
72
61
|
- name: Set up Python
|
|
73
62
|
uses: actions/setup-python@v2
|
|
74
63
|
with:
|
|
75
64
|
python-version: '3.11'
|
|
76
|
-
|
|
77
65
|
- name: Install dependencies
|
|
78
66
|
run: |
|
|
79
67
|
python -m pip install --upgrade pip
|
|
@@ -81,15 +69,12 @@ jobs:
|
|
|
81
69
|
pip install ruff
|
|
82
70
|
pip install twine
|
|
83
71
|
pip install -r requirements.txt
|
|
84
|
-
|
|
85
72
|
- name: Lint with ruff
|
|
86
73
|
run: |
|
|
87
74
|
ruff format
|
|
88
75
|
ruff check
|
|
89
|
-
|
|
90
76
|
- name: Test with pytest
|
|
91
77
|
run: |
|
|
92
|
-
|
|
93
78
|
# starting the flask server, supplying some sample data
|
|
94
79
|
export FLASK_APP="tests/dev_server"
|
|
95
80
|
flask run --host=0.0.0.0 --port=9000 &
|
|
@@ -102,22 +87,4 @@ jobs:
|
|
|
102
87
|
export INFLUXDB_TOKEN=${{steps.auth.outputs.token}}
|
|
103
88
|
export INFLUXDB_ORG=${{steps.setup-influx.outputs.org}}
|
|
104
89
|
export INFLUXDB_BUCKET=${{steps.setup-influx.outputs.bucket}}
|
|
105
|
-
pytest
|
|
106
|
-
|
|
107
|
-
- name: Build the application
|
|
108
|
-
run: |
|
|
109
|
-
python3 -m build
|
|
110
|
-
|
|
111
|
-
- name: Publish to the PyPi
|
|
112
|
-
env:
|
|
113
|
-
TWINE_USERNAME: __token__
|
|
114
|
-
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
|
|
115
|
-
run: |
|
|
116
|
-
python3 -m twine upload dist/*
|
|
117
|
-
|
|
118
|
-
- name: Release
|
|
119
|
-
uses: softprops/action-gh-release@v2
|
|
120
|
-
if: startsWith(github.ref, 'refs/tags/')
|
|
121
|
-
with:
|
|
122
|
-
files: |
|
|
123
|
-
dist/*
|
|
90
|
+
pytest
|