tempest-cli 0.1.0__py3-none-any.whl

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.
tempest_cli/py.typed ADDED
File without changes
@@ -0,0 +1,167 @@
1
+ Metadata-Version: 2.5
2
+ Name: tempest-cli
3
+ Version: 0.1.0
4
+ Summary: Framework-agnostic quality gate for Python projects: ruff + mypy + pytest behind one command, with a typing-strictness dial and a PR-description prompt generator.
5
+ Project-URL: Homepage, https://github.com/mauriciobenjamin700/tempest-cli
6
+ Project-URL: Repository, https://github.com/mauriciobenjamin700/tempest-cli
7
+ Project-URL: Issues, https://github.com/mauriciobenjamin700/tempest-cli/issues
8
+ Project-URL: Documentation, https://mauriciobenjamin700.github.io/tempest-cli/
9
+ Author-email: Mauricio Benjamin <mauricio.benjamin@reloverelations.com>
10
+ License: MIT
11
+ License-File: LICENSE
12
+ Keywords: cli,lint,mypy,pytest,quality,ruff,typing
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Environment :: Console
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Topic :: Software Development :: Quality Assurance
22
+ Classifier: Topic :: Utilities
23
+ Classifier: Typing :: Typed
24
+ Requires-Python: >=3.11
25
+ Requires-Dist: typer>=0.12.0
26
+ Provides-Extra: tools
27
+ Requires-Dist: mypy>=1.13.0; extra == 'tools'
28
+ Requires-Dist: pytest>=8.3.3; extra == 'tools'
29
+ Requires-Dist: ruff>=0.8.0; extra == 'tools'
30
+ Description-Content-Type: text/markdown
31
+
32
+ # tempest-cli
33
+
34
+ [![PyPI](https://img.shields.io/pypi/v/tempest-cli.svg)](https://pypi.org/project/tempest-cli/)
35
+ [![Python](https://img.shields.io/pypi/pyversions/tempest-cli.svg)](https://pypi.org/project/tempest-cli/)
36
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
37
+
38
+ **Documentação: [Português (BR)](https://mauriciobenjamin700.github.io/tempest-cli/) · [English (US)](https://mauriciobenjamin700.github.io/tempest-cli/en/)**
39
+
40
+ One command for the quality gate of any Python project — `ruff` +
41
+ `mypy` + `pytest`, with a typing-strictness dial that lives in your
42
+ `pyproject.toml` instead of in four different Makefile targets.
43
+
44
+ Framework-agnostic on purpose: Django, Flask, Litestar, FastAPI, a
45
+ library, a script. The only runtime dependency is `typer`.
46
+
47
+ ```bash
48
+ uv add --dev tempest-cli
49
+
50
+ tempest-cli check # lint + fmt-check + type + test, in order, stops at the first failure
51
+ tempest-cli fix # every ruff autofix, then format
52
+ tempest-cli type -s strict # override the configured strictness for one run
53
+ ```
54
+
55
+ ## Why it exists
56
+
57
+ The four commands are always the same, and every project rewrites them
58
+ slightly differently — a Makefile here, a `tox.ini` there, a CI job that
59
+ drifts from what runs locally. `tempest-cli check` is the same gate on
60
+ your machine and in CI, and `--strictness` makes "how much typing do we
61
+ enforce" a value in `pyproject.toml` rather than a flag someone
62
+ remembered to pass.
63
+
64
+ ## Commands
65
+
66
+ | Command | Runs |
67
+ | --- | --- |
68
+ | `tempest-cli lint` | `ruff check` |
69
+ | `tempest-cli fix` | `ruff check --fix` then `ruff format` (`--unsafe` for the risky autofixes) |
70
+ | `tempest-cli format` | `ruff format` (writes) |
71
+ | `tempest-cli fmt-check` | `ruff format --check` (read-only) |
72
+ | `tempest-cli type` | `mypy` |
73
+ | `tempest-cli test` | `pytest` |
74
+ | `tempest-cli check` | all four, in order, stopping at the first failure |
75
+ | `tempest-cli pr-prompt` | builds the prompt that makes an AI write this branch's PR description |
76
+
77
+ Every command takes an optional path (`tempest-cli lint src/`) and
78
+ returns the underlying tool's exit code, so CI reads it exactly as it
79
+ would read `ruff` directly.
80
+
81
+ ## Typing strictness
82
+
83
+ ```toml
84
+ [tool.tempest]
85
+ typing_strictness = "strict" # lenient | standard | strict
86
+ ```
87
+
88
+ The level **adds** flags on top of your own `[tool.ruff]` /
89
+ `[tool.mypy]` — it never relaxes what you already configured:
90
+
91
+ | Level | ruff (extra `ANN` rules) | mypy |
92
+ | --- | --- | --- |
93
+ | `lenient` | none | none |
94
+ | `standard` | `ANN001`, `ANN201`, `ANN202`, `ANN205`, `ANN206` | `--disallow-untyped-defs --disallow-incomplete-defs` |
95
+ | `strict` | the above plus `ANN204` | `--strict` |
96
+
97
+ `ANN401` is never enabled at any level: `Any` is a legitimate
98
+ annotation. The levels enforce that things *are* annotated, never that
99
+ they avoid `Any`.
100
+
101
+ Override per run with `--strictness` / `-s`. Absent config means
102
+ `standard`.
103
+
104
+ ## PR descriptions from the branch itself
105
+
106
+ ```bash
107
+ tempest-cli pr-prompt | claude -p
108
+ tempest-cli pr-prompt develop --lang en --out pr_prompt.txt
109
+ ```
110
+
111
+ The prompt carries the repository's own pull-request template (or a
112
+ bundled PT-BR / EN-US default), the rules that stop a model from handing
113
+ back the template with its placeholders intact, and the branch context:
114
+ commit subjects, changed files, and a bounded excerpt of each patch.
115
+
116
+ Diffs are read as `base...head` — the merge-base diff the forge shows —
117
+ so commits that landed on the base after the branch started are not
118
+ attributed to it. Whatever the bounds leave out is stated inside the
119
+ prompt, so a partial diff reads as partial.
120
+
121
+ ## Use it as a library
122
+
123
+ ```python
124
+ from tempest_cli import load_tempest_config, run_full_check
125
+
126
+ config = load_tempest_config()
127
+ exit_code = run_full_check(".", config=config)
128
+ ```
129
+
130
+ And to expose the same gate from your own CLI, without copying command
131
+ bodies:
132
+
133
+ ```python
134
+ import typer
135
+
136
+ from tempest_cli.main import register_commands
137
+
138
+ cli: typer.Typer = typer.Typer(name="mytool")
139
+ register_commands(cli)
140
+ ```
141
+
142
+ ## Installing the tools
143
+
144
+ `tempest-cli` shells out to whatever `ruff`, `mypy` and `pytest` it
145
+ finds — it does not pin them, so your project chooses the versions. To
146
+ install them alongside it:
147
+
148
+ ```bash
149
+ uv add --dev "tempest-cli[tools]"
150
+ ```
151
+
152
+ ## Relationship with tempest-fastapi-sdk
153
+
154
+ This package was extracted from
155
+ [`tempest-fastapi-sdk`](https://github.com/mauriciobenjamin700/tempest-fastapi-sdk),
156
+ where the same gate shipped as `tempest check`. Getting it meant
157
+ installing FastAPI, SQLAlchemy, Alembic and Pydantic — 38.7 MB of
158
+ dependencies and roughly 0.5 s of import time per invocation, for four
159
+ commands that never touch any of it.
160
+
161
+ `tempest check` keeps working: the SDK depends on this package and
162
+ registers the same commands. Both stay in sync because there is now one
163
+ implementation.
164
+
165
+ ## License
166
+
167
+ MIT — see [LICENSE](LICENSE).
@@ -0,0 +1,13 @@
1
+ tempest_cli/__init__.py,sha256=LvN9oRwItS9Z68-zjpEuhvIUnUb6AnMqVK-YsjGFqz0,2628
2
+ tempest_cli/config.py,sha256=dIdm4Nh9dx-N1ZjbUVOq05LVWlrmngfLrWb6Cj2_In8,5382
3
+ tempest_cli/lint.py,sha256=uh13CbkInk_6TjQlLono6Vey5DPlPRa1YTjxDmJhU6M,8067
4
+ tempest_cli/main.py,sha256=E-jkqJneheiiBNk5ywe9mAuyUo8kq3ui01B9vZn7aj0,14109
5
+ tempest_cli/pr_prompt.py,sha256=h_yKN0BZUWsCUjgRTG-9b2769vx5G8vPEJidf0NOTC4,26978
6
+ tempest_cli/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
+ tempest_cli/_templates/pull_request_template.en-US.md,sha256=NRUK5FGFhWrUDvRUwgxB7mtZW2wXWCUOX6ma2WiTH_Q,726
8
+ tempest_cli/_templates/pull_request_template.pt-BR.md,sha256=R48eC8UZPBEVdMLMtEWcF_WsKrNtt7brejEg0d-8JyY,819
9
+ tempest_cli-0.1.0.dist-info/METADATA,sha256=9YaPxtRLJNpHY5HKTy2p6wmZxHcpBof5WP-qUhxuJ9A,6276
10
+ tempest_cli-0.1.0.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
11
+ tempest_cli-0.1.0.dist-info/entry_points.txt,sha256=DFxenlpcHzP04SdHGnuZD3vkwK4J5DPs6eCNR32cvMc,54
12
+ tempest_cli-0.1.0.dist-info/licenses/LICENSE,sha256=YdgslpwuFZBPleHyVIyQ00pWfprH6kntVr3Oc5c98PA,1074
13
+ tempest_cli-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.32.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ tempest-cli = tempest_cli.main:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Mauricio Benjamin
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.