thermoworks-cloud 0.1.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.
- thermoworks_cloud-0.1.1/.devcontainer/devcontainer.json +26 -0
- thermoworks_cloud-0.1.1/.github/dependabot.yml +12 -0
- thermoworks_cloud-0.1.1/.github/workflows/python-package.yml +165 -0
- thermoworks_cloud-0.1.1/.gitignore +17 -0
- thermoworks_cloud-0.1.1/.vscode/settings.json +7 -0
- thermoworks_cloud-0.1.1/LICENSE.txt +674 -0
- thermoworks_cloud-0.1.1/PKG-INFO +704 -0
- thermoworks_cloud-0.1.1/README.md +9 -0
- thermoworks_cloud-0.1.1/examples/basic_get_user.py +19 -0
- thermoworks_cloud-0.1.1/pyproject.toml +43 -0
- thermoworks_cloud-0.1.1/setup.cfg +4 -0
- thermoworks_cloud-0.1.1/tests/__init__.py +0 -0
- thermoworks_cloud-0.1.1/tests/auth_test_object.py +40 -0
- thermoworks_cloud-0.1.1/tests/conftest.py +62 -0
- thermoworks_cloud-0.1.1/tests/core_test_object.py +35 -0
- thermoworks_cloud-0.1.1/tests/test_auth.py +260 -0
- thermoworks_cloud-0.1.1/tests/test_core.py +486 -0
- thermoworks_cloud-0.1.1/tests/test_data.py +450 -0
- thermoworks_cloud-0.1.1/thermoworks_cloud/__init__.py +4 -0
- thermoworks_cloud-0.1.1/thermoworks_cloud/auth.py +291 -0
- thermoworks_cloud-0.1.1/thermoworks_cloud/core.py +85 -0
- thermoworks_cloud-0.1.1/thermoworks_cloud/models/__init__.py +0 -0
- thermoworks_cloud-0.1.1/thermoworks_cloud/models/device.py +101 -0
- thermoworks_cloud-0.1.1/thermoworks_cloud/models/device_channel.py +107 -0
- thermoworks_cloud-0.1.1/thermoworks_cloud/models/user.py +132 -0
- thermoworks_cloud-0.1.1/thermoworks_cloud/models/user_credentials.py +79 -0
- thermoworks_cloud-0.1.1/thermoworks_cloud/utils.py +14 -0
- thermoworks_cloud-0.1.1/thermoworks_cloud.egg-info/PKG-INFO +704 -0
- thermoworks_cloud-0.1.1/thermoworks_cloud.egg-info/SOURCES.txt +30 -0
- thermoworks_cloud-0.1.1/thermoworks_cloud.egg-info/dependency_links.txt +1 -0
- thermoworks_cloud-0.1.1/thermoworks_cloud.egg-info/requires.txt +8 -0
- thermoworks_cloud-0.1.1/thermoworks_cloud.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
|
2
|
+
// README at: https://github.com/devcontainers/templates/tree/main/src/python
|
|
3
|
+
{
|
|
4
|
+
"name": "Python 3",
|
|
5
|
+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
|
6
|
+
"image": "mcr.microsoft.com/devcontainers/python:1-3.12-bullseye",
|
|
7
|
+
|
|
8
|
+
// Features to add to the dev container. More info: https://containers.dev/features.
|
|
9
|
+
"features": {
|
|
10
|
+
"ghcr.io/dhoeric/features/act:1": {},
|
|
11
|
+
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {},
|
|
12
|
+
"ghcr.io/devcontainers/features/github-cli:1": {}
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
|
16
|
+
// "forwardPorts": [],
|
|
17
|
+
|
|
18
|
+
// Install the dependencies after the container is initialized
|
|
19
|
+
"postCreateCommand": "python3 -m pip install .[test]"
|
|
20
|
+
|
|
21
|
+
// Configure tool-specific properties.
|
|
22
|
+
// "customizations": {},
|
|
23
|
+
|
|
24
|
+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
|
25
|
+
// "remoteUser": "root"
|
|
26
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# To get started with Dependabot version updates, you'll need to specify which
|
|
2
|
+
# package ecosystems to update and where the package manifests are located.
|
|
3
|
+
# Please see the documentation for more information:
|
|
4
|
+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
|
5
|
+
# https://containers.dev/guide/dependabot
|
|
6
|
+
|
|
7
|
+
version: 2
|
|
8
|
+
updates:
|
|
9
|
+
- package-ecosystem: "devcontainers"
|
|
10
|
+
directory: "/"
|
|
11
|
+
schedule:
|
|
12
|
+
interval: weekly
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
name: Python Theromoworks Cloud
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main ]
|
|
6
|
+
tags:
|
|
7
|
+
- v*
|
|
8
|
+
pull_request:
|
|
9
|
+
branches: [ main ]
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
test:
|
|
13
|
+
name: Run Tests
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- name: Checkout
|
|
17
|
+
uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- name: Setup Python
|
|
20
|
+
uses: actions/setup-python@v5
|
|
21
|
+
with:
|
|
22
|
+
python-version: '3.x'
|
|
23
|
+
|
|
24
|
+
- name: Install dependencies
|
|
25
|
+
run: |
|
|
26
|
+
python -m pip install --upgrade pip
|
|
27
|
+
pip install -e .[test]
|
|
28
|
+
|
|
29
|
+
- name: Test with pytest
|
|
30
|
+
run: |
|
|
31
|
+
coverage run -m pytest
|
|
32
|
+
|
|
33
|
+
- name: Upload coverage to Codecov
|
|
34
|
+
uses: codecov/codecov-action@v5
|
|
35
|
+
with:
|
|
36
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
37
|
+
|
|
38
|
+
- name: Validate examples
|
|
39
|
+
env:
|
|
40
|
+
THERMOWORKS_EMAIL: ${{ secrets.THERMOWORKS_EMAIL }}
|
|
41
|
+
THERMOWORKS_PASSWORD: ${{ secrets.THERMOWORKS_PASSWORD }}
|
|
42
|
+
run: |
|
|
43
|
+
for example in examples/*.py; do
|
|
44
|
+
echo "Running $example"
|
|
45
|
+
python "$example"
|
|
46
|
+
done
|
|
47
|
+
|
|
48
|
+
package:
|
|
49
|
+
name: Build Distribution
|
|
50
|
+
needs: test
|
|
51
|
+
runs-on: ubuntu-latest
|
|
52
|
+
|
|
53
|
+
steps:
|
|
54
|
+
- uses: actions/checkout@v4
|
|
55
|
+
|
|
56
|
+
- name: Set up Python
|
|
57
|
+
uses: actions/setup-python@v5
|
|
58
|
+
with:
|
|
59
|
+
python-version: '3.x'
|
|
60
|
+
|
|
61
|
+
- name: Install pypa/build
|
|
62
|
+
run: >-
|
|
63
|
+
python3 -m
|
|
64
|
+
pip install
|
|
65
|
+
build
|
|
66
|
+
--user
|
|
67
|
+
|
|
68
|
+
- name: Build a binary wheel and a source tarball
|
|
69
|
+
run: python3 -m build
|
|
70
|
+
|
|
71
|
+
- name: Store the distribution packages
|
|
72
|
+
uses: actions/upload-artifact@v4
|
|
73
|
+
with:
|
|
74
|
+
name: python-package-distributions
|
|
75
|
+
path: dist/
|
|
76
|
+
|
|
77
|
+
publish-to-pypi:
|
|
78
|
+
name: Publish to PyPI
|
|
79
|
+
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
|
|
80
|
+
needs:
|
|
81
|
+
- package
|
|
82
|
+
runs-on: ubuntu-latest
|
|
83
|
+
environment:
|
|
84
|
+
name: pypi
|
|
85
|
+
url: https://pypi.org/p/thermoworks-cloud
|
|
86
|
+
permissions:
|
|
87
|
+
id-token: write # IMPORTANT: mandatory for trusted publishing
|
|
88
|
+
steps:
|
|
89
|
+
|
|
90
|
+
- name: Download all the dists
|
|
91
|
+
uses: actions/download-artifact@v4
|
|
92
|
+
with:
|
|
93
|
+
name: python-package-distributions
|
|
94
|
+
path: dist/
|
|
95
|
+
|
|
96
|
+
- name: Publish distribution to PyPI
|
|
97
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
98
|
+
|
|
99
|
+
publish-to-testpypi:
|
|
100
|
+
name: Publish to TestPyPI
|
|
101
|
+
needs:
|
|
102
|
+
- package
|
|
103
|
+
runs-on: ubuntu-latest
|
|
104
|
+
environment:
|
|
105
|
+
name: testpypi
|
|
106
|
+
url: https://test.pypi.org/p/thermoworks-cloud
|
|
107
|
+
|
|
108
|
+
permissions:
|
|
109
|
+
id-token: write # IMPORTANT: mandatory for trusted publishing
|
|
110
|
+
|
|
111
|
+
steps:
|
|
112
|
+
- name: Download all the dists
|
|
113
|
+
uses: actions/download-artifact@v4
|
|
114
|
+
with:
|
|
115
|
+
name: python-package-distributions
|
|
116
|
+
path: dist/
|
|
117
|
+
|
|
118
|
+
- name: Publish distribution 📦 to TestPyPI
|
|
119
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
120
|
+
with:
|
|
121
|
+
repository-url: https://test.pypi.org/legacy/
|
|
122
|
+
|
|
123
|
+
github-release:
|
|
124
|
+
name: >-
|
|
125
|
+
Sign the distribution with Sigstore
|
|
126
|
+
and upload them to GitHub Release
|
|
127
|
+
needs:
|
|
128
|
+
- publish-to-pypi
|
|
129
|
+
runs-on: ubuntu-latest
|
|
130
|
+
|
|
131
|
+
permissions:
|
|
132
|
+
contents: write # IMPORTANT: mandatory for making GitHub Releases
|
|
133
|
+
id-token: write # IMPORTANT: mandatory for sigstore
|
|
134
|
+
|
|
135
|
+
steps:
|
|
136
|
+
- name: Download all the dists
|
|
137
|
+
uses: actions/download-artifact@v4
|
|
138
|
+
with:
|
|
139
|
+
name: python-package-distributions
|
|
140
|
+
path: dist/
|
|
141
|
+
|
|
142
|
+
- name: Sign the dists with Sigstore
|
|
143
|
+
uses: sigstore/gh-action-sigstore-python@v3.0.0
|
|
144
|
+
with:
|
|
145
|
+
inputs: >-
|
|
146
|
+
./dist/*.tar.gz
|
|
147
|
+
./dist/*.whl
|
|
148
|
+
- name: Create GitHub Release
|
|
149
|
+
env:
|
|
150
|
+
GITHUB_TOKEN: ${{ github.token }}
|
|
151
|
+
run: >-
|
|
152
|
+
gh release create
|
|
153
|
+
'${{ github.ref_name }}'
|
|
154
|
+
--repo '${{ github.repository }}'
|
|
155
|
+
--notes ""
|
|
156
|
+
- name: Upload artifact signatures to GitHub Release
|
|
157
|
+
env:
|
|
158
|
+
GITHUB_TOKEN: ${{ github.token }}
|
|
159
|
+
# Upload to GitHub Release using the `gh` CLI.
|
|
160
|
+
# `dist/` contains the built packages, and the
|
|
161
|
+
# sigstore-produced signatures and certificates.
|
|
162
|
+
run: >-
|
|
163
|
+
gh release upload
|
|
164
|
+
'${{ github.ref_name }}' dist/**
|
|
165
|
+
--repo '${{ github.repository }}'
|