rostree 0.2.0__tar.gz → 0.2.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.
- {rostree-0.2.0 → rostree-0.2.1}/PKG-INFO +1 -1
- {rostree-0.2.0 → rostree-0.2.1}/pyproject.toml +1 -1
- {rostree-0.2.0 → rostree-0.2.1}/src/rostree/__init__.py +8 -1
- {rostree-0.2.0 → rostree-0.2.1}/src/rostree/cli.py +3 -1
- {rostree-0.2.0 → rostree-0.2.1}/src/rostree/tui/app.py +6 -6
- {rostree-0.2.0 → rostree-0.2.1}/.gitignore +0 -0
- {rostree-0.2.0 → rostree-0.2.1}/LICENSE +0 -0
- {rostree-0.2.0 → rostree-0.2.1}/README.md +0 -0
- {rostree-0.2.0 → rostree-0.2.1}/src/rostree/api.py +0 -0
- {rostree-0.2.0 → rostree-0.2.1}/src/rostree/core/__init__.py +0 -0
- {rostree-0.2.0 → rostree-0.2.1}/src/rostree/core/finder.py +0 -0
- {rostree-0.2.0 → rostree-0.2.1}/src/rostree/core/parser.py +0 -0
- {rostree-0.2.0 → rostree-0.2.1}/src/rostree/core/tree.py +0 -0
- {rostree-0.2.0 → rostree-0.2.1}/src/rostree/tui/__init__.py +0 -0
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"""rostree: visualize ROS 2 package dependencies as a tree (library, TUI, CLI)."""
|
|
2
2
|
|
|
3
|
+
from importlib.metadata import version, PackageNotFoundError
|
|
4
|
+
|
|
3
5
|
from rostree.api import (
|
|
4
6
|
build_tree,
|
|
5
7
|
get_package_info,
|
|
@@ -16,5 +18,10 @@ __all__ = [
|
|
|
16
18
|
"list_known_packages_by_source",
|
|
17
19
|
"scan_workspaces",
|
|
18
20
|
"WorkspaceInfo",
|
|
21
|
+
"__version__",
|
|
19
22
|
]
|
|
20
|
-
|
|
23
|
+
|
|
24
|
+
try:
|
|
25
|
+
__version__ = version("rostree")
|
|
26
|
+
except PackageNotFoundError:
|
|
27
|
+
__version__ = "0.0.0+unknown" # Not installed as package
|
|
@@ -592,7 +592,9 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
592
592
|
prog="rostree",
|
|
593
593
|
description="Explore ROS 2 package dependencies from the command line.",
|
|
594
594
|
)
|
|
595
|
-
|
|
595
|
+
from rostree import __version__
|
|
596
|
+
|
|
597
|
+
parser.add_argument("--version", action="version", version=f"%(prog)s {__version__}")
|
|
596
598
|
|
|
597
599
|
subparsers = parser.add_subparsers(dest="command", help="Available commands")
|
|
598
600
|
|
|
@@ -18,12 +18,12 @@ from rostree.api import build_tree, list_known_packages_by_source
|
|
|
18
18
|
# Welcome banner: ROSTREE (all lines must be same length for proper centering)
|
|
19
19
|
WELCOME_BANNER = """\
|
|
20
20
|
[bold cyan]
|
|
21
|
-
██████╗
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
██║ ██║
|
|
26
|
-
╚═╝ ╚═╝
|
|
21
|
+
██████╗ ██████╗ ███████╗████████╗██████╗ ███████╗███████╗
|
|
22
|
+
██╔══██╗██╔═══██╗██╔════╝╚══██╔══╝██╔══██╗██╔════╝██╔════╝
|
|
23
|
+
██████╔╝██║ ██║███████╗ ██║ ██████╔╝█████╗ █████╗
|
|
24
|
+
██╔══██╗██║ ██║╚════██║ ██║ ██╔══██╗██╔══╝ ██╔══╝
|
|
25
|
+
██║ ██║╚██████╔╝███████║ ██║ ██║ ██║███████╗███████╗
|
|
26
|
+
╚═╝ ╚═╝ ╚═════╝ ╚══════╝ ╚═╝ ╚═╝ ╚═╝╚══════╝╚══════╝
|
|
27
27
|
[/bold cyan]"""
|
|
28
28
|
|
|
29
29
|
WELCOME_DESC = """[dim]Navigate and visualize ROS 2 package dependency trees.
|
|
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
|