Skip to content

Commit

Permalink
Prepare tomato-1.0 (#111)
Browse files Browse the repository at this point in the history
* Avoid warnings in default devices.

* Write default_devices to devicefile on first run.

* Edit readme.

* test also python 3.13
  • Loading branch information
PeterKraus authored Nov 21, 2024
1 parent 27e8ff5 commit 8ac870f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pull-request-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
call-build:
strategy:
matrix:
pyver: ['3.10', '3.11', '3.12']
pyver: ['3.10', '3.11', '3.12', '3.13']
os: ['ubuntu-latest']
include:
- pyver: '3.10'
Expand All @@ -21,7 +21,7 @@ jobs:
needs: [call-build]
strategy:
matrix:
pyver: ['3.10', '3.11', '3.12']
pyver: ['3.10', '3.11', '3.12', '3.13']
os: ['ubuntu-latest']
include:
- pyver: '3.10'
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- [`tomato-example-counter`](https://github.com/dgbowl/tomato-example-counter): an example device for testing purposes.
- [`tomato-psutil`](https://github.com/dgbowl/tomato-psutil): an interface to the `psutil` library for CPU and memory usage statistics
- [`tomato-bronkhorst`](https://github.com/dgbowl/tomato-bronkhorst): an interface to the `bronkhorst-propar` library for control of Bronkhorst MFCs and PCs
- [`tomato-jumo`](https://github.com/dgbowl/tomato-jumo): a driver for control of Jumo Quantrol heater controllers using `minimalmodbus`

See the [Documentation](https://dgbowl.github.io/tomato) for more detailed info.

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Operating System :: OS Independent",
]
requires-python = ">= 3.10"
Expand Down
6 changes: 3 additions & 3 deletions src/tomato/data/default_devices.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
"name": "dev-counter",
"driver": "example_counter",
"address": "example-addr",
"channels": [1],
"pollrate": 1
"channels": ["1"],
"pollrate": 1.0
}
],
"pipelines": [
{
"name": "pip-counter",
"devices": [
{"role": "counter", "device": "dev-counter", "channel": 1}
{"role": "counter", "device": "dev-counter", "channel": "1"}
]
}
]
Expand Down
3 changes: 3 additions & 0 deletions src/tomato/tomato/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ def load_device_file(yamlpath: Path) -> dict:
devpath = Path(__file__).parent / ".." / "data" / "default_devices.json"
with devpath.open() as inp:
jsdata = json.load(inp)
logger.debug("writing default devices to '%s'", yamlpath)
with yamlpath.open("w") as outfile:
yaml.dump(jsdata, outfile)
return jsdata


Expand Down

0 comments on commit 8ac870f

Please sign in to comment.