forked from username/gitea-ci
refactor: restructure into src/gitea_ci package
Split monolithic gitea-ci.py (3068 lines) into modular package: - src/gitea_ci/config.py: configuration, constants - src/gitea_ci/api.py: GiteaAPI class - src/gitea_ci/formatters.py: output formatting - src/gitea_ci/utils.py: utilities, validation - src/gitea_ci/commands/: command implementations - src/gitea_ci/cli.py: argument parser, dispatch gitea-ci.py now thin wrapper (16 lines)
This commit is contained in:
@@ -151,3 +151,25 @@ NO_COLOR Disable colors when set
|
||||
"default_repo": "myproject"
|
||||
}
|
||||
```
|
||||
|
||||
## Package Structure
|
||||
|
||||
```
|
||||
gitea-ci.py Wrapper script (entry point)
|
||||
style.py Styling utilities
|
||||
src/gitea_ci/
|
||||
├── cli.py Argument parser, dispatch
|
||||
├── config.py Configuration
|
||||
├── api.py Gitea API client
|
||||
├── formatters.py Output formatting
|
||||
├── utils.py Utilities
|
||||
└── commands/ Command implementations
|
||||
```
|
||||
|
||||
## Validation
|
||||
|
||||
```sh
|
||||
python3 -m py_compile src/gitea_ci/*.py # Syntax check
|
||||
./gitea-ci.py --help # Test CLI
|
||||
python3 -m gitea_ci --help # Module mode (PYTHONPATH=src)
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user