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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rostree
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Explore ROS 2 package dependencies from the command line (CLI, TUI, library)
5
5
  Author: rostree contributors
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "rostree"
3
- version = "0.2.0"
3
+ version = "0.2.1"
4
4
  description = "Explore ROS 2 package dependencies from the command line (CLI, TUI, library)"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -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
- __version__ = "0.1.0"
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
- parser.add_argument("--version", action="version", version="%(prog)s 0.1.0")
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