digilent 0.17.4__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,46 @@
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
+
25
+ # Virtual environments
26
+
27
+ .env
28
+ .venv
29
+ venv
30
+
31
+ # PyCharm IDE
32
+
33
+ .idea
34
+
35
+ # VSCode IDE
36
+
37
+ .vscode
38
+ *.code-workspace
39
+
40
+ # MKDOCS documentation site
41
+
42
+ /site
43
+
44
+ # Packaging
45
+
46
+ uv.lock
@@ -0,0 +1,23 @@
1
+ Metadata-Version: 2.4
2
+ Name: digilent
3
+ Version: 0.17.4
4
+ Summary: Digilent temperature and voltage monitoring for CGSE
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: cgse-common
11
+ Requires-Dist: cgse-core
12
+ Provides-Extra: test
13
+ Requires-Dist: pytest; extra == 'test'
14
+ Requires-Dist: pytest-cov; extra == 'test'
15
+ Requires-Dist: pytest-mock; extra == 'test'
16
+ Description-Content-Type: text/markdown
17
+
18
+ # Digilent MEASURpoint/TEMPpoint/VOLTpoint
19
+
20
+ ## Reference Documents
21
+
22
+ - User's Manual for Standard TEMPpoint, VOLTpoint, and MEASURpointLXI Instruments (DT8871, DT8871U, DT8872, DT8873, DT8874)
23
+ - SCPI Programmer's Manual for LXI Measurement Instruments (for TEMPpoint, VOLTpoint, and MEASURpoint Instruments)
@@ -0,0 +1,6 @@
1
+ # Digilent MEASURpoint/TEMPpoint/VOLTpoint
2
+
3
+ ## Reference Documents
4
+
5
+ - User's Manual for Standard TEMPpoint, VOLTpoint, and MEASURpointLXI Instruments (DT8871, DT8871U, DT8872, DT8873, DT8874)
6
+ - SCPI Programmer's Manual for LXI Measurement Instruments (for TEMPpoint, VOLTpoint, and MEASURpoint Instruments)
@@ -0,0 +1,81 @@
1
+ [project]
2
+ name = "digilent"
3
+ version = "0.17.4"
4
+ description = "Digilent temperature and voltage monitoring for CGSE"
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
+ ]
25
+
26
+ [project.optional-dependencies]
27
+ test = ["pytest", "pytest-mock", "pytest-cov"]
28
+
29
+ [project.scripts]
30
+ dt8874_cs = 'egse.digilent.measurpoint.dt8874.dt8874_cs:app'
31
+ dt8874_sim = 'egse.digilent.measurpoint.dt8874.dt8874_sim:app'
32
+
33
+ #[project.gui-scripts]
34
+ #dt8874_ui = "egse.digilent.measurpoint.dt8874.dt8874_ui:main"
35
+
36
+ [project.entry-points."cgse.version"]
37
+ digilent = 'egse.version:get_version_installed'
38
+
39
+ [project.entry-points."cgse.settings"]
40
+ digilent = "digilent:settings.yaml"
41
+
42
+ [project.entry-points."cgse.service.device_command"]
43
+ dt8874 = 'digilent.cgse_services:dt8874'
44
+
45
+ [project.entry-points."cgse.explore"]
46
+ explore = "digilent.cgse_explore"
47
+
48
+ [tool.pytest.ini_options]
49
+ asyncio_mode = "auto"
50
+
51
+ [tool.hatch.build.targets.sdist]
52
+ exclude = [
53
+ "/tests",
54
+ "/pytest.ini",
55
+ "/.gitignore",
56
+ ]
57
+
58
+ [tool.hatch.build.targets.wheel]
59
+ packages = ["src/egse", "src/digilent"]
60
+
61
+ [tool.ruff]
62
+ line-length = 120
63
+
64
+ [tool.ruff.lint]
65
+ extend-select = ["E501"]
66
+
67
+ [build-system]
68
+ requires = ["hatchling"]
69
+ build-backend = "hatchling.build"
70
+
71
+ [dependency-groups]
72
+ dev = [
73
+ "setuptools", # needed by PyCharm
74
+ "pytest>=8.3.4",
75
+ "pytest-cov>=6.0.0",
76
+ "pytest-mock>=3.14.0",
77
+ "ruff>=0.9.0",
78
+ "nox>=2025.2.9",
79
+ "setuptools>=75.8.2", # needed by PyCharm
80
+ "pytest-asyncio>=0.26.0",
81
+ ]
File without changes
@@ -0,0 +1,19 @@
1
+ __all__ = [
2
+ "show_processes",
3
+ ]
4
+
5
+ import re
6
+
7
+ from egse.process import ProcessInfo
8
+ from egse.process import get_processes
9
+
10
+
11
+ def show_processes():
12
+ """Returns of list of ProcessInfo data classes for matching processes from this package."""
13
+
14
+ def filter_procs(pi: ProcessInfo):
15
+ pattern = "dt8874"
16
+
17
+ return re.search(pattern, pi.command)
18
+
19
+ return get_processes(filter_procs)
@@ -0,0 +1,59 @@
1
+ import subprocess
2
+ from typing import Annotated
3
+
4
+ import sys
5
+
6
+ import rich
7
+ import typer
8
+
9
+ from egse.system import redirect_output_to_log, all_logging_disabled
10
+
11
+ dt8874 = typer.Typer(
12
+ name="dt8874", help="Digilent MEASURpoint DT8874, temperature and voltage monitoring", no_args_is_help=True
13
+ )
14
+
15
+
16
+ @dt8874.command(name="start")
17
+ def start_dt8874(
18
+ simulator: Annotated[
19
+ bool, typer.Option("--simulator", "--sim", help="use a device simulator as the backend")
20
+ ] = False,
21
+ ):
22
+ """Start the Digilent MEASURpoint DT8874 Control Server.
23
+
24
+ The Control Server is always started in the background.
25
+ """
26
+
27
+ rich.print(f"Starting the Digilent MEASURpoint DT8874 Control Server - {simulator = }")
28
+ out = redirect_output_to_log("dt8874_cs.start.log")
29
+
30
+ cmd = [sys.executable, "-m", "egse.digilent.measurpoint.dt8874.dt8874_cs", "start"]
31
+ if simulator:
32
+ cmd.append("--simulator")
33
+
34
+ subprocess.Popen(cmd, stdout=out, stderr=out, stdin=subprocess.DEVNULL, close_fds=True)
35
+
36
+
37
+ @dt8874.command(name="stop")
38
+ def stop_tcu():
39
+ """Stops the Digilent MEASURpoint DT8874 Control Server."""
40
+
41
+ rich.print("Stopping the Digilent MEASURpoint DT8874 Control Server")
42
+ out = redirect_output_to_log("tcu_cs.stop.log")
43
+
44
+ cmd = [sys.executable, "-m", "egse.digilent.measurpoint.dt8874.dt8874_cs", "stop"]
45
+ subprocess.Popen(cmd, stdout=out, stderr=out, stdin=subprocess.DEVNULL, close_fds=True)
46
+
47
+
48
+ @dt8874.command(name="status")
49
+ def status_dt8874():
50
+ """Prints the status information about the Digilent MEASURpoint DT8874 Control Server."""
51
+
52
+ with all_logging_disabled():
53
+ from egse.digilent.measurpoint.dt8874 import dt8874_cs
54
+
55
+ dt8874_cs.status()
56
+
57
+
58
+ if __name__ == "__main__":
59
+ dt8874()
@@ -0,0 +1,23 @@
1
+ PACKAGES:
2
+ DIGILENT: Digilent temperature and voltage monitoring
3
+
4
+
5
+ Digilent MEASURpoint DT8874:
6
+
7
+ DEVICE_NAME: DT8874
8
+ HOSTNAME: 10.33.179.128
9
+ PORT: 5025
10
+ TIMEOUT: 60
11
+
12
+ Digilent MEASURpoint DT8874 Control Server:
13
+
14
+ SERVICE_TYPE: DT8874
15
+ PROCESS_NAME: dt8874_cs
16
+ PROTOCOL: tcp
17
+ HOSTNAME: localhost # The hostname that client shall connect to, e.g. pleiad01 @ KU Leuven
18
+ COMMANDING_PORT: 0 # The port on which the controller listens to commands - REQ-REP
19
+ MONITORING_PORT: 0 # The port on which the controller sends periodic status information of the device - PUB-SUB
20
+ SERVICE_PORT: 0 # The port on which the controller listens for configuration and administration - REQ-REP
21
+ METRICS_PORT: 0 # The HTTP port where Prometheus will connect to for retrieving metrics
22
+ DELAY: 10 # The delay time between publishing status information [seconds]
23
+ STORAGE_MNEMONIC: DT8874 # The mnemonic to be used in the filename storing the housekeeping data