pforge-cli 0.1.0__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.
- pforge_cli-0.1.0/PKG-INFO +142 -0
- pforge_cli-0.1.0/README.md +127 -0
- pforge_cli-0.1.0/pyproject.toml +66 -0
- pforge_cli-0.1.0/pyproject.toml.orig +55 -0
- pforge_cli-0.1.0/src/project_forge/__init__.py +6 -0
- pforge_cli-0.1.0/src/project_forge/bumper.py +514 -0
- pforge_cli-0.1.0/src/project_forge/changelog.py +184 -0
- pforge_cli-0.1.0/src/project_forge/cli.py +386 -0
- pforge_cli-0.1.0/src/project_forge/commits.py +594 -0
- pforge_cli-0.1.0/src/project_forge/config.py +101 -0
- pforge_cli-0.1.0/src/project_forge/doctor.py +132 -0
- pforge_cli-0.1.0/src/project_forge/documentation.py +280 -0
- pforge_cli-0.1.0/src/project_forge/hooks.py +198 -0
- pforge_cli-0.1.0/src/project_forge/process.py +126 -0
- pforge_cli-0.1.0/src/project_forge/project.py +148 -0
- pforge_cli-0.1.0/src/project_forge/publishing.py +134 -0
- pforge_cli-0.1.0/src/project_forge/pull_requests.py +259 -0
- pforge_cli-0.1.0/src/project_forge/quality.py +477 -0
- pforge_cli-0.1.0/src/project_forge/releases.py +173 -0
- pforge_cli-0.1.0/src/project_forge/status.py +65 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pforge-cli
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Repository-neutral engineering workflow CLI for quality gates, commits, releases, and versioning.
|
|
5
|
+
Author: tks18
|
|
6
|
+
Author-email: tks18 <tksudharshan@gmail.com>
|
|
7
|
+
License-Expression: GPL-3.0-or-later
|
|
8
|
+
Requires-Dist: packaging>=24.0
|
|
9
|
+
Requires-Dist: pydantic>=2.7.0
|
|
10
|
+
Requires-Dist: rich>=13.0.0
|
|
11
|
+
Requires-Dist: tomlkit>=0.12.0
|
|
12
|
+
Requires-Dist: typer>=0.12.0
|
|
13
|
+
Requires-Python: >=3.13
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
|
|
16
|
+
# Project Forge (`pforge` / `pforge-cli`)
|
|
17
|
+
|
|
18
|
+
Repository-neutral engineering workflow CLI for quality gates, conventional commits, releases, and versioning.
|
|
19
|
+
|
|
20
|
+
## Overview
|
|
21
|
+
|
|
22
|
+
Project Forge standardizes common Python repository engineering workflows into a single standalone CLI without copying scripts from repository to repository:
|
|
23
|
+
|
|
24
|
+
- **Multi-engine Quality Gate**: Fast (<2s) and Full diagnostic checks across Ruff (lint & format), Mypy, Pyright, Pylint, and Pytest.
|
|
25
|
+
- **Native Standard-Version Replacement**: Pure Python SemVer bumper (`pforge bump`) calculating increments from Conventional Commits, updating project files, generating `CHANGELOG.md`, and tagging releases.
|
|
26
|
+
- **Conventional Commit Automation**: Grouped atomic commits with repository-neutral scope inference and interactive wizard (`pforge commit`).
|
|
27
|
+
- **Quality Hooks**: Project-neutral Git hooks (`pre-commit` and `pre-push`) calling `pforge quality`.
|
|
28
|
+
- **Changelog & GitHub Workflows**: Single-source changelog parsing, pull request creation with embedded quality tables, and GitHub release publication.
|
|
29
|
+
- **Publishing & Diagnostics**: Clean `uv build` and `uv publish` orchestration, and non-destructive `doctor` and `status` commands.
|
|
30
|
+
|
|
31
|
+
## Installation
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# Using uv (recommended)
|
|
35
|
+
uv add --dev pforge-cli
|
|
36
|
+
|
|
37
|
+
# Using pip
|
|
38
|
+
pip install pforge-cli
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## CLI Usage
|
|
42
|
+
|
|
43
|
+
### Diagnostics & Status
|
|
44
|
+
```bash
|
|
45
|
+
pforge status # High-level dashboard snapshot of repository state
|
|
46
|
+
pforge doctor # Diagnostic environment verification of tools and configs
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Quality Gate
|
|
50
|
+
```bash
|
|
51
|
+
pforge quality --fast # Fast Tier (<2s): Ruff check, Ruff format check, Mypy
|
|
52
|
+
pforge quality --fast --fix # Auto-apply safe Ruff lint & format fixes
|
|
53
|
+
pforge quality # Full Tier: Ruff, Mypy, Pyright, Pylint, Pytest
|
|
54
|
+
pforge quality --export all # Export structured audit reports to outputs/ (CSV & JSON)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Version Bumping & Changelog
|
|
58
|
+
```bash
|
|
59
|
+
pforge bump --dry-run # Preview next version and changelog entry
|
|
60
|
+
pforge bump # Automatically detect bump type and update files
|
|
61
|
+
pforge bump --release-as minor # Explicitly bump minor (or patch, major)
|
|
62
|
+
pforge bump --prerelease rc # Bump with prerelease identifier
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Automated Conventional Commits
|
|
66
|
+
```bash
|
|
67
|
+
pforge commit --preview # Preview grouped atomic conventional commits
|
|
68
|
+
pforge commit -i # Interactive commit wizard with diff inspection
|
|
69
|
+
pforge commit --run # Execute atomic commits immediately
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Git Quality Hooks
|
|
73
|
+
```bash
|
|
74
|
+
pforge hooks install # Install pre-commit and pre-push quality hooks
|
|
75
|
+
pforge hooks status # Check installation and core.hooksPath status
|
|
76
|
+
pforge hooks uninstall # Clean hooks and unset core.hooksPath
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Pull Requests & Releases
|
|
80
|
+
```bash
|
|
81
|
+
pforge pr preview # Preview PR title, notes, and Quality Gate table
|
|
82
|
+
pforge pr create # Create/update PR on GitHub via gh CLI
|
|
83
|
+
pforge release preview # Preview release notes for latest version
|
|
84
|
+
pforge release publish # Publish release to GitHub via gh CLI
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### PyPI Publishing
|
|
88
|
+
```bash
|
|
89
|
+
pforge publish --dry-run # Verify quality, clean dist/, build with uv build
|
|
90
|
+
pforge publish # Build packages and upload to PyPI using token
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Configuration (`pyproject.toml`)
|
|
94
|
+
|
|
95
|
+
Project Forge works with zero configuration for standard Python repositories. Custom settings can be optionally configured under `[tool.project-forge]`:
|
|
96
|
+
|
|
97
|
+
```toml
|
|
98
|
+
[tool.project-forge]
|
|
99
|
+
source = ["src"]
|
|
100
|
+
tests = ["tests"]
|
|
101
|
+
changelog = "CHANGELOG.md"
|
|
102
|
+
|
|
103
|
+
[tool.project-forge.git]
|
|
104
|
+
development_branch = "dev"
|
|
105
|
+
default_branch = "main"
|
|
106
|
+
|
|
107
|
+
[tool.project-forge.quality]
|
|
108
|
+
fast = ["ruff-check", "ruff-format", "mypy"]
|
|
109
|
+
full = ["ruff-check", "ruff-format", "mypy", "pyright", "pytest"]
|
|
110
|
+
|
|
111
|
+
[tool.project-forge.commits]
|
|
112
|
+
header_max_length = 72
|
|
113
|
+
|
|
114
|
+
[tool.project-forge.bump]
|
|
115
|
+
tag_prefix = "v"
|
|
116
|
+
files = ["pyproject.toml", "src/**/__init__.py"]
|
|
117
|
+
|
|
118
|
+
[tool.project-forge.docs]
|
|
119
|
+
require_module_docstrings = true
|
|
120
|
+
require_package_ownership = false
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Development & Testing
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
# Sync environment
|
|
127
|
+
uv sync
|
|
128
|
+
|
|
129
|
+
# Run test suite
|
|
130
|
+
uv run pytest tests/ -v
|
|
131
|
+
|
|
132
|
+
# Run linters and typecheckers
|
|
133
|
+
uv run ruff check .
|
|
134
|
+
uv run ruff format --check src/ tests/
|
|
135
|
+
uv run mypy src
|
|
136
|
+
uv run pyright
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## License
|
|
140
|
+
|
|
141
|
+
GPL-3.0-or-later
|
|
142
|
+
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# Project Forge (`pforge` / `pforge-cli`)
|
|
2
|
+
|
|
3
|
+
Repository-neutral engineering workflow CLI for quality gates, conventional commits, releases, and versioning.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
Project Forge standardizes common Python repository engineering workflows into a single standalone CLI without copying scripts from repository to repository:
|
|
8
|
+
|
|
9
|
+
- **Multi-engine Quality Gate**: Fast (<2s) and Full diagnostic checks across Ruff (lint & format), Mypy, Pyright, Pylint, and Pytest.
|
|
10
|
+
- **Native Standard-Version Replacement**: Pure Python SemVer bumper (`pforge bump`) calculating increments from Conventional Commits, updating project files, generating `CHANGELOG.md`, and tagging releases.
|
|
11
|
+
- **Conventional Commit Automation**: Grouped atomic commits with repository-neutral scope inference and interactive wizard (`pforge commit`).
|
|
12
|
+
- **Quality Hooks**: Project-neutral Git hooks (`pre-commit` and `pre-push`) calling `pforge quality`.
|
|
13
|
+
- **Changelog & GitHub Workflows**: Single-source changelog parsing, pull request creation with embedded quality tables, and GitHub release publication.
|
|
14
|
+
- **Publishing & Diagnostics**: Clean `uv build` and `uv publish` orchestration, and non-destructive `doctor` and `status` commands.
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Using uv (recommended)
|
|
20
|
+
uv add --dev pforge-cli
|
|
21
|
+
|
|
22
|
+
# Using pip
|
|
23
|
+
pip install pforge-cli
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## CLI Usage
|
|
27
|
+
|
|
28
|
+
### Diagnostics & Status
|
|
29
|
+
```bash
|
|
30
|
+
pforge status # High-level dashboard snapshot of repository state
|
|
31
|
+
pforge doctor # Diagnostic environment verification of tools and configs
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Quality Gate
|
|
35
|
+
```bash
|
|
36
|
+
pforge quality --fast # Fast Tier (<2s): Ruff check, Ruff format check, Mypy
|
|
37
|
+
pforge quality --fast --fix # Auto-apply safe Ruff lint & format fixes
|
|
38
|
+
pforge quality # Full Tier: Ruff, Mypy, Pyright, Pylint, Pytest
|
|
39
|
+
pforge quality --export all # Export structured audit reports to outputs/ (CSV & JSON)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Version Bumping & Changelog
|
|
43
|
+
```bash
|
|
44
|
+
pforge bump --dry-run # Preview next version and changelog entry
|
|
45
|
+
pforge bump # Automatically detect bump type and update files
|
|
46
|
+
pforge bump --release-as minor # Explicitly bump minor (or patch, major)
|
|
47
|
+
pforge bump --prerelease rc # Bump with prerelease identifier
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Automated Conventional Commits
|
|
51
|
+
```bash
|
|
52
|
+
pforge commit --preview # Preview grouped atomic conventional commits
|
|
53
|
+
pforge commit -i # Interactive commit wizard with diff inspection
|
|
54
|
+
pforge commit --run # Execute atomic commits immediately
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Git Quality Hooks
|
|
58
|
+
```bash
|
|
59
|
+
pforge hooks install # Install pre-commit and pre-push quality hooks
|
|
60
|
+
pforge hooks status # Check installation and core.hooksPath status
|
|
61
|
+
pforge hooks uninstall # Clean hooks and unset core.hooksPath
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Pull Requests & Releases
|
|
65
|
+
```bash
|
|
66
|
+
pforge pr preview # Preview PR title, notes, and Quality Gate table
|
|
67
|
+
pforge pr create # Create/update PR on GitHub via gh CLI
|
|
68
|
+
pforge release preview # Preview release notes for latest version
|
|
69
|
+
pforge release publish # Publish release to GitHub via gh CLI
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### PyPI Publishing
|
|
73
|
+
```bash
|
|
74
|
+
pforge publish --dry-run # Verify quality, clean dist/, build with uv build
|
|
75
|
+
pforge publish # Build packages and upload to PyPI using token
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Configuration (`pyproject.toml`)
|
|
79
|
+
|
|
80
|
+
Project Forge works with zero configuration for standard Python repositories. Custom settings can be optionally configured under `[tool.project-forge]`:
|
|
81
|
+
|
|
82
|
+
```toml
|
|
83
|
+
[tool.project-forge]
|
|
84
|
+
source = ["src"]
|
|
85
|
+
tests = ["tests"]
|
|
86
|
+
changelog = "CHANGELOG.md"
|
|
87
|
+
|
|
88
|
+
[tool.project-forge.git]
|
|
89
|
+
development_branch = "dev"
|
|
90
|
+
default_branch = "main"
|
|
91
|
+
|
|
92
|
+
[tool.project-forge.quality]
|
|
93
|
+
fast = ["ruff-check", "ruff-format", "mypy"]
|
|
94
|
+
full = ["ruff-check", "ruff-format", "mypy", "pyright", "pytest"]
|
|
95
|
+
|
|
96
|
+
[tool.project-forge.commits]
|
|
97
|
+
header_max_length = 72
|
|
98
|
+
|
|
99
|
+
[tool.project-forge.bump]
|
|
100
|
+
tag_prefix = "v"
|
|
101
|
+
files = ["pyproject.toml", "src/**/__init__.py"]
|
|
102
|
+
|
|
103
|
+
[tool.project-forge.docs]
|
|
104
|
+
require_module_docstrings = true
|
|
105
|
+
require_package_ownership = false
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Development & Testing
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
# Sync environment
|
|
112
|
+
uv sync
|
|
113
|
+
|
|
114
|
+
# Run test suite
|
|
115
|
+
uv run pytest tests/ -v
|
|
116
|
+
|
|
117
|
+
# Run linters and typecheckers
|
|
118
|
+
uv run ruff check .
|
|
119
|
+
uv run ruff format --check src/ tests/
|
|
120
|
+
uv run mypy src
|
|
121
|
+
uv run pyright
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## License
|
|
125
|
+
|
|
126
|
+
GPL-3.0-or-later
|
|
127
|
+
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "pforge-cli"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Repository-neutral engineering workflow CLI for quality gates, commits, releases, and versioning."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
license = "GPL-3.0-or-later"
|
|
7
|
+
requires-python = ">=3.13"
|
|
8
|
+
dependencies = [
|
|
9
|
+
"packaging>=24.0",
|
|
10
|
+
"pydantic>=2.7.0",
|
|
11
|
+
"rich>=13.0.0",
|
|
12
|
+
"tomlkit>=0.12.0",
|
|
13
|
+
"typer>=0.12.0",
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
[[project.authors]]
|
|
17
|
+
name = "tks18"
|
|
18
|
+
email = "tksudharshan@gmail.com"
|
|
19
|
+
|
|
20
|
+
[project.scripts]
|
|
21
|
+
pforge = "project_forge.cli:app"
|
|
22
|
+
|
|
23
|
+
[build-system]
|
|
24
|
+
requires = ["uv_build>=0.11.28,<0.12.0"]
|
|
25
|
+
build-backend = "uv_build"
|
|
26
|
+
|
|
27
|
+
[tool.uv.build-backend]
|
|
28
|
+
module-name = "project_forge"
|
|
29
|
+
|
|
30
|
+
[tool.project-forge]
|
|
31
|
+
source = ["src"]
|
|
32
|
+
tests = ["tests"]
|
|
33
|
+
changelog = "CHANGELOG.md"
|
|
34
|
+
|
|
35
|
+
[tool.project-forge.git]
|
|
36
|
+
development_branch = "dev"
|
|
37
|
+
default_branch = "master"
|
|
38
|
+
|
|
39
|
+
[tool.project-forge.quality]
|
|
40
|
+
fast = [
|
|
41
|
+
"ruff-check",
|
|
42
|
+
"ruff-format",
|
|
43
|
+
"mypy",
|
|
44
|
+
]
|
|
45
|
+
full = [
|
|
46
|
+
"ruff-check",
|
|
47
|
+
"ruff-format",
|
|
48
|
+
"mypy",
|
|
49
|
+
"pyright",
|
|
50
|
+
"pytest",
|
|
51
|
+
]
|
|
52
|
+
|
|
53
|
+
[tool.project-forge.commits]
|
|
54
|
+
header_max_length = 72
|
|
55
|
+
|
|
56
|
+
[tool.project-forge.docs]
|
|
57
|
+
require_module_docstrings = true
|
|
58
|
+
require_package_ownership = false
|
|
59
|
+
|
|
60
|
+
[dependency-groups]
|
|
61
|
+
dev = [
|
|
62
|
+
"mypy>=1.10.0",
|
|
63
|
+
"pyright>=1.1.350",
|
|
64
|
+
"pytest>=8.0.0",
|
|
65
|
+
"ruff>=0.8.0",
|
|
66
|
+
]
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "pforge-cli"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Repository-neutral engineering workflow CLI for quality gates, commits, releases, and versioning."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
license = "GPL-3.0-or-later"
|
|
7
|
+
authors = [
|
|
8
|
+
{ name = "tks18", email = "tksudharshan@gmail.com" }
|
|
9
|
+
]
|
|
10
|
+
requires-python = ">=3.13"
|
|
11
|
+
dependencies = [
|
|
12
|
+
"packaging>=24.0",
|
|
13
|
+
"pydantic>=2.7.0",
|
|
14
|
+
"rich>=13.0.0",
|
|
15
|
+
"tomlkit>=0.12.0",
|
|
16
|
+
"typer>=0.12.0",
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
[project.scripts]
|
|
20
|
+
pforge = "project_forge.cli:app"
|
|
21
|
+
|
|
22
|
+
[build-system]
|
|
23
|
+
requires = ["uv_build>=0.11.28,<0.12.0"]
|
|
24
|
+
build-backend = "uv_build"
|
|
25
|
+
|
|
26
|
+
[tool.uv.build-backend]
|
|
27
|
+
module-name = "project_forge"
|
|
28
|
+
|
|
29
|
+
[dependency-groups]
|
|
30
|
+
dev = [
|
|
31
|
+
"mypy>=1.10.0",
|
|
32
|
+
"pyright>=1.1.350",
|
|
33
|
+
"pytest>=8.0.0",
|
|
34
|
+
"ruff>=0.8.0",
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
[tool.project-forge]
|
|
38
|
+
source = ["src"]
|
|
39
|
+
tests = ["tests"]
|
|
40
|
+
changelog = "CHANGELOG.md"
|
|
41
|
+
|
|
42
|
+
[tool.project-forge.git]
|
|
43
|
+
development_branch = "dev"
|
|
44
|
+
default_branch = "master"
|
|
45
|
+
|
|
46
|
+
[tool.project-forge.quality]
|
|
47
|
+
fast = ["ruff-check", "ruff-format", "mypy"]
|
|
48
|
+
full = ["ruff-check", "ruff-format", "mypy", "pyright", "pytest"]
|
|
49
|
+
|
|
50
|
+
[tool.project-forge.commits]
|
|
51
|
+
header_max_length = 72
|
|
52
|
+
|
|
53
|
+
[tool.project-forge.docs]
|
|
54
|
+
require_module_docstrings = true
|
|
55
|
+
require_package_ownership = false
|