ssot-cli 0.1.11.dev1__tar.gz → 0.1.11.dev2__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.
- {ssot_cli-0.1.11.dev1 → ssot_cli-0.1.11.dev2}/PKG-INFO +4 -4
- {ssot_cli-0.1.11.dev1 → ssot_cli-0.1.11.dev2}/pyproject.toml +4 -4
- {ssot_cli-0.1.11.dev1 → ssot_cli-0.1.11.dev2}/src/ssot_cli/common.py +1 -1
- {ssot_cli-0.1.11.dev1 → ssot_cli-0.1.11.dev2}/src/ssot_cli/main.py +45 -2
- {ssot_cli-0.1.11.dev1 → ssot_cli-0.1.11.dev2}/src/ssot_cli.egg-info/PKG-INFO +4 -4
- ssot_cli-0.1.11.dev2/src/ssot_cli.egg-info/requires.txt +6 -0
- ssot_cli-0.1.11.dev1/src/ssot_cli.egg-info/requires.txt +0 -6
- {ssot_cli-0.1.11.dev1 → ssot_cli-0.1.11.dev2}/README.md +0 -0
- {ssot_cli-0.1.11.dev1 → ssot_cli-0.1.11.dev2}/setup.cfg +0 -0
- {ssot_cli-0.1.11.dev1 → ssot_cli-0.1.11.dev2}/src/ssot_cli/__init__.py +0 -0
- {ssot_cli-0.1.11.dev1 → ssot_cli-0.1.11.dev2}/src/ssot_cli/adr_cmd.py +0 -0
- {ssot_cli-0.1.11.dev1 → ssot_cli-0.1.11.dev2}/src/ssot_cli/boundary_cmd.py +0 -0
- {ssot_cli-0.1.11.dev1 → ssot_cli-0.1.11.dev2}/src/ssot_cli/claim_cmd.py +0 -0
- {ssot_cli-0.1.11.dev1 → ssot_cli-0.1.11.dev2}/src/ssot_cli/conformance_cmd.py +0 -0
- {ssot_cli-0.1.11.dev1 → ssot_cli-0.1.11.dev2}/src/ssot_cli/evidence_cmd.py +0 -0
- {ssot_cli-0.1.11.dev1 → ssot_cli-0.1.11.dev2}/src/ssot_cli/feature_cmd.py +0 -0
- {ssot_cli-0.1.11.dev1 → ssot_cli-0.1.11.dev2}/src/ssot_cli/graph_cmd.py +0 -0
- {ssot_cli-0.1.11.dev1 → ssot_cli-0.1.11.dev2}/src/ssot_cli/init_cmd.py +0 -0
- {ssot_cli-0.1.11.dev1 → ssot_cli-0.1.11.dev2}/src/ssot_cli/issue_cmd.py +0 -0
- {ssot_cli-0.1.11.dev1 → ssot_cli-0.1.11.dev2}/src/ssot_cli/profile_cmd.py +0 -0
- {ssot_cli-0.1.11.dev1 → ssot_cli-0.1.11.dev2}/src/ssot_cli/registry_cmd.py +0 -0
- {ssot_cli-0.1.11.dev1 → ssot_cli-0.1.11.dev2}/src/ssot_cli/release_cmd.py +0 -0
- {ssot_cli-0.1.11.dev1 → ssot_cli-0.1.11.dev2}/src/ssot_cli/risk_cmd.py +0 -0
- {ssot_cli-0.1.11.dev1 → ssot_cli-0.1.11.dev2}/src/ssot_cli/spec_cmd.py +0 -0
- {ssot_cli-0.1.11.dev1 → ssot_cli-0.1.11.dev2}/src/ssot_cli/test_cmd.py +0 -0
- {ssot_cli-0.1.11.dev1 → ssot_cli-0.1.11.dev2}/src/ssot_cli/upgrade_cmd.py +0 -0
- {ssot_cli-0.1.11.dev1 → ssot_cli-0.1.11.dev2}/src/ssot_cli/validate_cmd.py +0 -0
- {ssot_cli-0.1.11.dev1 → ssot_cli-0.1.11.dev2}/src/ssot_cli.egg-info/SOURCES.txt +0 -0
- {ssot_cli-0.1.11.dev1 → ssot_cli-0.1.11.dev2}/src/ssot_cli.egg-info/dependency_links.txt +0 -0
- {ssot_cli-0.1.11.dev1 → ssot_cli-0.1.11.dev2}/src/ssot_cli.egg-info/entry_points.txt +0 -0
- {ssot_cli-0.1.11.dev1 → ssot_cli-0.1.11.dev2}/src/ssot_cli.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ssot-cli
|
|
3
|
-
Version: 0.1.11.
|
|
3
|
+
Version: 0.1.11.dev2
|
|
4
4
|
Summary: Primary CLI distribution for ssot-registry.
|
|
5
5
|
Author-email: Jacob Stewart <jacob@swarmauri.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -24,9 +24,9 @@ Classifier: Topic :: Software Development :: Quality Assurance
|
|
|
24
24
|
Classifier: Topic :: Utilities
|
|
25
25
|
Requires-Python: <3.14,>=3.10
|
|
26
26
|
Description-Content-Type: text/markdown
|
|
27
|
-
Requires-Dist: ssot-contracts<0.3.0,>=0.2.17.
|
|
28
|
-
Requires-Dist: ssot-core<0.3.0,>=0.2.17.
|
|
29
|
-
Requires-Dist: ssot-conformance<0.3.0,>=0.2.17.
|
|
27
|
+
Requires-Dist: ssot-contracts<0.3.0,>=0.2.17.dev2
|
|
28
|
+
Requires-Dist: ssot-core<0.3.0,>=0.2.17.dev2
|
|
29
|
+
Requires-Dist: ssot-conformance<0.3.0,>=0.2.17.dev2
|
|
30
30
|
Requires-Dist: tomli>=2.0.1; python_version < "3.11"
|
|
31
31
|
|
|
32
32
|
<div align="center">
|
|
@@ -4,16 +4,16 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "ssot-cli"
|
|
7
|
-
version = "0.1.11.
|
|
7
|
+
version = "0.1.11.dev2"
|
|
8
8
|
description = "Primary CLI distribution for ssot-registry."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10,<3.14"
|
|
11
11
|
license = "Apache-2.0"
|
|
12
12
|
authors = [{ name = "Jacob Stewart", email = "jacob@swarmauri.com" }]
|
|
13
13
|
dependencies = [
|
|
14
|
-
"ssot-contracts>=0.2.17.
|
|
15
|
-
"ssot-core>=0.2.17.
|
|
16
|
-
"ssot-conformance>=0.2.17.
|
|
14
|
+
"ssot-contracts>=0.2.17.dev2,<0.3.0",
|
|
15
|
+
"ssot-core>=0.2.17.dev2,<0.3.0",
|
|
16
|
+
"ssot-conformance>=0.2.17.dev2,<0.3.0",
|
|
17
17
|
"tomli>=2.0.1; python_version < '3.11'",
|
|
18
18
|
]
|
|
19
19
|
keywords = ["ssot", "cli", "registry", "governance", "release-management", "validation", "developer-tools"]
|
|
@@ -81,5 +81,5 @@ def load_text_argument(
|
|
|
81
81
|
if inline_value is not None and file_value is not None:
|
|
82
82
|
raise ValueError(f"{label} accepts only one of body or body_file")
|
|
83
83
|
if file_value is not None:
|
|
84
|
-
return Path(file_value).read_text(encoding="utf-8")
|
|
84
|
+
return Path(file_value).read_text(encoding="utf-8-sig")
|
|
85
85
|
return inline_value
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import argparse
|
|
4
|
+
import re
|
|
4
5
|
import sys
|
|
6
|
+
from importlib.metadata import PackageNotFoundError, version as package_version
|
|
5
7
|
from pathlib import Path
|
|
6
8
|
from typing import Any
|
|
7
9
|
|
|
@@ -27,16 +29,51 @@ from .test_cmd import register_test
|
|
|
27
29
|
from .upgrade_cmd import register_upgrade
|
|
28
30
|
from .validate_cmd import register_validate
|
|
29
31
|
|
|
32
|
+
_PACKAGE_NAME = "ssot-cli"
|
|
33
|
+
_PYPROJECT_PATH = Path(__file__).resolve().parents[2] / "pyproject.toml"
|
|
34
|
+
_VERSION_PATTERN = re.compile(r'^version\s*=\s*"(?P<version>[^"]+)"\s*$')
|
|
35
|
+
|
|
30
36
|
|
|
31
37
|
def _default_prog() -> str:
|
|
32
38
|
executable = Path(sys.argv[0]).name
|
|
33
|
-
|
|
34
|
-
|
|
39
|
+
for suffix in (".exe", ".py"):
|
|
40
|
+
if executable.endswith(suffix):
|
|
41
|
+
executable = executable[: -len(suffix)]
|
|
42
|
+
break
|
|
35
43
|
if executable in {"", "__main__", "-m"}:
|
|
36
44
|
return "ssot-registry"
|
|
37
45
|
return executable
|
|
38
46
|
|
|
39
47
|
|
|
48
|
+
def _read_version_from_pyproject(pyproject_path: Path = _PYPROJECT_PATH) -> str:
|
|
49
|
+
in_project_section = False
|
|
50
|
+
|
|
51
|
+
for line in pyproject_path.read_text(encoding="utf-8").splitlines():
|
|
52
|
+
stripped = line.strip()
|
|
53
|
+
|
|
54
|
+
if stripped.startswith("[") and stripped.endswith("]"):
|
|
55
|
+
in_project_section = stripped == "[project]"
|
|
56
|
+
continue
|
|
57
|
+
|
|
58
|
+
if not in_project_section:
|
|
59
|
+
continue
|
|
60
|
+
|
|
61
|
+
match = _VERSION_PATTERN.match(stripped)
|
|
62
|
+
if match is not None:
|
|
63
|
+
return match.group("version")
|
|
64
|
+
|
|
65
|
+
raise RuntimeError(f"Unable to locate [project].version in {pyproject_path}")
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def _cli_version() -> str:
|
|
69
|
+
if _PYPROJECT_PATH.exists():
|
|
70
|
+
return _read_version_from_pyproject()
|
|
71
|
+
try:
|
|
72
|
+
return package_version(_PACKAGE_NAME)
|
|
73
|
+
except PackageNotFoundError:
|
|
74
|
+
return _read_version_from_pyproject()
|
|
75
|
+
|
|
76
|
+
|
|
40
77
|
def build_parser(*, prog: str | None = None) -> argparse.ArgumentParser:
|
|
41
78
|
parser = argparse.ArgumentParser(
|
|
42
79
|
prog=prog or _default_prog(),
|
|
@@ -46,6 +83,12 @@ def build_parser(*, prog: str | None = None) -> argparse.ArgumentParser:
|
|
|
46
83
|
"implementation features, verification artifacts, and publication-ready releases."
|
|
47
84
|
),
|
|
48
85
|
)
|
|
86
|
+
parser.add_argument(
|
|
87
|
+
"--version",
|
|
88
|
+
action="version",
|
|
89
|
+
version=f"%(prog)s {_cli_version()}",
|
|
90
|
+
help="Print the installed CLI package version and exit.",
|
|
91
|
+
)
|
|
49
92
|
parser.add_argument(
|
|
50
93
|
"--output-format",
|
|
51
94
|
default="json",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ssot-cli
|
|
3
|
-
Version: 0.1.11.
|
|
3
|
+
Version: 0.1.11.dev2
|
|
4
4
|
Summary: Primary CLI distribution for ssot-registry.
|
|
5
5
|
Author-email: Jacob Stewart <jacob@swarmauri.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -24,9 +24,9 @@ Classifier: Topic :: Software Development :: Quality Assurance
|
|
|
24
24
|
Classifier: Topic :: Utilities
|
|
25
25
|
Requires-Python: <3.14,>=3.10
|
|
26
26
|
Description-Content-Type: text/markdown
|
|
27
|
-
Requires-Dist: ssot-contracts<0.3.0,>=0.2.17.
|
|
28
|
-
Requires-Dist: ssot-core<0.3.0,>=0.2.17.
|
|
29
|
-
Requires-Dist: ssot-conformance<0.3.0,>=0.2.17.
|
|
27
|
+
Requires-Dist: ssot-contracts<0.3.0,>=0.2.17.dev2
|
|
28
|
+
Requires-Dist: ssot-core<0.3.0,>=0.2.17.dev2
|
|
29
|
+
Requires-Dist: ssot-conformance<0.3.0,>=0.2.17.dev2
|
|
30
30
|
Requires-Dist: tomli>=2.0.1; python_version < "3.11"
|
|
31
31
|
|
|
32
32
|
<div align="center">
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|