How rsb-23/yuhi works
Yuhi is a Python CLI for enhancing a project with configuration and repository files, plus scanning requirements for problematic PyPI packages. The main workflow is CLI command dispatch into add/create facets, which inspect or write project files using shared helpers; separate commands can create samples or run the package scan. The graph also preserves code-quality, repository, and project facets, and the PyPI lookup path. Some facet implementations and service details are not excerpted, so their internal links are omitted where the supplied evidence does not show them.
Main entry points: repository.py Repository files · file_handler.py Project file I/O · cli.py CLI entry · commands.py Command groups
Components 22
CLI
- CLI entry
src/cli.py - Command groups
src/commands.py - Help formatting
src/glossary.py - Version metadata
src/__about__.py
Project facets
- Facet registry
src/facets/__init__.py - Code quality
src/facets/code_quality.py - Pylint setup
src/facets/pylint_handler.py - Package installation
src/facets/pkg_install.py - Repository files
src/facets/repository.py - Project setup
src/facets/project.py
Package scanning
- Dependency scanner
src/facets/scanner.py - Package HTTP client
src/services/package.py
Shared services
- Project file I/O
src/helper/file_handler.py - Colored paths
src/helper/color_path.py - File constants
src/helper/constants.py - Shared utilities
src/helper/utils.py - GitHub licenses
src/services/github.py - Local Git info
src/services/local_info.py
Other components
- CLI user
- PyPI
- GitHub API
- Project filesystem
Connections 23
- CLI user → CLI entry: invokes
src/cli.py - CLI entry → Command groups: registers
src/cli.py - CLI entry → Help formatting: formats help
src/cli.py - CLI entry → Version metadata: reads version
src/cli.py - Command groups → Facet registry: registers facets
src/commands.py - Command groups → Dependency scanner: runs scan
src/commands.py - Command groups → Project file I/O: creates samples
src/commands.py - Facet registry → Code quality: exports
src/facets/__init__.py - Facet registry → Repository files: exports
src/facets/__init__.py - Facet registry → Project setup: exports
src/facets/__init__.py - Code quality → Project file I/O: reads and writes
src/facets/code_quality.py - Code quality → Pylint setup: generates config
src/facets/code_quality.py - Pylint setup → Package installation: runs in venv
src/facets/pylint_handler.py - Repository files → Project file I/O: creates files
src/facets/repository.py - Repository files → File constants: uses file paths
src/facets/repository.py - Repository files → GitHub licenses: fetches licenses
src/facets/repository.py - Repository files → Local Git info: gets Git user
src/facets/repository.py - GitHub licenses → GitHub API: requests licenses
src/services/github.py - Dependency scanner → Package HTTP client: fetches package data
src/facets/scanner.py - Package HTTP client → PyPI: requests metadata
- Project file I/O → Colored paths: uses paths
src/helper/file_handler.py - Project file I/O → Project filesystem: reads and writes
src/helper/file_handler.py - Code quality → File constants: uses templates
src/facets/code_quality.py