cqc-quam-state 2025.6.4__py3-none-any.whl

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.

Potentially problematic release.


This version of cqc-quam-state might be problematic. Click here for more details.

@@ -0,0 +1,9 @@
1
+ """CQC QuAM State management package."""
2
+
3
+ from .utils import get_quam_state_path
4
+
5
+ # Define QUAM_STATE_PATH that points to the installed quam_state directory
6
+ QUAM_STATE_PATH = get_quam_state_path()
7
+
8
+ # Export the variable in package namespace
9
+ __all__ = ['QUAM_STATE_PATH']
cqc_quam_state/cli.py ADDED
@@ -0,0 +1,38 @@
1
+ import click
2
+ import os
3
+ from .utils import get_quam_state_path
4
+
5
+
6
+ @click.group()
7
+ def cli():
8
+ """A CLI tool for managing CQC QuAM state."""
9
+ pass
10
+
11
+
12
+ @cli.command()
13
+ def set():
14
+ """Set a configuration value."""
15
+ click.echo("Set command called")
16
+ # Add your set logic here
17
+
18
+
19
+ @cli.command()
20
+ def info():
21
+ """Display information."""
22
+ click.echo("Info command called")
23
+ # Add your info logic here
24
+
25
+
26
+ @cli.command()
27
+ def load():
28
+ """Load data or configuration."""
29
+ # Run `cqc-quam-state load`
30
+ # Get QuAM state path using the utility function
31
+ quam_state_path = str(get_quam_state_path())
32
+ # print(f"QuAM state path: {type(quam_state_path)}")
33
+
34
+ click.echo(f"export QUAM_STATE_PATH={quam_state_path}")
35
+
36
+
37
+ if __name__ == "__main__":
38
+ cli()
@@ -0,0 +1,30 @@
1
+ """Utility functions for CQC QuAM State."""
2
+
3
+ import os
4
+ from importlib.resources import files
5
+
6
+
7
+ def get_quam_state_path():
8
+ """
9
+ Get the path to the QuAM state directory.
10
+
11
+ Returns:
12
+ str: The absolute path to the QuAM state directory.
13
+ """
14
+ try:
15
+ # For Python 3.9+
16
+ # Access quam_state as a resource within the cqc_quam_state package
17
+ p = files('quam_state')
18
+ # p = files('cqc_quam_state').joinpath('quam_state')
19
+ quam_state_path = str(p._paths[0])
20
+ except Exception as e:
21
+ # Fallback for older Python versions
22
+ # This fallback might also need adjustment if __file__ is not reliable
23
+ # depending on how the package is installed/used.
24
+ # For now, assuming it's a simple local structure.
25
+ libs_dir = os.path.dirname(os.path.dirname(__file__))
26
+ quam_state_path = os.path.join(libs_dir, 'quam_state')
27
+ # print(f"Warning: Using fallback path for quam_state: {quam_state_path}")
28
+ quam_state_path = str(quam_state_path)
29
+
30
+ return quam_state_path
@@ -0,0 +1,3 @@
1
+ #!/bin/bash
2
+ output=$(cqc-quam-state load)
3
+ eval $output
@@ -0,0 +1,78 @@
1
+ Metadata-Version: 2.4
2
+ Name: cqc-quam-state
3
+ Version: 2025.6.4
4
+ Summary: Add your description here
5
+ Author-email: JUNIQ Software Team <info-juniq@fz-juelich.de>
6
+ License: MIT
7
+ Project-URL: Homepage, https://gitlab.jsc.fz-juelich.de/qip/cqc/cqc-quam-state
8
+ Project-URL: Repository, https://gitlab.jsc.fz-juelich.de/qip/cqc/cqc-quam-state
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Requires-Python: >=3.11
15
+ Description-Content-Type: text/markdown
16
+ Requires-Dist: click>=8.0.0
17
+
18
+ # CQC QUAM State
19
+
20
+ A command-line tool for managing CQC QuAM state.
21
+
22
+ ## Features
23
+
24
+ The `cqc-quam-state` CLI provides the following commands:
25
+
26
+ - `set`: Set configuration values for IP and calibration db location
27
+ - `info`: Display information about the current state
28
+ - `load`: Set the environment $QUAM_STATE to the current state
29
+
30
+ ## Installation
31
+
32
+ You can install this package using `uv` or `pip`:
33
+
34
+ ```fish
35
+ # Using uv
36
+ uv venv
37
+ source .venv/bin/activate.fish
38
+ uv pip install -e .
39
+
40
+ # Using pip
41
+ pip install -e .
42
+ ```
43
+
44
+ ## Usage
45
+
46
+ Once installed, you can use the CLI as follows:
47
+
48
+ ### Get Help
49
+
50
+ ```bash
51
+ cqc-quam-state --help
52
+ ```
53
+
54
+ This will display all available commands and options.
55
+
56
+ ### Set Command
57
+
58
+ Use this command to set configuration values:
59
+
60
+ ```bash
61
+ cqc-quam-state set
62
+ ```
63
+
64
+ ### Info Command
65
+
66
+ Use this command to display information about the current state:
67
+
68
+ ```bash
69
+ cqc-quam-state info
70
+ ```
71
+
72
+ ### Load Command
73
+
74
+ Use this command to load data or configuration:
75
+
76
+ ```bash
77
+ cqc-quam-state load
78
+ ```
@@ -0,0 +1,11 @@
1
+ cqc_quam_state/__init__.py,sha256=0MjJ6b67H2tQAZMJ17GBsIRNEZHnXmwENIjY3nTNa4c,271
2
+ cqc_quam_state/cli.py,sha256=maXhyYtURun-cPHgnG6GzyVEAIbcD6Nu0a7NpcTe9i8,768
3
+ cqc_quam_state/utils.py,sha256=jA8Mln8O7teERC07waVicuzNM5oxlwTZ6bNZBsKD8s0,1056
4
+ cqc_quam_state-2025.6.4.data/scripts/load-cqc-quam,sha256=FawIyEdTIuHaUl9Uuqhp4tApqtRiBFBld3NgVcduHR4,55
5
+ quam_state/state.json,sha256=MS9i1cghwp0xYeizOCYDlGPJRJl0HenNWvmy9QNmVKc,72372
6
+ quam_state/wiring.json,sha256=LRp1_iM39VgXv5fp72L6BUJwwSQbnOaxEkvXNsBWLzM,4691
7
+ cqc_quam_state-2025.6.4.dist-info/METADATA,sha256=lzDx8PDa_-nKZ-jl9QiKfBCqfIAfgdmB5vy56lol6Ig,1644
8
+ cqc_quam_state-2025.6.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
9
+ cqc_quam_state-2025.6.4.dist-info/entry_points.txt,sha256=yDPN6kPOJ_FVj0GG1MrOZrkhHwS0dB0Nibg9_gxEaeI,58
10
+ cqc_quam_state-2025.6.4.dist-info/top_level.txt,sha256=3vvwgdiiqaeIb21EtYfkY064frn0mOkC0X9bRjzg7UU,26
11
+ cqc_quam_state-2025.6.4.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ cqc-quam-state = cqc_quam_state.cli:cli
@@ -0,0 +1,2 @@
1
+ cqc_quam_state
2
+ quam_state