agenium-manager 0.0.1__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,5 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ .venv/
4
+ dist/
5
+ .pytest_cache/
@@ -0,0 +1,28 @@
1
+ Metadata-Version: 2.5
2
+ Name: agenium-manager
3
+ Version: 0.0.1
4
+ Summary: The Agenium manager: installs Agenium apps into their own environments and runs them. Early stage.
5
+ Project-URL: Homepage, https://github.com/agenium-dev/agenium
6
+ Project-URL: Source, https://github.com/agenium-dev/agenium/tree/main/packages/agenium-manager
7
+ Author: agenium-dev
8
+ Classifier: Development Status :: 1 - Planning
9
+ Classifier: Environment :: Console
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3 :: Only
12
+ Requires-Python: >=3.11
13
+ Requires-Dist: agenium-sdk>=0.0.1
14
+ Description-Content-Type: text/markdown
15
+
16
+ # agenium-manager
17
+
18
+ The command-line manager for Agenium. It will install each Agenium app into its own isolated environment from recorded versions, update, lock and roll it back, and run it from that ready environment.
19
+
20
+ This package is at a very early stage. This release has no app management yet: the `agenium-manager` command prints its version, the SDK and contract version it understands, and its help.
21
+
22
+ ```sh
23
+ uv tool install agenium-manager
24
+ agenium-manager --version
25
+ agenium-manager --help
26
+ ```
27
+
28
+ Part of [Agenium](https://github.com/agenium-dev/agenium).
@@ -0,0 +1,13 @@
1
+ # agenium-manager
2
+
3
+ The command-line manager for Agenium. It will install each Agenium app into its own isolated environment from recorded versions, update, lock and roll it back, and run it from that ready environment.
4
+
5
+ This package is at a very early stage. This release has no app management yet: the `agenium-manager` command prints its version, the SDK and contract version it understands, and its help.
6
+
7
+ ```sh
8
+ uv tool install agenium-manager
9
+ agenium-manager --version
10
+ agenium-manager --help
11
+ ```
12
+
13
+ Part of [Agenium](https://github.com/agenium-dev/agenium).
@@ -0,0 +1,37 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "agenium-manager"
7
+ dynamic = ["version"]
8
+ description = "The Agenium manager: installs Agenium apps into their own environments and runs them. Early stage."
9
+ readme = "README.md"
10
+ requires-python = ">=3.11"
11
+ authors = [{ name = "agenium-dev" }]
12
+ classifiers = [
13
+ "Development Status :: 1 - Planning",
14
+ "Environment :: Console",
15
+ "Programming Language :: Python :: 3",
16
+ "Programming Language :: Python :: 3 :: Only",
17
+ ]
18
+ dependencies = ["agenium-sdk>=0.0.1"]
19
+
20
+ [project.scripts]
21
+ agenium-manager = "agenium_manager.cli:main"
22
+
23
+ [project.urls]
24
+ Homepage = "https://github.com/agenium-dev/agenium"
25
+ Source = "https://github.com/agenium-dev/agenium/tree/main/packages/agenium-manager"
26
+
27
+ [tool.uv.sources]
28
+ agenium-sdk = { workspace = true }
29
+
30
+ [tool.hatch.version]
31
+ path = "src/agenium_manager/__init__.py"
32
+
33
+ [tool.hatch.build.targets.wheel]
34
+ packages = ["src/agenium_manager"]
35
+
36
+ [dependency-groups]
37
+ dev = ["pytest>=8"]
@@ -0,0 +1,3 @@
1
+ """Agenium manager: installs Agenium apps into their own environments and runs them."""
2
+
3
+ __version__ = "0.0.1"
@@ -0,0 +1,3 @@
1
+ from agenium_manager.cli import main
2
+
3
+ raise SystemExit(main())
@@ -0,0 +1,33 @@
1
+ """The agenium-manager command line."""
2
+
3
+ import argparse
4
+
5
+ import agenium_sdk
6
+
7
+ from agenium_manager import __version__
8
+
9
+
10
+ def version_line() -> str:
11
+ return (
12
+ f"agenium-manager {__version__} "
13
+ f"(agenium-sdk {agenium_sdk.__version__}, contract {agenium_sdk.CONTRACT_VERSION})"
14
+ )
15
+
16
+
17
+ def build_parser() -> argparse.ArgumentParser:
18
+ parser = argparse.ArgumentParser(
19
+ prog="agenium-manager",
20
+ description=(
21
+ "The Agenium manager. Early stage: it does not manage apps yet, "
22
+ "and reports only its version and the contract it understands."
23
+ ),
24
+ )
25
+ parser.add_argument("--version", action="version", version=version_line())
26
+ return parser
27
+
28
+
29
+ def main(argv: list[str] | None = None) -> int:
30
+ parser = build_parser()
31
+ parser.parse_args(argv)
32
+ parser.print_help()
33
+ return 0
@@ -0,0 +1,32 @@
1
+ from importlib.metadata import version
2
+
3
+ import agenium_sdk
4
+ import pytest
5
+
6
+ import agenium_manager
7
+ from agenium_manager.cli import main
8
+
9
+
10
+ def test_version_matches_distribution():
11
+ assert agenium_manager.__version__ == version("agenium-manager")
12
+
13
+
14
+ def test_version_flag_names_manager_sdk_and_contract(capsys):
15
+ with pytest.raises(SystemExit) as exit_info:
16
+ main(["--version"])
17
+ assert exit_info.value.code == 0
18
+ assert capsys.readouterr().out.strip() == (
19
+ f"agenium-manager {agenium_manager.__version__} "
20
+ f"(agenium-sdk {agenium_sdk.__version__}, contract {agenium_sdk.CONTRACT_VERSION})"
21
+ )
22
+
23
+
24
+ def test_no_arguments_prints_help(capsys):
25
+ assert main([]) == 0
26
+ assert capsys.readouterr().out.startswith("usage: agenium-manager")
27
+
28
+
29
+ def test_unknown_argument_is_refused(capsys):
30
+ with pytest.raises(SystemExit) as exit_info:
31
+ main(["install"])
32
+ assert exit_info.value.code == 2