semver-dredd 1.0.20260704001__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.
- semver_dredd-1.0.20260704001/LICENSE +21 -0
- semver_dredd-1.0.20260704001/PKG-INFO +199 -0
- semver_dredd-1.0.20260704001/README.md +161 -0
- semver_dredd-1.0.20260704001/cli/__init__.py +947 -0
- semver_dredd-1.0.20260704001/cli/__main__.py +8 -0
- semver_dredd-1.0.20260704001/cli/commands/__init__.py +31 -0
- semver_dredd-1.0.20260704001/cli/commands/bake.py +90 -0
- semver_dredd-1.0.20260704001/cli/commands/bump.py +49 -0
- semver_dredd-1.0.20260704001/cli/commands/compare.py +125 -0
- semver_dredd-1.0.20260704001/cli/commands/init.py +96 -0
- semver_dredd-1.0.20260704001/cli/commands/patch.py +24 -0
- semver_dredd-1.0.20260704001/cli/commands/plugin.py +307 -0
- semver_dredd-1.0.20260704001/cli/commands/snapshot.py +59 -0
- semver_dredd-1.0.20260704001/cli/commands/status.py +177 -0
- semver_dredd-1.0.20260704001/cli/commands/template.py +150 -0
- semver_dredd-1.0.20260704001/cli/config.py +723 -0
- semver_dredd-1.0.20260704001/cli/utils.py +276 -0
- semver_dredd-1.0.20260704001/pyproject.toml +75 -0
- semver_dredd-1.0.20260704001/semverdredd/__init__.py +255 -0
- semver_dredd-1.0.20260704001/semverdredd/agent.md +47 -0
- semver_dredd-1.0.20260704001/semverdredd/bundle_plugin.py +322 -0
- semver_dredd-1.0.20260704001/semverdredd/diff.py +62 -0
- semver_dredd-1.0.20260704001/semverdredd/plugin_base.py +102 -0
- semver_dredd-1.0.20260704001/semverdredd/plugin_manager.py +347 -0
- semver_dredd-1.0.20260704001/semverdredd/registry.py +158 -0
- semver_dredd-1.0.20260704001/semverdredd/result.py +38 -0
- semver_dredd-1.0.20260704001/semverdredd/snapshot_io.py +29 -0
- semver_dredd-1.0.20260704001/semverdredd/version.py +251 -0
- semver_dredd-1.0.20260704001/snapshot/README.md +362 -0
- semver_dredd-1.0.20260704001/snapshot/__init__.py +53 -0
- semver_dredd-1.0.20260704001/snapshot/agent.md +35 -0
- semver_dredd-1.0.20260704001/snapshot/change_kind.py +24 -0
- semver_dredd-1.0.20260704001/snapshot/models.py +519 -0
- semver_dredd-1.0.20260704001/snapshot/predefined/__init__.py +66 -0
- semver_dredd-1.0.20260704001/snapshot/predefined/models.py +291 -0
- semver_dredd-1.0.20260704001/snapshot/protocols.py +96 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 sr9000
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: semver-dredd
|
|
3
|
+
Version: 1.0.20260704001
|
|
4
|
+
Summary: Automatically increments semver number based on interface changes.
|
|
5
|
+
License: MIT
|
|
6
|
+
Keywords: semantic-versioning,semver,api,versioning,cli
|
|
7
|
+
Author: sr9000
|
|
8
|
+
Author-email: no@mail.org
|
|
9
|
+
Requires-Python: >=3.10
|
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Topic :: Software Development :: Version Control
|
|
20
|
+
Provides-Extra: all
|
|
21
|
+
Provides-Extra: go
|
|
22
|
+
Provides-Extra: java
|
|
23
|
+
Provides-Extra: javaparser
|
|
24
|
+
Provides-Extra: python
|
|
25
|
+
Requires-Dist: PyYAML (>=6.0)
|
|
26
|
+
Requires-Dist: go-1.20-dredd (>=1.1.0) ; extra == "all"
|
|
27
|
+
Requires-Dist: go-1.20-dredd (>=1.1.0) ; extra == "go"
|
|
28
|
+
Requires-Dist: java-1.8-dredd (>=1.1.0) ; extra == "all"
|
|
29
|
+
Requires-Dist: java-1.8-dredd (>=1.1.0) ; extra == "java"
|
|
30
|
+
Requires-Dist: javaparser-1.8-dredd (>=1.0.0) ; extra == "all"
|
|
31
|
+
Requires-Dist: javaparser-1.8-dredd (>=1.0.0) ; extra == "javaparser"
|
|
32
|
+
Requires-Dist: python-3.10-dredd (>=1.1.0) ; extra == "all"
|
|
33
|
+
Requires-Dist: python-3.10-dredd (>=1.1.0) ; extra == "python"
|
|
34
|
+
Project-URL: Homepage, https://github.com/sr9000/semver-dredd
|
|
35
|
+
Project-URL: Repository, https://github.com/sr9000/semver-dredd
|
|
36
|
+
Description-Content-Type: text/markdown
|
|
37
|
+
|
|
38
|
+
# semver-dredd
|
|
39
|
+
|
|
40
|
+
Semantic-versioning workflow for public APIs.
|
|
41
|
+
|
|
42
|
+
`semver-dredd` compares a saved API snapshot with the current source tree,
|
|
43
|
+
classifies the change as `NONE`, `PATCH`, `MINOR`, or `BREAKING`, and helps you
|
|
44
|
+
write or suggest the next version.
|
|
45
|
+
|
|
46
|
+
## What it is
|
|
47
|
+
|
|
48
|
+
- **Core engine** for snapshot loading, diffing, version math, and config
|
|
49
|
+
resolution.
|
|
50
|
+
- **Plugin-based API inspection** for different languages and source models.
|
|
51
|
+
- **CLI workflow** for initializing a project, checking API drift, baking a new
|
|
52
|
+
release baseline, generating standalone snapshots, and inspecting plugins.
|
|
53
|
+
- **Programmatic Python API** for direct use in tests, release automation, or
|
|
54
|
+
custom tooling.
|
|
55
|
+
|
|
56
|
+
Officially documented plugin keys:
|
|
57
|
+
|
|
58
|
+
- `python`
|
|
59
|
+
- `go`
|
|
60
|
+
- `java`
|
|
61
|
+
- `javaparser`
|
|
62
|
+
- `bundle` (built into core for VERSION-file dependency bundles)
|
|
63
|
+
|
|
64
|
+
## What it does
|
|
65
|
+
|
|
66
|
+
semver-dredd supports:
|
|
67
|
+
|
|
68
|
+
- config-driven workflows via `.semver.yaml`
|
|
69
|
+
- `.env` / environment / CLI override precedence
|
|
70
|
+
- multi-document config candidate fallback
|
|
71
|
+
- plugin-specific `include` / `exclude` scope forwarding
|
|
72
|
+
- machine-readable plugin inventory via `plugin list --json|--yaml`
|
|
73
|
+
- plugin metadata and generator provenance in plugin snapshots
|
|
74
|
+
- pathless `status`, `bake`, and `snapshot` when `source.path` is configured
|
|
75
|
+
|
|
76
|
+
## Install
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# Core package
|
|
80
|
+
pip install semver-dredd
|
|
81
|
+
|
|
82
|
+
# Install the plugins you want
|
|
83
|
+
pip install python-3.10-dredd
|
|
84
|
+
pip install go-1.20-dredd
|
|
85
|
+
pip install java-1.8-dredd
|
|
86
|
+
pip install javaparser-1.8-dredd
|
|
87
|
+
|
|
88
|
+
# Or install the official meta-package
|
|
89
|
+
# (includes python/go/java; install javaparser separately)
|
|
90
|
+
pip install semver-dredd-all
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Development install:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
poetry install --with dev
|
|
97
|
+
poetry run pip install -e plugins/python-3.10-dredd
|
|
98
|
+
poetry run pip install -e plugins/go-1.20-dredd
|
|
99
|
+
poetry run pip install -e plugins/java-1.8-dredd
|
|
100
|
+
poetry run pip install -e plugins/javaparser-1.8-dredd
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Run it
|
|
104
|
+
|
|
105
|
+
Typical first-run workflow:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
semver-dredd plugin list
|
|
109
|
+
semver-dredd init . --plugin python --version 1.0.0
|
|
110
|
+
semver-dredd status --details
|
|
111
|
+
semver-dredd bake
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Plugin inspection lives under the `plugin` command group. The supported
|
|
115
|
+
inventory command is `semver-dredd plugin list` (there is no top-level
|
|
116
|
+
`semver-dredd list` alias).
|
|
117
|
+
|
|
118
|
+
The important workflow rule is:
|
|
119
|
+
|
|
120
|
+
- `init` requires an explicit `--plugin`
|
|
121
|
+
- later commands can use `.semver.yaml` defaults
|
|
122
|
+
- CLI arguments override environment, which overrides config
|
|
123
|
+
|
|
124
|
+
Language examples:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
# Python
|
|
128
|
+
semver-dredd init mypackage --plugin python --version 1.0.0
|
|
129
|
+
semver-dredd status --details
|
|
130
|
+
|
|
131
|
+
# Go
|
|
132
|
+
semver-dredd init ./pkg/api --plugin go --version 1.0.0
|
|
133
|
+
semver-dredd status ./pkg/api --plugin go --details
|
|
134
|
+
|
|
135
|
+
# Java (regex parser)
|
|
136
|
+
semver-dredd init ./src/main/java --plugin java --version 1.0.0
|
|
137
|
+
|
|
138
|
+
# JavaParser (AST parser)
|
|
139
|
+
semver-dredd init ./src/main/java --plugin javaparser --version 1.0.0
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
For full command reference and common workflows, see [`USAGE.md`](USAGE.md).
|
|
143
|
+
|
|
144
|
+
## Configuration
|
|
145
|
+
|
|
146
|
+
The main project config is `.semver.yaml`.
|
|
147
|
+
|
|
148
|
+
- Generate a commented template with `semver-dredd template`
|
|
149
|
+
- See a full, worked example in
|
|
150
|
+
[`example/semver_showcase.yaml`](example/semver_showcase.yaml)
|
|
151
|
+
- See the config/schema reference in [`SCHEMA.md`](SCHEMA.md)
|
|
152
|
+
- Environment variables (`SEMVER_DREDD_*`) and the full precedence order
|
|
153
|
+
(config < `.env` < environment < CLI) are documented in
|
|
154
|
+
[`USAGE.md`](USAGE.md)
|
|
155
|
+
|
|
156
|
+
Managed files typically include:
|
|
157
|
+
|
|
158
|
+
| File | Purpose |
|
|
159
|
+
|------|---------|
|
|
160
|
+
| `.semver.yaml` | project configuration |
|
|
161
|
+
| `baked.yaml` | release baseline snapshot |
|
|
162
|
+
| `current.yaml` | latest generated snapshot |
|
|
163
|
+
| `VERSION` | current version string |
|
|
164
|
+
|
|
165
|
+
## Extend or patch it
|
|
166
|
+
|
|
167
|
+
- Plugin authoring guide: [`HOWTO.md`](HOWTO.md)
|
|
168
|
+
- Snapshot/config schema reference: [`SCHEMA.md`](SCHEMA.md)
|
|
169
|
+
- Example plugins: [`plugins/`](plugins/)
|
|
170
|
+
- Demos and example configs: [`example/`](example/)
|
|
171
|
+
|
|
172
|
+
Useful development commands:
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
poetry run pytest -v
|
|
176
|
+
poetry run python -m cli --help
|
|
177
|
+
bash example/demo_python.sh
|
|
178
|
+
bash scripts/smoke.sh python unit
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## Programmatic API
|
|
182
|
+
|
|
183
|
+
```python
|
|
184
|
+
from semverdredd import compare_and_suggest
|
|
185
|
+
|
|
186
|
+
result, suggested = compare_and_suggest(
|
|
187
|
+
"old_module",
|
|
188
|
+
"new_module",
|
|
189
|
+
plugin_name="python",
|
|
190
|
+
current_version="1.2.0",
|
|
191
|
+
)
|
|
192
|
+
|
|
193
|
+
print(result.change_kind.name)
|
|
194
|
+
print(suggested)
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
The CLI/docs cover the primary user workflow; the importable API is best suited
|
|
198
|
+
for automation and tests.
|
|
199
|
+
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# semver-dredd
|
|
2
|
+
|
|
3
|
+
Semantic-versioning workflow for public APIs.
|
|
4
|
+
|
|
5
|
+
`semver-dredd` compares a saved API snapshot with the current source tree,
|
|
6
|
+
classifies the change as `NONE`, `PATCH`, `MINOR`, or `BREAKING`, and helps you
|
|
7
|
+
write or suggest the next version.
|
|
8
|
+
|
|
9
|
+
## What it is
|
|
10
|
+
|
|
11
|
+
- **Core engine** for snapshot loading, diffing, version math, and config
|
|
12
|
+
resolution.
|
|
13
|
+
- **Plugin-based API inspection** for different languages and source models.
|
|
14
|
+
- **CLI workflow** for initializing a project, checking API drift, baking a new
|
|
15
|
+
release baseline, generating standalone snapshots, and inspecting plugins.
|
|
16
|
+
- **Programmatic Python API** for direct use in tests, release automation, or
|
|
17
|
+
custom tooling.
|
|
18
|
+
|
|
19
|
+
Officially documented plugin keys:
|
|
20
|
+
|
|
21
|
+
- `python`
|
|
22
|
+
- `go`
|
|
23
|
+
- `java`
|
|
24
|
+
- `javaparser`
|
|
25
|
+
- `bundle` (built into core for VERSION-file dependency bundles)
|
|
26
|
+
|
|
27
|
+
## What it does
|
|
28
|
+
|
|
29
|
+
semver-dredd supports:
|
|
30
|
+
|
|
31
|
+
- config-driven workflows via `.semver.yaml`
|
|
32
|
+
- `.env` / environment / CLI override precedence
|
|
33
|
+
- multi-document config candidate fallback
|
|
34
|
+
- plugin-specific `include` / `exclude` scope forwarding
|
|
35
|
+
- machine-readable plugin inventory via `plugin list --json|--yaml`
|
|
36
|
+
- plugin metadata and generator provenance in plugin snapshots
|
|
37
|
+
- pathless `status`, `bake`, and `snapshot` when `source.path` is configured
|
|
38
|
+
|
|
39
|
+
## Install
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# Core package
|
|
43
|
+
pip install semver-dredd
|
|
44
|
+
|
|
45
|
+
# Install the plugins you want
|
|
46
|
+
pip install python-3.10-dredd
|
|
47
|
+
pip install go-1.20-dredd
|
|
48
|
+
pip install java-1.8-dredd
|
|
49
|
+
pip install javaparser-1.8-dredd
|
|
50
|
+
|
|
51
|
+
# Or install the official meta-package
|
|
52
|
+
# (includes python/go/java; install javaparser separately)
|
|
53
|
+
pip install semver-dredd-all
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Development install:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
poetry install --with dev
|
|
60
|
+
poetry run pip install -e plugins/python-3.10-dredd
|
|
61
|
+
poetry run pip install -e plugins/go-1.20-dredd
|
|
62
|
+
poetry run pip install -e plugins/java-1.8-dredd
|
|
63
|
+
poetry run pip install -e plugins/javaparser-1.8-dredd
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Run it
|
|
67
|
+
|
|
68
|
+
Typical first-run workflow:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
semver-dredd plugin list
|
|
72
|
+
semver-dredd init . --plugin python --version 1.0.0
|
|
73
|
+
semver-dredd status --details
|
|
74
|
+
semver-dredd bake
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Plugin inspection lives under the `plugin` command group. The supported
|
|
78
|
+
inventory command is `semver-dredd plugin list` (there is no top-level
|
|
79
|
+
`semver-dredd list` alias).
|
|
80
|
+
|
|
81
|
+
The important workflow rule is:
|
|
82
|
+
|
|
83
|
+
- `init` requires an explicit `--plugin`
|
|
84
|
+
- later commands can use `.semver.yaml` defaults
|
|
85
|
+
- CLI arguments override environment, which overrides config
|
|
86
|
+
|
|
87
|
+
Language examples:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
# Python
|
|
91
|
+
semver-dredd init mypackage --plugin python --version 1.0.0
|
|
92
|
+
semver-dredd status --details
|
|
93
|
+
|
|
94
|
+
# Go
|
|
95
|
+
semver-dredd init ./pkg/api --plugin go --version 1.0.0
|
|
96
|
+
semver-dredd status ./pkg/api --plugin go --details
|
|
97
|
+
|
|
98
|
+
# Java (regex parser)
|
|
99
|
+
semver-dredd init ./src/main/java --plugin java --version 1.0.0
|
|
100
|
+
|
|
101
|
+
# JavaParser (AST parser)
|
|
102
|
+
semver-dredd init ./src/main/java --plugin javaparser --version 1.0.0
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
For full command reference and common workflows, see [`USAGE.md`](USAGE.md).
|
|
106
|
+
|
|
107
|
+
## Configuration
|
|
108
|
+
|
|
109
|
+
The main project config is `.semver.yaml`.
|
|
110
|
+
|
|
111
|
+
- Generate a commented template with `semver-dredd template`
|
|
112
|
+
- See a full, worked example in
|
|
113
|
+
[`example/semver_showcase.yaml`](example/semver_showcase.yaml)
|
|
114
|
+
- See the config/schema reference in [`SCHEMA.md`](SCHEMA.md)
|
|
115
|
+
- Environment variables (`SEMVER_DREDD_*`) and the full precedence order
|
|
116
|
+
(config < `.env` < environment < CLI) are documented in
|
|
117
|
+
[`USAGE.md`](USAGE.md)
|
|
118
|
+
|
|
119
|
+
Managed files typically include:
|
|
120
|
+
|
|
121
|
+
| File | Purpose |
|
|
122
|
+
|------|---------|
|
|
123
|
+
| `.semver.yaml` | project configuration |
|
|
124
|
+
| `baked.yaml` | release baseline snapshot |
|
|
125
|
+
| `current.yaml` | latest generated snapshot |
|
|
126
|
+
| `VERSION` | current version string |
|
|
127
|
+
|
|
128
|
+
## Extend or patch it
|
|
129
|
+
|
|
130
|
+
- Plugin authoring guide: [`HOWTO.md`](HOWTO.md)
|
|
131
|
+
- Snapshot/config schema reference: [`SCHEMA.md`](SCHEMA.md)
|
|
132
|
+
- Example plugins: [`plugins/`](plugins/)
|
|
133
|
+
- Demos and example configs: [`example/`](example/)
|
|
134
|
+
|
|
135
|
+
Useful development commands:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
poetry run pytest -v
|
|
139
|
+
poetry run python -m cli --help
|
|
140
|
+
bash example/demo_python.sh
|
|
141
|
+
bash scripts/smoke.sh python unit
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Programmatic API
|
|
145
|
+
|
|
146
|
+
```python
|
|
147
|
+
from semverdredd import compare_and_suggest
|
|
148
|
+
|
|
149
|
+
result, suggested = compare_and_suggest(
|
|
150
|
+
"old_module",
|
|
151
|
+
"new_module",
|
|
152
|
+
plugin_name="python",
|
|
153
|
+
current_version="1.2.0",
|
|
154
|
+
)
|
|
155
|
+
|
|
156
|
+
print(result.change_kind.name)
|
|
157
|
+
print(suggested)
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
The CLI/docs cover the primary user workflow; the importable API is best suited
|
|
161
|
+
for automation and tests.
|