ivs_tvac 0.25.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.
@@ -0,0 +1,65 @@
1
+ # Python versions and environment
2
+
3
+ __pycache__
4
+ .python-version
5
+ .envrc
6
+
7
+ # Build systems
8
+
9
+ build
10
+ dist
11
+ **/*.egg-info
12
+
13
+ # Apple specific
14
+
15
+ .DS_Store
16
+
17
+ # Unit testing
18
+
19
+ .pytest_cache
20
+ .coverage
21
+ .coverage.*
22
+ .nox
23
+ htmlcov
24
+ libs/cgse-core/temperature.csv
25
+
26
+ # Prototypes
27
+
28
+ **/prototypes/typed_serialization
29
+
30
+ # dotenv, ignore all but the example file
31
+
32
+ .env
33
+ .env.*
34
+ !.env.example
35
+
36
+ # Virtual environments
37
+
38
+ .venv
39
+ venv
40
+
41
+ # PyCharm IDE
42
+
43
+ .idea
44
+
45
+ # VSCode IDE
46
+
47
+ .vscode
48
+ *.code-workspace
49
+
50
+ # MKDOCS documentation site
51
+
52
+ /site
53
+
54
+ # Packaging
55
+
56
+ uv.lock
57
+ libs/test_service_registry.db
58
+ libs/cgse-core/metrics.duckdb
59
+ install_influxdb3.sh
60
+ .pylintrc
61
+
62
+ # CGSE Specific
63
+
64
+ .migrate_influx_to_questdb.state.json
65
+ service_registry.db*
@@ -0,0 +1,24 @@
1
+ Metadata-Version: 2.4
2
+ Name: ivs_tvac
3
+ Version: 0.25.2
4
+ Summary: Thermal Vacuum Chamber
5
+ Author: IvS KU Leuven
6
+ Maintainer-email: Rik Huygen <rik.huygen@kuleuven.be>, Sara Regibo <sara.regibo@kuleuven.be>
7
+ License-Expression: MIT
8
+ Keywords: CGSE,Common-EGSE,hardware testing,software framework
9
+ Requires-Python: >=3.10
10
+ Requires-Dist: asyncua>=1.1.8
11
+ Requires-Dist: cgse-common
12
+ Requires-Dist: cgse-core
13
+ Provides-Extra: test
14
+ Requires-Dist: pytest; extra == 'test'
15
+ Requires-Dist: pytest-cov; extra == 'test'
16
+ Requires-Dist: pytest-mock; extra == 'test'
17
+ Description-Content-Type: text/markdown
18
+
19
+ # Thermal Vacuum Chamber (ThermalVac)
20
+
21
+ ## Reference Documents
22
+
23
+ - ThermalVAC Manual
24
+ - ThermalVac - Interface and configuration document
@@ -0,0 +1,6 @@
1
+ # Thermal Vacuum Chamber (ThermalVac)
2
+
3
+ ## Reference Documents
4
+
5
+ - ThermalVAC Manual
6
+ - ThermalVac - Interface and configuration document
@@ -0,0 +1,86 @@
1
+ [project]
2
+ name = "ivs_tvac"
3
+ version = "0.25.2"
4
+ description = "Thermal Vacuum Chamber"
5
+ authors = [
6
+ {name = "IvS KU Leuven"}
7
+ ]
8
+ maintainers = [
9
+ {name = "Rik Huygen", email = "rik.huygen@kuleuven.be"},
10
+ {name = "Sara Regibo", email = "sara.regibo@kuleuven.be"}
11
+ ]
12
+ readme = {"file" = "README.md", "content-type" = "text/markdown"}
13
+ requires-python = ">=3.10"
14
+ license = "MIT"
15
+ keywords = [
16
+ "CGSE",
17
+ "Common-EGSE",
18
+ "hardware testing",
19
+ "software framework",
20
+ ]
21
+ dependencies = [
22
+ "cgse-common",
23
+ "cgse-core",
24
+ "asyncua>=1.1.8",
25
+ ]
26
+
27
+ [project.optional-dependencies]
28
+ test = ["pytest", "pytest-mock", "pytest-cov"]
29
+
30
+ [project.scripts]
31
+ tvac = "egse.ivs.tvac.async_tvac:app"
32
+
33
+ ##[project.gui-scripts]
34
+ ##tgf4000_ui = "egse.arbitrary_wave_generator.aim_tti.tgf4000_ui:main"
35
+
36
+ [project.entry-points."cgse.version"]
37
+ ivs-tvac = 'egse.version:get_version_installed'
38
+
39
+ [project.entry-points."cgse.settings"]
40
+ ivs-tvac = "ivs_tvac:settings.yaml"
41
+
42
+ [project.entry-points."cgse.service.device_command"]
43
+ tvac = 'ivs_tvac.cgse_services:tvac'
44
+
45
+ [project.entry-points."cgse.explore"]
46
+ explore = "ivs_tvac.cgse_explore"
47
+
48
+ [tool.pytest.ini_options]
49
+ asyncio_mode = "auto"
50
+ pythonpath = [
51
+ "src",
52
+ ]
53
+ testpaths = [
54
+ "tests",
55
+ ]
56
+
57
+ [tool.hatch.build.targets.sdist]
58
+ exclude = [
59
+ "/tests",
60
+ "/pytest.ini",
61
+ "/.gitignore",
62
+ ]
63
+
64
+ [tool.hatch.build.targets.wheel]
65
+ packages = ["src/egse", "src/ivs_tvac"]
66
+
67
+ [tool.ruff]
68
+ line-length = 120
69
+
70
+ [tool.ruff.lint]
71
+ extend-select = ["E501"]
72
+
73
+ [build-system]
74
+ requires = ["hatchling"]
75
+ build-backend = "hatchling.build"
76
+
77
+ [dependency-groups]
78
+ dev = [
79
+ "pytest>=8.3.4",
80
+ "pytest-cov>=6.0.0",
81
+ "pytest-mock>=3.14.0",
82
+ "pytest-asyncio>=0.26.0",
83
+ "ruff>=0.9.0",
84
+ "nox>=2025.2.9",
85
+ "ipython",
86
+ ]
@@ -0,0 +1,66 @@
1
+ from pathlib import Path
2
+ from egse.settings import Settings
3
+
4
+ HERE = Path(__file__).parent
5
+
6
+ DEVICE_SETTINGS = Settings.load("ThermalVac")
7
+ SETPOINT_TEMP_MIN: float | None = DEVICE_SETTINGS.get("SETPOINT_TEMP_MIN", None)
8
+ SETPOINT_TEMP_MAX: float | None = DEVICE_SETTINGS.get("SETPOINT_TEMP_MAX", None)
9
+
10
+ CS_SETTINGS = Settings.load("ThermalVac Control Server")
11
+ PROTOCOL = CS_SETTINGS.get("PROTOCOL", "tcp") # Communication protocol
12
+ STORAGE_MNEMONIC = CS_SETTINGS.get("STORAGE_MNEMONIC", "TVAC")
13
+ SERVICE_TYPE = CS_SETTINGS.get("SERVICE_TYPE", "TVAC")
14
+ SERVICE_NAME = CS_SETTINGS.get("SERVICE_NAME", "TVAC")
15
+ SAMPLE_INTERVAL = CS_SETTINGS.get("SAMPLE_INTERVAL", 5.0) # Sample interval [s]
16
+
17
+ PROXY_TIMEOUT = 10 # Timeout for proxy connections [s]
18
+
19
+
20
+ def clamp_setpoint_temperature(value: float) -> float:
21
+ """Clamps the requested temperature setpoint to the supported safety range.
22
+
23
+ If the given temperature setpoint is outside the allowed range, it will be clamped to the nearest limit from the
24
+ settings.
25
+
26
+ Args:
27
+ value (float): Temperature setpoint to clamp [°C].
28
+
29
+ Returns:
30
+ Clamped temperature setpoint [°C].
31
+
32
+ Raises:
33
+ ValueError: If temperature limits are not configured in the settings.
34
+ """
35
+
36
+ if SETPOINT_TEMP_MIN is None or SETPOINT_TEMP_MAX is None:
37
+ raise ValueError(f"Temperature limits not configured: MIN={SETPOINT_TEMP_MIN}, MAX={SETPOINT_TEMP_MAX}")
38
+
39
+ return max(SETPOINT_TEMP_MIN, min(SETPOINT_TEMP_MAX, value))
40
+
41
+
42
+ def tvac_state_to_string(state: int) -> str:
43
+ """String representation of the TVAC state.
44
+
45
+ Args:
46
+ state (int): Integer representation of the TVAC state.
47
+
48
+ Returns:
49
+ String representation of the TVAC state.
50
+ """
51
+
52
+ state_dict = {
53
+ 0: "Unknown",
54
+ 1: "Idle",
55
+ 2: "Pumping fore vacuum",
56
+ 3: "Waiting for pressure to stabilize",
57
+ 4: "Pumping at high vacuum",
58
+ 5: "Starting turbo pump",
59
+ 6: "Stopping pumps",
60
+ 7: "Turbo pump decelerating",
61
+ 8: "Cooling",
62
+ 9: "Heating",
63
+ 10: "Pressure rising (too high for turbo)",
64
+ }
65
+
66
+ return state_dict.get(state, "Invalid state")