cli¶
- class shai_py.cli.Cli[source]¶
CLI tools for Sanhe-styled Python project development workflows.
Provides utilities for project introspection, test file location, and other automation tasks following Sanhe’s Python conventions.
- project_info()[source]¶
Display Python project metadata (values and paths) from pyproject.toml.
Usage:
shai-py project-info
- test_path(source_file: str)[source]¶
Get the test file path for a Python source file.
Maps source to test by stripping package name and joining path parts:
my_pkg/a/b/c.py->tests/a/b/test_a_b_c.pyUsage:
shai-py test-path --source-file /path/to/my_pkg/a/b/c.py
- Parameters:
source_file – Absolute path to the Python source file.