-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
96 lines (89 loc) · 3.07 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
[project]
name = "ivy"
version = "1.0.0"
description = "A Python boilerplate for an IoT node data acqusition system supporting remote configuration and software updates"
requires-python = ">=3.10,<4.0"
authors = [{ name = "Moritz Makowski", email = "[email protected]" }]
dependencies = [
"click>=8.1.7",
"filelock>=3.16.1",
"pydantic>=2.10.4",
"pytest>=8.3.3",
"python-dotenv>=1.0.1",
"psutil>=6.1.0",
"tenta>=0.1.5",
"tum-esm-utils>=2.5.3",
"typing-extensions>=4.12.2",
"paho-mqtt>=2.1.0",
]
classifiers = [
"License :: OSI Approved :: GNU General Public License (GPL)",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
license = { text = "GPL-3.0" }
readme = "README.md"
[project.urls]
repository = "https://github.com/tum-esm/ivy"
documentation = "https://tum-esm-ivy.netlify.app/"
[project.optional-dependencies]
dev = [
"docstring-parser>=0.16",
"jsonref>=1.1.0",
"mypy>=1.14.0",
"pytest-cov>=6.0.0",
"setuptools>=75.5.0",
"types-psutil>=6.1.0.20241102",
"ruff>=0.8.4",
"pytest-order>=1.3.0",
]
[tool.pdm]
distribution = false
[tool.ruff]
line-length = 100
[tool.mypy]
implicit_reexport = true
plugins = ["pydantic.mypy"]
strict = true
warn_unused_ignores = false
[[tool.mypy.overrides]]
ignore_missing_imports = true
module = ["jsonref"]
[tool.pytest.ini_options]
markers = [
"quick: can be run in any environment (< 10s)",
"updater: can be run in any environment (> 10s)",
"integration: can only be run on a configured system (< 10s)",
"version_change: will run before switching to a new version",
]
[tool.pdm.scripts]
quick-tests = { shell = """
export TS="$(date +%s)" && export IVY_ROOT_DIR="/tmp/ci-tests-ivy-root-dir-$TS" && mkdir $IVY_ROOT_DIR &&
pytest --verbose -m "quick" --cov=$PWD/src --exitfirst tests/ && rm -rf /tmp/ci-tests-ivy* &&
pkill -f "Python"
""" }
ci-tests = { shell = """
export TS="$(date +%s)" && export IVY_ROOT_DIR="/tmp/ci-tests-ivy-root-dir-$TS" && mkdir $IVY_ROOT_DIR &&
pytest --verbose -m "quick or updater" --cov=$PWD/src --exitfirst tests/ && rm -rf /tmp/ci-tests-ivy* &&
pkill -f "Python"
""" }
integration-tests = { shell = """
pytest --verbose -m "integration" --cov=$PWD/src --exitfirst tests/
""" }
start-mosquitto = { shell = """
mosquitto_passwd -c -b $PWD/tests/updater/data/mosquitto.passwords test_username test_password &&
echo "listener 1883\\nallow_anonymous false\\npassword_file $PWD/tests/updater/data/mosquitto.passwords" > $PWD/tests/updater/data/mosquitto.conf &&
mosquitto -d -c tests/updater/data/mosquitto.conf
""" }
stop-mosquitto = { shell = 'pkill -f "mosquitto -d"' }
stop-python = { shell = 'pkill -f "Python"' }
run-thingsboard = { shell = """
docker rm -f mytb > /dev/null 2>&1 &&
docker run -it --name mytb --restart always \
-p 9090:9090 -p 1883:1883 -p 7070:7070 -p 5683-5688:5683-5688/udp \
-v ~/.mytb-data:/data -v ~/.mytb-logs:/var/log/thingsboard \
thingsboard/tb-postgres:3.7.0
""" }