pyossmtool 0.0.1__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.
- pyossmtool-0.0.1/LICENSE +21 -0
- pyossmtool-0.0.1/PKG-INFO +94 -0
- pyossmtool-0.0.1/README.md +65 -0
- pyossmtool-0.0.1/pyproject.toml +95 -0
- pyossmtool-0.0.1/setup.cfg +4 -0
- pyossmtool-0.0.1/src/pyossmtool/__init__.py +3 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/checks/bandit.scan.yaml +13 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/checks/codespell.spelling.yaml +12 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/checks/deadcode.scan.yaml +13 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/checks/gate.acronym-allowlist.yaml +14 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/checks/gate.folder-breadth.yaml +14 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/checks/gate.module-private-vars.yaml +14 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/checks/gate.module-size.yaml +14 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/checks/gitleaks.secrets.yaml +21 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/checks/hadolint.dockerfile.yaml +16 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/checks/jscpd.duplication.yaml +19 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/checks/markdownlint.check.yaml +17 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/checks/mdformat.apply.yaml +10 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/checks/mdformat.format.yaml +14 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/checks/mutmut.run.yaml +13 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/checks/pydeps.cycles.yaml +14 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/checks/pytest.coverage.yaml +19 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/checks/pytest.test.yaml +14 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/checks/radon.cc.yaml +13 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/checks/radon.mi.yaml +13 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/checks/ruff.format.apply.yaml +11 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/checks/ruff.format.yaml +14 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/checks/ruff.lint.yaml +15 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/checks/ruff.unused.yaml +17 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/checks/semgrep.scan.yaml +18 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/checks/shellcheck.yaml +13 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/checks/shfmt.apply.yaml +11 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/checks/shfmt.format.yaml +14 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/checks/sourcery.review.yaml +14 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/checks/ty.check.yaml +15 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/checks/vulture.scan.yaml +16 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/checks/yamlfmt.apply.yaml +10 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/checks/yamlfmt.format.yaml +14 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/checks/yamllint.check.yaml +16 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/tools/bandit.yaml +20 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/tools/codespell.yaml +17 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/tools/deadcode.yaml +13 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/tools/gitleaks.yaml +9 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/tools/hadolint.yaml +11 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/tools/jscpd.yaml +15 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/tools/markdownlint.yaml +18 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/tools/mdformat.yaml +13 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/tools/mutmut.yaml +10 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/tools/pydeps.yaml +10 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/tools/pytest.yaml +12 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/tools/radon.yaml +10 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/tools/ruff.yaml +26 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/tools/script.yaml +8 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/tools/semgrep.yaml +21 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/tools/shellcheck.yaml +10 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/tools/shfmt.yaml +13 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/tools/sourcery.yaml +10 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/tools/ty.yaml +20 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/tools/vulture.yaml +13 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/tools/yamlfmt.yaml +24 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/catalog/tools/yamllint.yaml +24 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/defaults/allowlists/acronyms.yaml +10 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/defaults/allowlists/folder-breadth.txt +1 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/defaults/allowlists/module-private-vars.txt +1 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/defaults/allowlists/module-size.txt +1 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/defaults/configs/bandit.yaml +5 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/defaults/configs/gates/acronym-allowlist.yaml +4 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/defaults/configs/gates/folder-breadth.yaml +12 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/defaults/configs/gates/module-private-vars.yaml +4 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/defaults/configs/gates/module-size.yaml +6 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/defaults/configs/markdownlint.json +8 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/defaults/configs/ruff.toml +8 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/defaults/configs/ty.toml +5 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/defaults/configs/yamlfmt.yaml +4 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/defaults/configs/yamllint.yaml +12 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/defaults/gates/README.md +150 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/defaults/gates/acronym-allowlist.sh +15 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/defaults/gates/folder-breadth.sh +22 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/defaults/gates/lib.sh +116 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/defaults/gates/module-private-vars.sh +77 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/defaults/gates/module-size.sh +60 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/defaults/semgrep/python-quality.yml +19 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/suites/demo.yaml +11 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/suites/extended.yaml +34 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/suites/format.yaml +10 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/suites/formatting.yaml +10 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/suites/policy.yaml +11 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/suites/python-quality.yaml +9 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/suites/reslab-parity.yaml +41 -0
- pyossmtool-0.0.1/src/pyossmtool/bundle/suites/standard.yaml +45 -0
- pyossmtool-0.0.1/src/pyossmtool/cli.py +233 -0
- pyossmtool-0.0.1/src/pyossmtool/config_resolver.py +117 -0
- pyossmtool-0.0.1/src/pyossmtool/discovery.py +50 -0
- pyossmtool-0.0.1/src/pyossmtool/gate_config.py +119 -0
- pyossmtool-0.0.1/src/pyossmtool/gates.py +102 -0
- pyossmtool-0.0.1/src/pyossmtool/ignore.py +270 -0
- pyossmtool-0.0.1/src/pyossmtool/ignore_materialize.py +184 -0
- pyossmtool-0.0.1/src/pyossmtool/installer.py +119 -0
- pyossmtool-0.0.1/src/pyossmtool/models.py +279 -0
- pyossmtool-0.0.1/src/pyossmtool/parsers/__init__.py +76 -0
- pyossmtool-0.0.1/src/pyossmtool/parsers/analysis.py +329 -0
- pyossmtool-0.0.1/src/pyossmtool/parsers/base.py +29 -0
- pyossmtool-0.0.1/src/pyossmtool/parsers/common.py +57 -0
- pyossmtool-0.0.1/src/pyossmtool/parsers/format_text.py +67 -0
- pyossmtool-0.0.1/src/pyossmtool/parsers/gates.py +92 -0
- pyossmtool-0.0.1/src/pyossmtool/parsers/patterns.py +78 -0
- pyossmtool-0.0.1/src/pyossmtool/parsers/prose.py +193 -0
- pyossmtool-0.0.1/src/pyossmtool/parsers/ruff.py +103 -0
- pyossmtool-0.0.1/src/pyossmtool/parsers/shell.py +83 -0
- pyossmtool-0.0.1/src/pyossmtool/policy/__init__.py +0 -0
- pyossmtool-0.0.1/src/pyossmtool/policy/acronym_allowlist.py +322 -0
- pyossmtool-0.0.1/src/pyossmtool/policy/folder_breadth.py +306 -0
- pyossmtool-0.0.1/src/pyossmtool/registry.py +72 -0
- pyossmtool-0.0.1/src/pyossmtool/reporter.py +87 -0
- pyossmtool-0.0.1/src/pyossmtool/resolver.py +146 -0
- pyossmtool-0.0.1/src/pyossmtool/runner.py +482 -0
- pyossmtool-0.0.1/src/pyossmtool/runner_script.py +131 -0
- pyossmtool-0.0.1/src/pyossmtool/target_expand.py +112 -0
- pyossmtool-0.0.1/src/pyossmtool.egg-info/PKG-INFO +94 -0
- pyossmtool-0.0.1/src/pyossmtool.egg-info/SOURCES.txt +133 -0
- pyossmtool-0.0.1/src/pyossmtool.egg-info/dependency_links.txt +1 -0
- pyossmtool-0.0.1/src/pyossmtool.egg-info/entry_points.txt +2 -0
- pyossmtool-0.0.1/src/pyossmtool.egg-info/requires.txt +4 -0
- pyossmtool-0.0.1/src/pyossmtool.egg-info/top_level.txt +1 -0
- pyossmtool-0.0.1/tests/test_check_modes.py +38 -0
- pyossmtool-0.0.1/tests/test_cli.py +17 -0
- pyossmtool-0.0.1/tests/test_config_and_targets.py +158 -0
- pyossmtool-0.0.1/tests/test_discovery.py +94 -0
- pyossmtool-0.0.1/tests/test_gate_config.py +45 -0
- pyossmtool-0.0.1/tests/test_ignore.py +150 -0
- pyossmtool-0.0.1/tests/test_npm_install.py +53 -0
- pyossmtool-0.0.1/tests/test_packaging.py +35 -0
- pyossmtool-0.0.1/tests/test_parser_registry.py +124 -0
- pyossmtool-0.0.1/tests/test_script_gates.py +56 -0
- pyossmtool-0.0.1/tests/test_wheel_install.py +51 -0
pyossmtool-0.0.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Vishal Kumar Mishra
|
|
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,94 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pyossmtool
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Quality-gate orchestrator for AI-assisted development
|
|
5
|
+
Author-email: Vishal Kumar Mishra <vishal.k.mishra2@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Changelog, https://github.com/inquilabee/pyossmtool/blob/main/CHANGELOG.md
|
|
8
|
+
Project-URL: Homepage, https://github.com/inquilabee/pyossmtool
|
|
9
|
+
Project-URL: Issues, https://github.com/inquilabee/pyossmtool/issues
|
|
10
|
+
Project-URL: Repository, https://github.com/inquilabee/pyossmtool
|
|
11
|
+
Keywords: quality,lint,format,pre-commit,python,static-analysis
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
21
|
+
Requires-Python: <3.14,>=3.11
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
Requires-Dist: pydantic>=2.0
|
|
25
|
+
Requires-Dist: pathspec>=0.12
|
|
26
|
+
Requires-Dist: pyyaml>=6.0
|
|
27
|
+
Requires-Dist: typer>=0.12
|
|
28
|
+
Dynamic: license-file
|
|
29
|
+
|
|
30
|
+
# pyossmtool
|
|
31
|
+
|
|
32
|
+
Portable quality-gate orchestrator for Python-first repositories. Inspired by Trunk and pre-commit: opinionated defaults, little required configuration, silent on success, structured failure reports for humans and AI agents.
|
|
33
|
+
|
|
34
|
+
## Install
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
pip install pyossmtool
|
|
38
|
+
# or
|
|
39
|
+
uv add --dev pyossmtool
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Requires Python 3.11–3.13.
|
|
43
|
+
|
|
44
|
+
## Quick start
|
|
45
|
+
|
|
46
|
+
Create `pyossmtool.yaml` in your repo:
|
|
47
|
+
|
|
48
|
+
```yaml
|
|
49
|
+
suite: python-quality
|
|
50
|
+
env: auto
|
|
51
|
+
target: .
|
|
52
|
+
configs:
|
|
53
|
+
mode: auto
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Install tool binaries for that suite, then run:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
pyossmtool install --suite python-quality
|
|
60
|
+
pyossmtool format # apply formatters (suite: format)
|
|
61
|
+
pyossmtool check # report-only (suite from pyossmtool.yaml)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
- **`check`** — report-only (linters, type checkers, format `--check` variants)
|
|
65
|
+
- **`format`** — writes files (formatter apply checks)
|
|
66
|
+
|
|
67
|
+
On failure, pyossmtool exits non-zero and writes a JSON failure report under `reports/failures/`. Inspect the schema with `pyossmtool schema`.
|
|
68
|
+
|
|
69
|
+
## How targeting works
|
|
70
|
+
|
|
71
|
+
- Default scan root is `.` (override with `target:` in config or suite).
|
|
72
|
+
- Each tool declares `files:` globs (e.g. `**/*.py`). Matching files are discovered under the target.
|
|
73
|
+
- `.gitignore` is always applied. Extra ignore profiles/paths can be added in suite or project config.
|
|
74
|
+
|
|
75
|
+
## Adding a tool
|
|
76
|
+
|
|
77
|
+
1. Add `src/pyossmtool/bundle/catalog/tools/<id>.yaml` (install method, binary, `files:`).
|
|
78
|
+
1. Add one or more checks under `catalog/checks/` with `mode: check` or `mode: format`.
|
|
79
|
+
1. Optionally add a parser class under `pyossmtool.parsers` and register it.
|
|
80
|
+
1. Reference the check ids from a suite YAML.
|
|
81
|
+
|
|
82
|
+
Project-local script gates: `pyossmtool gate init <name>`.
|
|
83
|
+
|
|
84
|
+
## Development
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
uv sync --all-groups
|
|
88
|
+
make check-commit
|
|
89
|
+
make build
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## License
|
|
93
|
+
|
|
94
|
+
MIT
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# pyossmtool
|
|
2
|
+
|
|
3
|
+
Portable quality-gate orchestrator for Python-first repositories. Inspired by Trunk and pre-commit: opinionated defaults, little required configuration, silent on success, structured failure reports for humans and AI agents.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install pyossmtool
|
|
9
|
+
# or
|
|
10
|
+
uv add --dev pyossmtool
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Requires Python 3.11–3.13.
|
|
14
|
+
|
|
15
|
+
## Quick start
|
|
16
|
+
|
|
17
|
+
Create `pyossmtool.yaml` in your repo:
|
|
18
|
+
|
|
19
|
+
```yaml
|
|
20
|
+
suite: python-quality
|
|
21
|
+
env: auto
|
|
22
|
+
target: .
|
|
23
|
+
configs:
|
|
24
|
+
mode: auto
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Install tool binaries for that suite, then run:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pyossmtool install --suite python-quality
|
|
31
|
+
pyossmtool format # apply formatters (suite: format)
|
|
32
|
+
pyossmtool check # report-only (suite from pyossmtool.yaml)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
- **`check`** — report-only (linters, type checkers, format `--check` variants)
|
|
36
|
+
- **`format`** — writes files (formatter apply checks)
|
|
37
|
+
|
|
38
|
+
On failure, pyossmtool exits non-zero and writes a JSON failure report under `reports/failures/`. Inspect the schema with `pyossmtool schema`.
|
|
39
|
+
|
|
40
|
+
## How targeting works
|
|
41
|
+
|
|
42
|
+
- Default scan root is `.` (override with `target:` in config or suite).
|
|
43
|
+
- Each tool declares `files:` globs (e.g. `**/*.py`). Matching files are discovered under the target.
|
|
44
|
+
- `.gitignore` is always applied. Extra ignore profiles/paths can be added in suite or project config.
|
|
45
|
+
|
|
46
|
+
## Adding a tool
|
|
47
|
+
|
|
48
|
+
1. Add `src/pyossmtool/bundle/catalog/tools/<id>.yaml` (install method, binary, `files:`).
|
|
49
|
+
1. Add one or more checks under `catalog/checks/` with `mode: check` or `mode: format`.
|
|
50
|
+
1. Optionally add a parser class under `pyossmtool.parsers` and register it.
|
|
51
|
+
1. Reference the check ids from a suite YAML.
|
|
52
|
+
|
|
53
|
+
Project-local script gates: `pyossmtool gate init <name>`.
|
|
54
|
+
|
|
55
|
+
## Development
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
uv sync --all-groups
|
|
59
|
+
make check-commit
|
|
60
|
+
make build
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## License
|
|
64
|
+
|
|
65
|
+
MIT
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "pyossmtool"
|
|
3
|
+
version = "0.0.1"
|
|
4
|
+
description = "Quality-gate orchestrator for AI-assisted development"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.11,<3.14"
|
|
7
|
+
license = "MIT"
|
|
8
|
+
license-files = ["LICENSE"]
|
|
9
|
+
authors = [
|
|
10
|
+
{ name = "Vishal Kumar Mishra", email = "vishal.k.mishra2@gmail.com" },
|
|
11
|
+
]
|
|
12
|
+
keywords = [
|
|
13
|
+
"quality",
|
|
14
|
+
"lint",
|
|
15
|
+
"format",
|
|
16
|
+
"pre-commit",
|
|
17
|
+
"python",
|
|
18
|
+
"static-analysis",
|
|
19
|
+
]
|
|
20
|
+
classifiers = [
|
|
21
|
+
"Development Status :: 3 - Alpha",
|
|
22
|
+
"Environment :: Console",
|
|
23
|
+
"Intended Audience :: Developers",
|
|
24
|
+
"Operating System :: OS Independent",
|
|
25
|
+
"Programming Language :: Python :: 3",
|
|
26
|
+
"Programming Language :: Python :: 3.11",
|
|
27
|
+
"Programming Language :: Python :: 3.12",
|
|
28
|
+
"Programming Language :: Python :: 3.13",
|
|
29
|
+
"Topic :: Software Development :: Quality Assurance",
|
|
30
|
+
]
|
|
31
|
+
dependencies = [
|
|
32
|
+
"pydantic>=2.0",
|
|
33
|
+
"pathspec>=0.12",
|
|
34
|
+
"pyyaml>=6.0",
|
|
35
|
+
"typer>=0.12",
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
[project.urls]
|
|
39
|
+
Changelog = "https://github.com/inquilabee/pyossmtool/blob/main/CHANGELOG.md"
|
|
40
|
+
Homepage = "https://github.com/inquilabee/pyossmtool"
|
|
41
|
+
Issues = "https://github.com/inquilabee/pyossmtool/issues"
|
|
42
|
+
Repository = "https://github.com/inquilabee/pyossmtool"
|
|
43
|
+
|
|
44
|
+
[dependency-groups]
|
|
45
|
+
dev = [
|
|
46
|
+
"pytest>=8.0",
|
|
47
|
+
"pytest-cov>=6.0",
|
|
48
|
+
"ruff>=0.11.0",
|
|
49
|
+
]
|
|
50
|
+
|
|
51
|
+
[project.scripts]
|
|
52
|
+
pyossmtool = "pyossmtool.cli:app"
|
|
53
|
+
|
|
54
|
+
[build-system]
|
|
55
|
+
requires = ["setuptools>=68"]
|
|
56
|
+
build-backend = "setuptools.build_meta"
|
|
57
|
+
|
|
58
|
+
[tool.setuptools.packages.find]
|
|
59
|
+
where = ["src"]
|
|
60
|
+
|
|
61
|
+
[tool.setuptools.package-data]
|
|
62
|
+
pyossmtool = ["py.typed", "bundle/**/*"]
|
|
63
|
+
|
|
64
|
+
[tool.pytest.ini_options]
|
|
65
|
+
minversion = "8.0"
|
|
66
|
+
testpaths = ["tests"]
|
|
67
|
+
python_files = ["test_*.py"]
|
|
68
|
+
addopts = [
|
|
69
|
+
"-m",
|
|
70
|
+
"not integration",
|
|
71
|
+
"--strict-config",
|
|
72
|
+
"--strict-markers",
|
|
73
|
+
]
|
|
74
|
+
filterwarnings = [
|
|
75
|
+
"error",
|
|
76
|
+
]
|
|
77
|
+
markers = [
|
|
78
|
+
"integration: tests that build wheels, install packages, or require external binaries/network",
|
|
79
|
+
]
|
|
80
|
+
|
|
81
|
+
[tool.ruff]
|
|
82
|
+
line-length = 120
|
|
83
|
+
target-version = "py311"
|
|
84
|
+
|
|
85
|
+
[tool.ruff.lint]
|
|
86
|
+
select = ["B", "E", "F", "I", "UP"]
|
|
87
|
+
|
|
88
|
+
[tool.ty]
|
|
89
|
+
# Repo-owned config; wins over bundled defaults when configs.mode=auto
|
|
90
|
+
|
|
91
|
+
[tool.bandit]
|
|
92
|
+
skips = ["B404", "B603", "B607"]
|
|
93
|
+
|
|
94
|
+
[tool.codespell]
|
|
95
|
+
ignore-words-list = "IST,fullfilled"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
id: deadcode.scan
|
|
2
|
+
tool: deadcode
|
|
3
|
+
name: Deadcode Scan
|
|
4
|
+
description: Find unused Python definitions.
|
|
5
|
+
argv:
|
|
6
|
+
- --no-color
|
|
7
|
+
- "{target}"
|
|
8
|
+
parser: deadcode_text
|
|
9
|
+
success:
|
|
10
|
+
exit_codes: [0]
|
|
11
|
+
remediation:
|
|
12
|
+
suggested_commands:
|
|
13
|
+
- deadcode --no-color {target}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
id: gate.acronym-allowlist
|
|
2
|
+
tool: script
|
|
3
|
+
name: Acronym Allowlist Gate
|
|
4
|
+
description: Require documented expansions for acronyms in contributor prose.
|
|
5
|
+
script: bundled:gates/acronym-allowlist.sh
|
|
6
|
+
parser: gate_json
|
|
7
|
+
output_file: .pyossmtool/reports/gate.acronym-allowlist.json
|
|
8
|
+
argv: []
|
|
9
|
+
config:
|
|
10
|
+
bundled: gates/acronym-allowlist.yaml
|
|
11
|
+
project_file: .pyossmtool/configs/gates/gate.acronym-allowlist.yaml
|
|
12
|
+
allowlist_bundled: acronyms.yaml
|
|
13
|
+
success:
|
|
14
|
+
exit_codes: [0]
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
id: gate.folder-breadth
|
|
2
|
+
tool: script
|
|
3
|
+
name: Folder Breadth Gate
|
|
4
|
+
description: Cap direct sibling file counts in leaf directories.
|
|
5
|
+
script: bundled:gates/folder-breadth.sh
|
|
6
|
+
parser: gate_json
|
|
7
|
+
output_file: .pyossmtool/reports/gate.folder-breadth.json
|
|
8
|
+
argv: []
|
|
9
|
+
config:
|
|
10
|
+
bundled: gates/folder-breadth.yaml
|
|
11
|
+
project_file: .pyossmtool/configs/gates/gate.folder-breadth.yaml
|
|
12
|
+
allowlist_bundled: folder-breadth.txt
|
|
13
|
+
success:
|
|
14
|
+
exit_codes: [0]
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
id: gate.module-private-vars
|
|
2
|
+
tool: script
|
|
3
|
+
name: Module Private Vars Gate
|
|
4
|
+
description: Forbid module-level names with a single leading underscore.
|
|
5
|
+
script: bundled:gates/module-private-vars.sh
|
|
6
|
+
parser: gate_json
|
|
7
|
+
output_file: .pyossmtool/reports/gate.module-private-vars.json
|
|
8
|
+
argv: []
|
|
9
|
+
config:
|
|
10
|
+
bundled: gates/module-private-vars.yaml
|
|
11
|
+
project_file: .pyossmtool/configs/gates/gate.module-private-vars.yaml
|
|
12
|
+
allowlist_bundled: module-private-vars.txt
|
|
13
|
+
success:
|
|
14
|
+
exit_codes: [0]
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
id: gate.module-size
|
|
2
|
+
tool: script
|
|
3
|
+
name: Module Size Gate
|
|
4
|
+
description: Enforce portfolio and new-file line limits on Python modules.
|
|
5
|
+
script: bundled:gates/module-size.sh
|
|
6
|
+
parser: gate_json
|
|
7
|
+
output_file: .pyossmtool/reports/gate.module-size.json
|
|
8
|
+
argv: []
|
|
9
|
+
config:
|
|
10
|
+
bundled: gates/module-size.yaml
|
|
11
|
+
project_file: .pyossmtool/configs/gates/gate.module-size.yaml
|
|
12
|
+
allowlist_bundled: module-size.txt
|
|
13
|
+
success:
|
|
14
|
+
exit_codes: [0]
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
id: gitleaks.secrets
|
|
2
|
+
tool: gitleaks
|
|
3
|
+
name: Gitleaks Secret Scan
|
|
4
|
+
description: Scan repository for leaked secrets.
|
|
5
|
+
argv:
|
|
6
|
+
- detect
|
|
7
|
+
- --source
|
|
8
|
+
- "{target}"
|
|
9
|
+
- --no-banner
|
|
10
|
+
- --redact
|
|
11
|
+
- --report-format
|
|
12
|
+
- json
|
|
13
|
+
- --report-path
|
|
14
|
+
- .pyossmtool/gitleaks-report.json
|
|
15
|
+
parser: gitleaks_json
|
|
16
|
+
success:
|
|
17
|
+
exit_codes: [0]
|
|
18
|
+
output_file: .pyossmtool/gitleaks-report.json
|
|
19
|
+
remediation:
|
|
20
|
+
suggested_commands:
|
|
21
|
+
- gitleaks detect --source {target}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
id: hadolint.dockerfile
|
|
2
|
+
tool: hadolint
|
|
3
|
+
name: Hadolint
|
|
4
|
+
description: Lint Dockerfiles.
|
|
5
|
+
argv:
|
|
6
|
+
- --format
|
|
7
|
+
- json
|
|
8
|
+
- '{target}'
|
|
9
|
+
parser: hadolint_json
|
|
10
|
+
success:
|
|
11
|
+
exit_codes:
|
|
12
|
+
- 0
|
|
13
|
+
- 1
|
|
14
|
+
remediation:
|
|
15
|
+
suggested_commands:
|
|
16
|
+
- hadolint {target}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
id: jscpd.duplication
|
|
2
|
+
tool: jscpd
|
|
3
|
+
name: JSCPD Duplication Scan
|
|
4
|
+
description: Detect duplicated code blocks above threshold.
|
|
5
|
+
argv:
|
|
6
|
+
- "{target}"
|
|
7
|
+
- --reporters
|
|
8
|
+
- json
|
|
9
|
+
- --silent
|
|
10
|
+
- --min-lines
|
|
11
|
+
- "3"
|
|
12
|
+
- --min-tokens
|
|
13
|
+
- "20"
|
|
14
|
+
parser: jscpd_json
|
|
15
|
+
success:
|
|
16
|
+
exit_codes: [0]
|
|
17
|
+
policy:
|
|
18
|
+
max_duplication_percent: 50
|
|
19
|
+
output_file: report/jscpd-report.json
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
id: markdownlint.check
|
|
2
|
+
tool: markdownlint
|
|
3
|
+
name: Markdownlint
|
|
4
|
+
description: Lint Markdown files for style issues.
|
|
5
|
+
argv:
|
|
6
|
+
- -c
|
|
7
|
+
- '{config}'
|
|
8
|
+
- -j
|
|
9
|
+
- '{target}'
|
|
10
|
+
parser: markdownlint_json
|
|
11
|
+
success:
|
|
12
|
+
exit_codes:
|
|
13
|
+
- 0
|
|
14
|
+
- 1
|
|
15
|
+
remediation:
|
|
16
|
+
suggested_commands:
|
|
17
|
+
- markdownlint {target}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
id: mdformat.format
|
|
2
|
+
tool: mdformat
|
|
3
|
+
name: mdformat Check
|
|
4
|
+
description: Verify Markdown formatting without applying changes.
|
|
5
|
+
argv:
|
|
6
|
+
- --check
|
|
7
|
+
- '{target}'
|
|
8
|
+
parser: mdformat_text
|
|
9
|
+
success:
|
|
10
|
+
exit_codes:
|
|
11
|
+
- 0
|
|
12
|
+
remediation:
|
|
13
|
+
suggested_commands:
|
|
14
|
+
- mdformat {target}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
id: mutmut.run
|
|
2
|
+
tool: mutmut
|
|
3
|
+
name: Mutmut Mutation Testing
|
|
4
|
+
description: Run mutation tests (slow; requires [tool.mutmut] in pyproject.toml).
|
|
5
|
+
argv:
|
|
6
|
+
- run
|
|
7
|
+
parser: mutmut_text
|
|
8
|
+
success:
|
|
9
|
+
exit_codes: [0]
|
|
10
|
+
remediation:
|
|
11
|
+
suggested_commands:
|
|
12
|
+
- mutmut run
|
|
13
|
+
- mutmut results
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
id: pydeps.cycles
|
|
2
|
+
tool: pydeps
|
|
3
|
+
name: Pydeps Import Cycles
|
|
4
|
+
description: Fail when Python import cycles are detected.
|
|
5
|
+
argv:
|
|
6
|
+
- "{target}"
|
|
7
|
+
- --show-cycles
|
|
8
|
+
- --no-show
|
|
9
|
+
parser: pydeps_cycles_text
|
|
10
|
+
success:
|
|
11
|
+
exit_codes: [0, 1, 2]
|
|
12
|
+
remediation:
|
|
13
|
+
suggested_commands:
|
|
14
|
+
- pydeps {target} --show-cycles --no-show
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
id: pytest.coverage
|
|
2
|
+
tool: pytest
|
|
3
|
+
name: Pytest Coverage
|
|
4
|
+
description: Run tests with coverage floor enforcement.
|
|
5
|
+
argv:
|
|
6
|
+
- "{target}"
|
|
7
|
+
- --cov={cov}
|
|
8
|
+
- --cov-report=term-missing
|
|
9
|
+
- --cov-fail-under=80
|
|
10
|
+
- -q
|
|
11
|
+
parser: pytest_text
|
|
12
|
+
success:
|
|
13
|
+
exit_codes: [0]
|
|
14
|
+
policy:
|
|
15
|
+
min_coverage_percent: 80
|
|
16
|
+
coverage_source: src/
|
|
17
|
+
remediation:
|
|
18
|
+
suggested_commands:
|
|
19
|
+
- pytest {target} --cov={cov}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
id: radon.cc
|
|
2
|
+
tool: radon
|
|
3
|
+
name: Radon Cyclomatic Complexity
|
|
4
|
+
description: Fail when function complexity rank exceeds policy.
|
|
5
|
+
argv:
|
|
6
|
+
- cc
|
|
7
|
+
- "{target}"
|
|
8
|
+
- -j
|
|
9
|
+
parser: radon_cc_json
|
|
10
|
+
success:
|
|
11
|
+
exit_codes: [0]
|
|
12
|
+
policy:
|
|
13
|
+
max_complexity_rank: A
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
id: radon.mi
|
|
2
|
+
tool: radon
|
|
3
|
+
name: Radon Maintainability Index
|
|
4
|
+
description: Fail when module maintainability rank exceeds policy.
|
|
5
|
+
argv:
|
|
6
|
+
- mi
|
|
7
|
+
- "{target}"
|
|
8
|
+
- -j
|
|
9
|
+
parser: radon_mi_json
|
|
10
|
+
success:
|
|
11
|
+
exit_codes: [0]
|
|
12
|
+
policy:
|
|
13
|
+
max_complexity_rank: A
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
id: ruff.format
|
|
2
|
+
tool: ruff
|
|
3
|
+
name: Ruff Format Check
|
|
4
|
+
description: Verify Python formatting without applying changes.
|
|
5
|
+
argv:
|
|
6
|
+
- format
|
|
7
|
+
- --check
|
|
8
|
+
- "{target}"
|
|
9
|
+
parser: ruff_format_text
|
|
10
|
+
success:
|
|
11
|
+
exit_codes: [0]
|
|
12
|
+
remediation:
|
|
13
|
+
suggested_commands:
|
|
14
|
+
- ruff format {target}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
id: ruff.lint
|
|
2
|
+
tool: ruff
|
|
3
|
+
name: Ruff Lint
|
|
4
|
+
description: Run ruff check on Python sources.
|
|
5
|
+
argv:
|
|
6
|
+
- check
|
|
7
|
+
- "{target}"
|
|
8
|
+
- --output-format
|
|
9
|
+
- json
|
|
10
|
+
parser: ruff_json
|
|
11
|
+
success:
|
|
12
|
+
exit_codes: [0]
|
|
13
|
+
remediation:
|
|
14
|
+
suggested_commands:
|
|
15
|
+
- ruff check --fix {target}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
id: ruff.unused
|
|
2
|
+
tool: ruff
|
|
3
|
+
name: Ruff Unused Imports
|
|
4
|
+
description: Detect unused imports and variables (F401, F841).
|
|
5
|
+
argv:
|
|
6
|
+
- check
|
|
7
|
+
- "{target}"
|
|
8
|
+
- --select
|
|
9
|
+
- F401,F841
|
|
10
|
+
- --output-format
|
|
11
|
+
- json
|
|
12
|
+
parser: ruff_json
|
|
13
|
+
success:
|
|
14
|
+
exit_codes: [0]
|
|
15
|
+
remediation:
|
|
16
|
+
suggested_commands:
|
|
17
|
+
- ruff check --select F401,F841 --fix {target}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
id: semgrep.scan
|
|
2
|
+
tool: semgrep
|
|
3
|
+
name: Semgrep Scan
|
|
4
|
+
description: Static analysis for security and architecture patterns.
|
|
5
|
+
argv:
|
|
6
|
+
- scan
|
|
7
|
+
- --config
|
|
8
|
+
- "{config}"
|
|
9
|
+
- "{target}"
|
|
10
|
+
- --error
|
|
11
|
+
- --json
|
|
12
|
+
- --quiet
|
|
13
|
+
parser: semgrep_json
|
|
14
|
+
success:
|
|
15
|
+
exit_codes: [0, 1]
|
|
16
|
+
remediation:
|
|
17
|
+
suggested_commands:
|
|
18
|
+
- semgrep scan --config <rules> {target}
|