lr-qrm 0.1.0__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.
lr_qrm-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 LumenRadio AB
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
lr_qrm-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,93 @@
1
+ Metadata-Version: 2.4
2
+ Name: lr-qrm
3
+ Version: 0.1.0
4
+ Summary: CLI client for interacting with Qestit QRM data from LumenRadio tooling.
5
+ Author-email: Jonas Estberger <jonas.estberger@lumenradio.com>
6
+ License: MIT License
7
+ Requires-Python: >=3.9
8
+ Description-Content-Type: text/markdown
9
+ License-File: LICENSE
10
+ Requires-Dist: requests>=2.32
11
+ Requires-Dist: typer>=0.12
12
+ Requires-Dist: rich>=13.7
13
+ Requires-Dist: pydantic>=2.8
14
+ Provides-Extra: dev
15
+ Requires-Dist: build>=1.2.1; extra == "dev"
16
+ Requires-Dist: twine>=5.1.1; extra == "dev"
17
+ Requires-Dist: wheel; extra == "dev"
18
+ Requires-Dist: pytest>=8.4.2; extra == "dev"
19
+ Requires-Dist: black>=25.9.0; extra == "dev"
20
+ Requires-Dist: pytest-html; extra == "dev"
21
+ Requires-Dist: pytest-cov; extra == "dev"
22
+ Dynamic: license-file
23
+
24
+ # QRM
25
+
26
+ CLI + Python client for interacting with the Qestit QRM.
27
+
28
+ ## Install
29
+
30
+ ```bash
31
+ pip install lr-qrm
32
+ ```
33
+
34
+ ## Quick start
35
+
36
+ ### Login
37
+
38
+ Interactive login (prompts for username/password):
39
+
40
+ ```bash
41
+ qrm login
42
+ ```
43
+
44
+ Non-interactive (for CI/CD):
45
+
46
+ ```bash
47
+ export QRM_USERNAME="<insert username>"
48
+ export QRM_PASSWORD="<insert password>"
49
+ qrm login --ci
50
+ ```
51
+
52
+ By default, this stores session details at:
53
+
54
+ ```
55
+ ~/.config/qrm/login.json
56
+ ```
57
+
58
+ ### Commands
59
+
60
+
61
+ Get test results for a serial number.
62
+
63
+ ```bash
64
+ qrm get-test-results P00Y00000001
65
+ ```
66
+
67
+
68
+ #### JSON output
69
+
70
+ Most commands support a JSON output mode.
71
+
72
+
73
+ ```bash
74
+ $ qrm get-test-results P00Y00000001 --format json
75
+ ```
76
+
77
+ ## Programmatic use
78
+
79
+ ```python
80
+ from qrm import QrmClient, load_config
81
+
82
+ client = QrmClient(load_config())
83
+ results = client.get_test_results("P00Y00000001")
84
+ ```
85
+
86
+
87
+ ## FAQ
88
+
89
+ - **Where is the config kept?**
90
+ `~/.config/qrm/login.json` (override with `QRM_CONFIG`)
91
+
92
+ - **How do I run non-interactively?**
93
+ Make sure to give all required arguments. Also pass `--ci` to stop output of sensitive information such as username or passwords.
lr_qrm-0.1.0/README.md ADDED
@@ -0,0 +1,42 @@
1
+ # lr-qrm
2
+
3
+ CLI tooling for LumenRadio engineers to interrogate and validate data stored in the Qestit QRM platform. The application is implemented with Typer, Rich, Pydantic, and Requests, and is packaged as a standard Python project targeting Python 3.9+.
4
+
5
+ ## Features
6
+ - Consistent CLI entry point exposed as `qrm`.
7
+ - Ready-to-extend Rich console output pipeline.
8
+ - Secure login workflow that writes bearer tokens to `~/.config/qrm/login.json`.
9
+ - Comprehensive pytest test suite with coverage and HTML/JUnit reports suitable for CI.
10
+
11
+ ## Quickstart
12
+ 1. Ensure Python 3.9+ is available.
13
+ 2. Create the virtual environment and install dependencies:
14
+ ```sh
15
+ make dev
16
+ ```
17
+ 3. Authenticate (stores token in `~/.config/qrm/login.json`):
18
+ ```sh
19
+ .venv/bin/qrm login --username <user>
20
+ ```
21
+ 4. Inspect help/placeholder commands:
22
+ ```sh
23
+ .venv/bin/qrm --help
24
+ .venv/bin/qrm status
25
+ ```
26
+
27
+ ## Development Workflow
28
+ - Format code: `make black` (CI passes `BLACK_ARGS=--check`).
29
+ - Run tests with coverage: `make test`.
30
+ - Build distribution artifacts: `make dist`.
31
+ - Validate with Twine: `make check`.
32
+ - Publish to PyPI (requires `PYPI_TOKEN`): `make publish`.
33
+
34
+ ## Testing & Reports
35
+ `make test` configures pytest to emit:
36
+ - Cobertura XML: `build/reports/coverage.xml`.
37
+ - HTML coverage dashboard: `build/reports/html/index.html`.
38
+ - JUnit XML: `build/reports/junit.xml`.
39
+
40
+ ## License
41
+ Released under the MIT License. See LICENSE.
42
+
@@ -0,0 +1,60 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "lr-qrm"
7
+ version = "0.1.0"
8
+ description = "CLI client for interacting with Qestit QRM data from LumenRadio tooling."
9
+ readme = "src/README.md"
10
+ requires-python = ">=3.9"
11
+ license = { text = "MIT License" }
12
+ authors = [
13
+ { name = "Jonas Estberger", email = "jonas.estberger@lumenradio.com" }
14
+ ]
15
+ dependencies = [
16
+ "requests>=2.32",
17
+ "typer>=0.12",
18
+ "rich>=13.7",
19
+ "pydantic>=2.8",
20
+ ]
21
+
22
+ [project.optional-dependencies]
23
+ dev = [
24
+ "build>=1.2.1",
25
+ "twine>=5.1.1",
26
+ "wheel",
27
+ "pytest>=8.4.2",
28
+ "black>=25.9.0",
29
+ "pytest-html",
30
+ "pytest-cov",
31
+ ]
32
+
33
+ [project.scripts]
34
+ qrm = "qrm.cli:app"
35
+
36
+ [tool.setuptools]
37
+ package-dir = {"" = "src"}
38
+ include-package-data = true
39
+
40
+ [tool.setuptools.packages.find]
41
+ where = ["src"]
42
+
43
+ [tool.pytest.ini_options]
44
+ addopts = "-ra"
45
+ testpaths = ["tests"]
46
+ filterwarnings = ["error"]
47
+
48
+ [tool.coverage.run]
49
+ branch = true
50
+ source = ["src"]
51
+ omit = []
52
+
53
+ [tool.coverage.report]
54
+ fail_under = 90
55
+ show_missing = true
56
+ skip_covered = true
57
+
58
+ [tool.black]
59
+ target-version = ["py39"]
60
+ line-length = 100
lr_qrm-0.1.0/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,70 @@
1
+ # QRM
2
+
3
+ CLI + Python client for interacting with the Qestit QRM.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ pip install lr-qrm
9
+ ```
10
+
11
+ ## Quick start
12
+
13
+ ### Login
14
+
15
+ Interactive login (prompts for username/password):
16
+
17
+ ```bash
18
+ qrm login
19
+ ```
20
+
21
+ Non-interactive (for CI/CD):
22
+
23
+ ```bash
24
+ export QRM_USERNAME="<insert username>"
25
+ export QRM_PASSWORD="<insert password>"
26
+ qrm login --ci
27
+ ```
28
+
29
+ By default, this stores session details at:
30
+
31
+ ```
32
+ ~/.config/qrm/login.json
33
+ ```
34
+
35
+ ### Commands
36
+
37
+
38
+ Get test results for a serial number.
39
+
40
+ ```bash
41
+ qrm get-test-results P00Y00000001
42
+ ```
43
+
44
+
45
+ #### JSON output
46
+
47
+ Most commands support a JSON output mode.
48
+
49
+
50
+ ```bash
51
+ $ qrm get-test-results P00Y00000001 --format json
52
+ ```
53
+
54
+ ## Programmatic use
55
+
56
+ ```python
57
+ from qrm import QrmClient, load_config
58
+
59
+ client = QrmClient(load_config())
60
+ results = client.get_test_results("P00Y00000001")
61
+ ```
62
+
63
+
64
+ ## FAQ
65
+
66
+ - **Where is the config kept?**
67
+ `~/.config/qrm/login.json` (override with `QRM_CONFIG`)
68
+
69
+ - **How do I run non-interactively?**
70
+ Make sure to give all required arguments. Also pass `--ci` to stop output of sensitive information such as username or passwords.
@@ -0,0 +1,93 @@
1
+ Metadata-Version: 2.4
2
+ Name: lr-qrm
3
+ Version: 0.1.0
4
+ Summary: CLI client for interacting with Qestit QRM data from LumenRadio tooling.
5
+ Author-email: Jonas Estberger <jonas.estberger@lumenradio.com>
6
+ License: MIT License
7
+ Requires-Python: >=3.9
8
+ Description-Content-Type: text/markdown
9
+ License-File: LICENSE
10
+ Requires-Dist: requests>=2.32
11
+ Requires-Dist: typer>=0.12
12
+ Requires-Dist: rich>=13.7
13
+ Requires-Dist: pydantic>=2.8
14
+ Provides-Extra: dev
15
+ Requires-Dist: build>=1.2.1; extra == "dev"
16
+ Requires-Dist: twine>=5.1.1; extra == "dev"
17
+ Requires-Dist: wheel; extra == "dev"
18
+ Requires-Dist: pytest>=8.4.2; extra == "dev"
19
+ Requires-Dist: black>=25.9.0; extra == "dev"
20
+ Requires-Dist: pytest-html; extra == "dev"
21
+ Requires-Dist: pytest-cov; extra == "dev"
22
+ Dynamic: license-file
23
+
24
+ # QRM
25
+
26
+ CLI + Python client for interacting with the Qestit QRM.
27
+
28
+ ## Install
29
+
30
+ ```bash
31
+ pip install lr-qrm
32
+ ```
33
+
34
+ ## Quick start
35
+
36
+ ### Login
37
+
38
+ Interactive login (prompts for username/password):
39
+
40
+ ```bash
41
+ qrm login
42
+ ```
43
+
44
+ Non-interactive (for CI/CD):
45
+
46
+ ```bash
47
+ export QRM_USERNAME="<insert username>"
48
+ export QRM_PASSWORD="<insert password>"
49
+ qrm login --ci
50
+ ```
51
+
52
+ By default, this stores session details at:
53
+
54
+ ```
55
+ ~/.config/qrm/login.json
56
+ ```
57
+
58
+ ### Commands
59
+
60
+
61
+ Get test results for a serial number.
62
+
63
+ ```bash
64
+ qrm get-test-results P00Y00000001
65
+ ```
66
+
67
+
68
+ #### JSON output
69
+
70
+ Most commands support a JSON output mode.
71
+
72
+
73
+ ```bash
74
+ $ qrm get-test-results P00Y00000001 --format json
75
+ ```
76
+
77
+ ## Programmatic use
78
+
79
+ ```python
80
+ from qrm import QrmClient, load_config
81
+
82
+ client = QrmClient(load_config())
83
+ results = client.get_test_results("P00Y00000001")
84
+ ```
85
+
86
+
87
+ ## FAQ
88
+
89
+ - **Where is the config kept?**
90
+ `~/.config/qrm/login.json` (override with `QRM_CONFIG`)
91
+
92
+ - **How do I run non-interactively?**
93
+ Make sure to give all required arguments. Also pass `--ci` to stop output of sensitive information such as username or passwords.
@@ -0,0 +1,16 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ src/README.md
5
+ src/lr_qrm.egg-info/PKG-INFO
6
+ src/lr_qrm.egg-info/SOURCES.txt
7
+ src/lr_qrm.egg-info/dependency_links.txt
8
+ src/lr_qrm.egg-info/entry_points.txt
9
+ src/lr_qrm.egg-info/requires.txt
10
+ src/lr_qrm.egg-info/top_level.txt
11
+ src/qrm/__init__.py
12
+ src/qrm/cli.py
13
+ src/qrm/client.py
14
+ src/qrm/config.py
15
+ tests/test_cli.py
16
+ tests/test_client.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ qrm = qrm.cli:app
@@ -0,0 +1,13 @@
1
+ requests>=2.32
2
+ typer>=0.12
3
+ rich>=13.7
4
+ pydantic>=2.8
5
+
6
+ [dev]
7
+ build>=1.2.1
8
+ twine>=5.1.1
9
+ wheel
10
+ pytest>=8.4.2
11
+ black>=25.9.0
12
+ pytest-html
13
+ pytest-cov
@@ -0,0 +1 @@
1
+ qrm
@@ -0,0 +1,38 @@
1
+ """Top-level package for the lr-qrm CLI."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from importlib.metadata import PackageNotFoundError, version as package_version
6
+ from pathlib import Path
7
+
8
+ from .client import LoginState, QrmClient, QrmClientError
9
+
10
+
11
+ def _load_version() -> str:
12
+ try:
13
+ return package_version("lr-qrm")
14
+ except PackageNotFoundError:
15
+ return _version_from_pyproject()
16
+
17
+
18
+ def _version_from_pyproject() -> str:
19
+ pyproject = Path(__file__).resolve().parents[2] / "pyproject.toml"
20
+ if not pyproject.exists(): # pragma: no cover - defensive guard
21
+ raise RuntimeError("pyproject.toml not found; unable to determine version")
22
+
23
+ for raw_line in pyproject.read_text(encoding="utf-8").splitlines():
24
+ line = raw_line.strip()
25
+ if line.startswith("version ="):
26
+ return line.split("=", 1)[1].strip().strip('"').strip("'")
27
+
28
+ raise RuntimeError("Version not declared in pyproject.toml")
29
+
30
+
31
+ __version__ = _load_version()
32
+
33
+ __all__ = [
34
+ "__version__",
35
+ "LoginState",
36
+ "QrmClient",
37
+ "QrmClientError",
38
+ ]