swarmauri_tests_griffe 0.2.1.dev3__tar.gz → 0.11.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.
- swarmauri_tests_griffe-0.11.0/NOTICE +7 -0
- swarmauri_tests_griffe-0.11.0/PKG-INFO +373 -0
- swarmauri_tests_griffe-0.11.0/README.md +341 -0
- swarmauri_tests_griffe-0.11.0/pyproject.toml +111 -0
- {swarmauri_tests_griffe-0.2.1.dev3 → swarmauri_tests_griffe-0.11.0}/swarmauri_tests_griffe/__init__.py +35 -16
- swarmauri_tests_griffe-0.2.1.dev3/PKG-INFO +0 -118
- swarmauri_tests_griffe-0.2.1.dev3/README.md +0 -86
- swarmauri_tests_griffe-0.2.1.dev3/pyproject.toml +0 -61
- {swarmauri_tests_griffe-0.2.1.dev3 → swarmauri_tests_griffe-0.11.0}/LICENSE +0 -0
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: swarmauri_tests_griffe
|
|
3
|
+
Version: 0.11.0
|
|
4
|
+
Summary: Pytest plugin that turns Griffe inspection warnings into failing quality gates for Swarmauri packages.
|
|
5
|
+
License-Expression: Apache-2.0
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
License-File: NOTICE
|
|
8
|
+
Keywords: swarmauri,pytest,griffe,static analysis,developer experience,quality gates,tests,plugin,turns,inspection,warnings,failing,quality,gates,packages
|
|
9
|
+
Author: Jacob Stewart
|
|
10
|
+
Author-email: jacob@swarmauri.com
|
|
11
|
+
Requires-Python: >=3.10,<3.15
|
|
12
|
+
Classifier: Development Status :: 1 - Planning
|
|
13
|
+
Classifier: Framework :: Pytest
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
16
|
+
Classifier: Natural Language :: English
|
|
17
|
+
Classifier: Development Status :: 3 - Alpha
|
|
18
|
+
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
|
19
|
+
Classifier: Programming Language :: Python
|
|
20
|
+
Classifier: Programming Language :: Python :: 3
|
|
21
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
26
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
27
|
+
Requires-Dist: griffe (>=0.48)
|
|
28
|
+
Requires-Dist: pytest (>=8.0)
|
|
29
|
+
Requires-Dist: tomli ; python_version < "3.11"
|
|
30
|
+
Description-Content-Type: text/markdown
|
|
31
|
+
|
|
32
|
+
# swarmauri_tests_griffe
|
|
33
|
+
|
|
34
|
+
<!-- readme-standards:begin branding -->
|
|
35
|
+
<p align="center"><a href="https://github.com/swarmauri/swarmauri-sdk"><img src="https://raw.githubusercontent.com/swarmauri/swarmauri-sdk/master/assets/swarmauri.brand.theme.svg" alt="Swarmauri SDK" width="300"></a></p>
|
|
36
|
+
<p align="center"><strong>swarmauri_tests_griffe</strong></p>
|
|
37
|
+
<p align="center">Pytest plugin that turns Griffe inspection warnings into failing quality gates for Swarmauri packages.</p>
|
|
38
|
+
<p align="center">
|
|
39
|
+
<a href="https://pypi.org/project/swarmauri_tests_griffe/"><img alt="pypi: swarmauri_tests_griffe" src="https://img.shields.io/pypi/v/swarmauri_tests_griffe?labelColor=1E293B&color=1D4ED8"></a>
|
|
40
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/pyproject.toml"><img alt="Source version: 0.11.0" src="https://img.shields.io/static/v1?label=Source%20version&message=0.11.0&labelColor=1E293B&color=4338CA"></a>
|
|
41
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/pyproject.toml"><img alt="Python: >=3.10,<3.15" src="https://img.shields.io/static/v1?label=Python&message=%3E%3D3.10%2C%3C3.15&labelColor=1E293B&color=0F766E"></a>
|
|
42
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/pyproject.toml"><img alt="Layer: community" src="https://img.shields.io/static/v1?label=Layer&message=community&labelColor=1E293B&color=6D28D9"></a>
|
|
43
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/README.md#lifecycle-and-migration"><img alt="Lifecycle: active" src="https://img.shields.io/static/v1?label=Lifecycle&message=active&labelColor=1E293B&color=166534"></a>
|
|
44
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/LICENSE"><img alt="License: Apache-2.0" src="https://img.shields.io/static/v1?label=License&message=Apache-2.0&labelColor=1E293B&color=86198F"></a>
|
|
45
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/NOTICE"><img alt="Notice: attribution" src="https://img.shields.io/static/v1?label=Notice&message=attribution&labelColor=1E293B&color=86198F"></a>
|
|
46
|
+
</p>
|
|
47
|
+
<p align="center">
|
|
48
|
+
<a href="https://pypi.org/project/swarmauri_tests_griffe/"><img alt="Monthly PyPI downloads: swarmauri_tests_griffe" src="https://img.shields.io/pypi/dm/swarmauri_tests_griffe?labelColor=1E293B&color=0E7490"></a>
|
|
49
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/README.md"><img alt="README hits: swarmauri_tests_griffe" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/pkgs/50-community/swarmauri_tests_griffe/README.md.svg?label=README%20hits&labelColor=1E293B&color=0E7490"></a>
|
|
50
|
+
</p>
|
|
51
|
+
<p align="center">
|
|
52
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml"><img alt="README standards: CI gate" src="https://img.shields.io/static/v1?label=README%20standards&message=CI%20gate&labelColor=1E293B&color=1D4ED8"></a>
|
|
53
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/tests/unit/test_readme_sources.py"><img alt="Tests: example source" src="https://img.shields.io/static/v1?label=Tests&message=example%20source&labelColor=1E293B&color=0F766E"></a>
|
|
54
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/README.md#certification-status"><img alt="Certification: not certified" src="https://img.shields.io/static/v1?label=Certification&message=not%20certified&labelColor=1E293B&color=92400E"></a>
|
|
55
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/tools/readme/POLICY.md"><img alt="Governance: repository policy" src="https://img.shields.io/static/v1?label=Governance&message=repository%20policy&labelColor=1E293B&color=4338CA"></a>
|
|
56
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml"><img alt="Evidence: source and CI" src="https://img.shields.io/static/v1?label=Evidence&message=source%20and%20CI&labelColor=1E293B&color=6D28D9"></a>
|
|
57
|
+
</p>
|
|
58
|
+
<p align="center"><a href="#overview">Overview</a> · <a href="#installation">Installation</a> · <a href="#quick-start">Quick Start</a> · <a href="#usage">Usage</a> · <a href="#public-api-and-import-surfaces">API</a> · <a href="#contributing">Contributing</a> · <a href="#governance">Governance</a> · <a href="#license">License</a></p>
|
|
59
|
+
<!-- readme-standards:end branding -->
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Overview
|
|
64
|
+
|
|
65
|
+
### Summary
|
|
66
|
+
|
|
67
|
+
`swarmauri_tests_griffe` is a [pytest](https://pytest.org) plugin that loads your
|
|
68
|
+
package metadata with [Griffe](https://github.com/mkdocstrings/griffe). The
|
|
69
|
+
plugin converts any warnings generated during inspection into failing tests so
|
|
70
|
+
that documentation, annotations, and runtime signatures stay in sync across the
|
|
71
|
+
Swarmauri ecosystem.
|
|
72
|
+
|
|
73
|
+
### Why This Package
|
|
74
|
+
|
|
75
|
+
`swarmauri_tests_griffe` isolates this responsibility: Pytest plugin that turns Griffe inspection warnings into failing quality gates for Swarmauri packages. Its [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/swarmauri_tests_griffe/__init__.py) exposes `GriffeTarget`, `GriffeWarningsItem`, `PLUGIN_NAME`, allowing consumers to select this package without treating adjacent packages as part of its public contract.
|
|
76
|
+
|
|
77
|
+
### When to Use
|
|
78
|
+
|
|
79
|
+
Choose `swarmauri_tests_griffe` when your integration needs pytest plugin that turns Griffe inspection warnings into failing quality gates for Swarmauri packages. Match the imports below to your application boundary and install its declared dependencies before using the example.
|
|
80
|
+
|
|
81
|
+
### Features
|
|
82
|
+
|
|
83
|
+
- **Python 3.10?3.12 coverage** ? verified across the supported Swarmauri
|
|
84
|
+
runtime range so you can keep consistent quality gates on every maintained
|
|
85
|
+
interpreter.
|
|
86
|
+
- **Warning-to-test enforcement** ? automatically escalates Griffe warnings to
|
|
87
|
+
failing pytest checks to stop documentation drift before it ships.
|
|
88
|
+
- **Zero-config discovery** ? the plugin registers as a pytest entry point and
|
|
89
|
+
loads without additional setup once installed.
|
|
90
|
+
- **Flexible targeting** ? tune the inspection scope with command-line flags or
|
|
91
|
+
persistent `pyproject.toml` settings.
|
|
92
|
+
|
|
93
|
+
### Non-Goals
|
|
94
|
+
|
|
95
|
+
`swarmauri_tests_griffe` owns pytest plugin that turns Griffe inspection warnings into failing quality gates for Swarmauri packages. Its imports do not by themselves configure credentials, deploy a service, or certify the behavior of its consumers. Dependencies and neighboring packages retain their own documented responsibilities.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Getting Started
|
|
100
|
+
|
|
101
|
+
### Prerequisites
|
|
102
|
+
|
|
103
|
+
Python `>=3.10,<3.15` is required. The [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/pyproject.toml) declares runtime dependencies including `pytest`, `griffe`, `tomli`. Read the example’s inputs and service requirements before execution.
|
|
104
|
+
|
|
105
|
+
### Installation
|
|
106
|
+
|
|
107
|
+
Choose the installer that best fits your workflow:
|
|
108
|
+
|
|
109
|
+
**Using uv**
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
uv add swarmauri-tests-griffe
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**Using pip**
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
pip install swarmauri-tests-griffe
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Both commands add the plugin as a dependency of your project. Because the plugin
|
|
122
|
+
uses pytest entry points, it is automatically discovered the next time your test
|
|
123
|
+
suite runs?no manual configuration required.
|
|
124
|
+
|
|
125
|
+
> **Supported Python versions:** The plugin is tested and published for Python
|
|
126
|
+
> 3.10, 3.11, and 3.12 across the Swarmauri platform.
|
|
127
|
+
|
|
128
|
+
#### uv
|
|
129
|
+
|
|
130
|
+
<!-- readme-standards:begin installation.uv -->
|
|
131
|
+
```bash
|
|
132
|
+
uv add swarmauri_tests_griffe
|
|
133
|
+
```
|
|
134
|
+
<!-- readme-standards:end installation.uv -->
|
|
135
|
+
|
|
136
|
+
#### pip
|
|
137
|
+
|
|
138
|
+
<!-- readme-standards:begin installation.pip -->
|
|
139
|
+
```bash
|
|
140
|
+
python -m pip install swarmauri_tests_griffe
|
|
141
|
+
```
|
|
142
|
+
<!-- readme-standards:end installation.pip -->
|
|
143
|
+
|
|
144
|
+
#### Poetry
|
|
145
|
+
|
|
146
|
+
<!-- readme-standards:begin installation.poetry -->
|
|
147
|
+
```bash
|
|
148
|
+
poetry add swarmauri_tests_griffe
|
|
149
|
+
```
|
|
150
|
+
<!-- readme-standards:end installation.poetry -->
|
|
151
|
+
|
|
152
|
+
### Quick Start
|
|
153
|
+
|
|
154
|
+
#### Example
|
|
155
|
+
|
|
156
|
+
<!-- readme-standards:begin example.quick-start -->
|
|
157
|
+
Source: [docs/readme/quick_start.sh](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/docs/readme/quick_start.sh).
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
pytest --griffe-package your_package --griffe-package another_package
|
|
161
|
+
```
|
|
162
|
+
<!-- readme-standards:end example.quick-start -->
|
|
163
|
+
|
|
164
|
+
#### Expected Result
|
|
165
|
+
|
|
166
|
+
The example demonstrates the documented `swarmauri_tests_griffe` source boundary or workflow. Complete its required configuration first. README CI checks the maintained source’s syntax and declarations; it does not claim that external services or the application workflow were exercised.
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Usage
|
|
171
|
+
|
|
172
|
+
### Common Workflows
|
|
173
|
+
|
|
174
|
+
<!-- readme-standards:begin example.usage -->
|
|
175
|
+
Source: [docs/readme/usage.sh](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/docs/readme/usage.sh).
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
pytest --griffe-package your_package --griffe-package another_package
|
|
179
|
+
```
|
|
180
|
+
<!-- readme-standards:end example.usage -->
|
|
181
|
+
|
|
182
|
+
After installation, execute your test suite as normal and a dynamic Griffe check
|
|
183
|
+
is injected for each configured package. By default, the package defined in
|
|
184
|
+
`pyproject.toml` is inspected. You can target additional packages or limit the
|
|
185
|
+
scope with command-line options:
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
Each `--griffe-package` argument adds a module to the inspection list. If
|
|
189
|
+
Griffe produces warnings while processing any module, the corresponding dynamic
|
|
190
|
+
test fails and the collected warnings are rendered in the pytest output, making
|
|
191
|
+
it easy to pinpoint the files that need attention.
|
|
192
|
+
|
|
193
|
+
**Configuring defaults**
|
|
194
|
+
|
|
195
|
+
For larger projects, keep the configuration in `pyproject.toml` to avoid
|
|
196
|
+
repeating command-line flags:
|
|
197
|
+
|
|
198
|
+
```toml
|
|
199
|
+
[tool.pytest.ini_options]
|
|
200
|
+
addopts = "--griffe-package swarmauri_core --griffe-package swarmauri_tests_griffe"
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
With the options saved, every pytest run enforces the same quality gates across
|
|
204
|
+
your codebase without extra setup.
|
|
205
|
+
|
|
206
|
+
### Configuration
|
|
207
|
+
|
|
208
|
+
Configure `swarmauri_tests_griffe` through the APIs in [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/swarmauri_tests_griffe/__init__.py); its [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/pyproject.toml) describes installation requirements, not an implicit service configuration. No additional package-global configuration contract is inferred from dependencies.
|
|
209
|
+
|
|
210
|
+
### Error Handling
|
|
211
|
+
|
|
212
|
+
The inspected `swarmauri_tests_griffe` source raises `AssertionError`, `pytest.UsageError`. Handle these at the calling boundary and consult the implementation for the triggering conditions.
|
|
213
|
+
|
|
214
|
+
### Best Practices
|
|
215
|
+
|
|
216
|
+
Use the explicit `swarmauri_tests_griffe` imports documented below and keep collaborator configuration with the caller. Run the package’s relevant tests after changing `GriffeTarget`, `GriffeWarningsItem`, `PLUGIN_NAME`; an import or successful installation alone does not establish its runtime guarantees.
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## Package Boundary
|
|
221
|
+
|
|
222
|
+
### What It Owns
|
|
223
|
+
|
|
224
|
+
`swarmauri_tests_griffe` is located in `community` and owns pytest plugin that turns Griffe inspection warnings into failing quality gates for Swarmauri packages. Source-declared APIs include `GriffeTarget`, `GriffeWarningsItem`, `PLUGIN_NAME`. The [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/pyproject.toml) records its direct dependency boundary.
|
|
225
|
+
|
|
226
|
+
### Public API and Import Surfaces
|
|
227
|
+
|
|
228
|
+
Import namespace: `swarmauri_tests_griffe`.
|
|
229
|
+
|
|
230
|
+
Source-declared exports or types: `GriffeTarget`, `GriffeWarningsItem`, `PLUGIN_NAME`.
|
|
231
|
+
|
|
232
|
+
Inspect [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/swarmauri_tests_griffe/__init__.py) for exact signatures; this inventory does not designate every internal module as stable.
|
|
233
|
+
|
|
234
|
+
### Entry Points
|
|
235
|
+
|
|
236
|
+
<!-- readme-standards:begin entry-points -->
|
|
237
|
+
- `pytest11` → `swarmauri_tests_griffe` → `swarmauri_tests_griffe`
|
|
238
|
+
<!-- readme-standards:end entry-points -->
|
|
239
|
+
|
|
240
|
+
### Injected Dependencies
|
|
241
|
+
|
|
242
|
+
The direct installation dependencies of `swarmauri_tests_griffe` are `pytest`, `griffe`, `tomli`. These declarations do not imply automatic provider selection. Pass collaborators through the explicit constructors or call signatures in [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/swarmauri_tests_griffe/__init__.py).
|
|
243
|
+
|
|
244
|
+
### Protocol Consumers
|
|
245
|
+
|
|
246
|
+
No direct package-manifest dependency on `swarmauri_tests_griffe` was found in the audited three-repository inventory. External consumers may still use its documented imports or commands.
|
|
247
|
+
|
|
248
|
+
### Extensions
|
|
249
|
+
|
|
250
|
+
For `swarmauri_tests_griffe`, use the source-declared public interfaces (`GriffeTarget`, `GriffeWarningsItem`, `PLUGIN_NAME`) when composing or extending behavior. Its entry-point section below is authoritative for registered plugins; no additional extension loader is inferred from the package name.
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## Operations and Readiness
|
|
255
|
+
|
|
256
|
+
### Operational Requirements
|
|
257
|
+
|
|
258
|
+
Operate `swarmauri_tests_griffe` according to its actual entry points and collaborators. The dependency and Python requirements in the [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/pyproject.toml) are prerequisites; deployment topology, credentials, and readiness remain the responsibility of the consuming application unless explicitly documented above.
|
|
259
|
+
|
|
260
|
+
### Health and Observability
|
|
261
|
+
|
|
262
|
+
This README does not establish a standalone health endpoint for `swarmauri_tests_griffe`. Observe the concrete caller’s results, exceptions, and existing test reports. An application that embeds this package must define its own health and telemetry contract.
|
|
263
|
+
|
|
264
|
+
### Security and Resource Limits
|
|
265
|
+
|
|
266
|
+
Apply the input, credential, and resource constraints implemented in [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/swarmauri_tests_griffe/__init__.py). The `swarmauri_tests_griffe` README gate is a documentation check, not a security review or a substitute for the implementation’s limits and caller authorization.
|
|
267
|
+
|
|
268
|
+
### Compatibility
|
|
269
|
+
|
|
270
|
+
This source version of `swarmauri_tests_griffe` declares Python `>=3.10,<3.15`. Consult its dependency constraints before upgrading. Source-version and registry-version badges have separate meanings; this migration makes no additional platform or interoperability certification claim.
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
## Verification
|
|
275
|
+
|
|
276
|
+
### Tests
|
|
277
|
+
|
|
278
|
+
Run `python -m pytest tests/unit/test_readme_sources.py` from the `swarmauri_tests_griffe` package directory for the maintained example source checks (Python compilation and non-Python file presence). Existing package tests include:
|
|
279
|
+
|
|
280
|
+
- [tests/test_plugin.py](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/tests/test_plugin.py)
|
|
281
|
+
|
|
282
|
+
The repository README gate also checks the required heading tree, metadata, managed fragments, and referenced files.
|
|
283
|
+
|
|
284
|
+
### Certification Status
|
|
285
|
+
|
|
286
|
+
No external certification is asserted for `swarmauri_tests_griffe` by this documentation migration. README conformance, example syntax, runtime tests, and protocol or security certification are distinct evidence scopes.
|
|
287
|
+
|
|
288
|
+
### Evidence
|
|
289
|
+
|
|
290
|
+
The [README standards CI](https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml) records mechanical documentation results for its tested commit. The [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/swarmauri_tests_griffe/__init__.py) and example sources support the package-boundary description; external runtime behavior requires its own test evidence.
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## FAQ
|
|
295
|
+
|
|
296
|
+
### Why
|
|
297
|
+
|
|
298
|
+
**Why select this package?** `swarmauri_tests_griffe` provides pytest plugin that turns Griffe inspection warnings into failing quality gates for Swarmauri packages; use its own API boundary rather than assuming neighboring packages are bundled or configured automatically.
|
|
299
|
+
|
|
300
|
+
### How
|
|
301
|
+
|
|
302
|
+
**How do I start?** Install or synchronize the environment under Getting Started, follow the maintained example for `swarmauri_tests_griffe`, and consult [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/swarmauri_tests_griffe/__init__.py) for the exact types and signatures involved.
|
|
303
|
+
|
|
304
|
+
### When
|
|
305
|
+
|
|
306
|
+
**When should I validate an upgrade?** Recheck `swarmauri_tests_griffe` whenever its source version, declared collaborators, configuration, or caller changes. Run relevant behavioral tests in addition to the README gate before promotion.
|
|
307
|
+
|
|
308
|
+
---
|
|
309
|
+
|
|
310
|
+
## Documentation and Related Packages
|
|
311
|
+
|
|
312
|
+
### More Documentation
|
|
313
|
+
|
|
314
|
+
The [repository contribution guide](https://github.com/swarmauri/swarmauri-sdk/blob/master/CONTRIBUTING.md), [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/swarmauri_tests_griffe/__init__.py), and [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/pyproject.toml) provide the supporting context for `swarmauri_tests_griffe`. The [README policy](https://github.com/groupsum/readme-standards/blob/master/docs/outline.md) defines the common document structure.
|
|
315
|
+
|
|
316
|
+
### Related Packages
|
|
317
|
+
|
|
318
|
+
No direct local dependency was identified for `swarmauri_tests_griffe` in this checkout. External dependency names are listed under Prerequisites; packages in the same directory layer are not automatically dependencies.
|
|
319
|
+
|
|
320
|
+
### Project Links
|
|
321
|
+
|
|
322
|
+
<!-- readme-standards:begin project-links -->
|
|
323
|
+
- [pypi: swarmauri_tests_griffe](https://pypi.org/project/swarmauri_tests_griffe/)
|
|
324
|
+
<!-- readme-standards:end project-links -->
|
|
325
|
+
|
|
326
|
+
---
|
|
327
|
+
|
|
328
|
+
## Contributing
|
|
329
|
+
|
|
330
|
+
### How to Contribute
|
|
331
|
+
|
|
332
|
+
Follow the [contribution guide](https://github.com/swarmauri/swarmauri-sdk/blob/master/CONTRIBUTING.md) and include a focused example or regression for changes to `swarmauri_tests_griffe`. Keep package behavior, its documented boundary, and its tests aligned.
|
|
333
|
+
|
|
334
|
+
### Development Setup
|
|
335
|
+
|
|
336
|
+
Work from the `pkgs/50-community/swarmauri_tests_griffe` checkout. Synchronize its declared development environment with uv, then run the relevant package tests and `python -m pytest tests/unit/test_readme_sources.py`. The repository’s dedicated README job installs `readme-standards==0.1.3` without resolving unrelated runtime packages.
|
|
337
|
+
|
|
338
|
+
### Notes for Maintainers
|
|
339
|
+
|
|
340
|
+
Edit authored prose directly in this `swarmauri_tests_griffe` README. Update source examples in `docs/readme/`, then run `readme-standards render --root . --write` from the package directory and review the diff. Required headings and generated blocks come from package-guide-v1.
|
|
341
|
+
|
|
342
|
+
---
|
|
343
|
+
|
|
344
|
+
## Governance
|
|
345
|
+
|
|
346
|
+
### Ownership and Decision Making
|
|
347
|
+
|
|
348
|
+
Changes to `swarmauri_tests_griffe` follow the maintainer review process of [swarmauri/swarmauri-sdk](https://github.com/swarmauri/swarmauri-sdk) and its contribution guide. Author attribution remains in the [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/pyproject.toml); this README does not assign new publishing or administrative authority.
|
|
349
|
+
|
|
350
|
+
### Standards and Policies
|
|
351
|
+
|
|
352
|
+
`swarmauri_tests_griffe` follows the versioned [package-guide-v1 outline](https://github.com/groupsum/readme-standards/blob/master/docs/outline.md). All fixed headings, hierarchy, order, separators, and package-specific branding are checked by CI; reviewers assess the accuracy and usefulness of authored claims.
|
|
353
|
+
|
|
354
|
+
### Lifecycle and Migration
|
|
355
|
+
|
|
356
|
+
The `swarmauri_tests_griffe` source version is `0.11.0`.
|
|
357
|
+
|
|
358
|
+
---
|
|
359
|
+
|
|
360
|
+
## License and Attribution
|
|
361
|
+
|
|
362
|
+
### License
|
|
363
|
+
|
|
364
|
+
<!-- readme-standards:begin license -->
|
|
365
|
+
Licensed under `Apache-2.0`. See [LICENSE](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/LICENSE).
|
|
366
|
+
<!-- readme-standards:end license -->
|
|
367
|
+
|
|
368
|
+
### Notices
|
|
369
|
+
|
|
370
|
+
<!-- readme-standards:begin notices -->
|
|
371
|
+
See [NOTICE](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/NOTICE) for attribution.
|
|
372
|
+
<!-- readme-standards:end notices -->
|
|
373
|
+
|
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
# swarmauri_tests_griffe
|
|
2
|
+
|
|
3
|
+
<!-- readme-standards:begin branding -->
|
|
4
|
+
<p align="center"><a href="https://github.com/swarmauri/swarmauri-sdk"><img src="https://raw.githubusercontent.com/swarmauri/swarmauri-sdk/master/assets/swarmauri.brand.theme.svg" alt="Swarmauri SDK" width="300"></a></p>
|
|
5
|
+
<p align="center"><strong>swarmauri_tests_griffe</strong></p>
|
|
6
|
+
<p align="center">Pytest plugin that turns Griffe inspection warnings into failing quality gates for Swarmauri packages.</p>
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://pypi.org/project/swarmauri_tests_griffe/"><img alt="pypi: swarmauri_tests_griffe" src="https://img.shields.io/pypi/v/swarmauri_tests_griffe?labelColor=1E293B&color=1D4ED8"></a>
|
|
9
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/pyproject.toml"><img alt="Source version: 0.11.0" src="https://img.shields.io/static/v1?label=Source%20version&message=0.11.0&labelColor=1E293B&color=4338CA"></a>
|
|
10
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/pyproject.toml"><img alt="Python: >=3.10,<3.15" src="https://img.shields.io/static/v1?label=Python&message=%3E%3D3.10%2C%3C3.15&labelColor=1E293B&color=0F766E"></a>
|
|
11
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/pyproject.toml"><img alt="Layer: community" src="https://img.shields.io/static/v1?label=Layer&message=community&labelColor=1E293B&color=6D28D9"></a>
|
|
12
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/README.md#lifecycle-and-migration"><img alt="Lifecycle: active" src="https://img.shields.io/static/v1?label=Lifecycle&message=active&labelColor=1E293B&color=166534"></a>
|
|
13
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/LICENSE"><img alt="License: Apache-2.0" src="https://img.shields.io/static/v1?label=License&message=Apache-2.0&labelColor=1E293B&color=86198F"></a>
|
|
14
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/NOTICE"><img alt="Notice: attribution" src="https://img.shields.io/static/v1?label=Notice&message=attribution&labelColor=1E293B&color=86198F"></a>
|
|
15
|
+
</p>
|
|
16
|
+
<p align="center">
|
|
17
|
+
<a href="https://pypi.org/project/swarmauri_tests_griffe/"><img alt="Monthly PyPI downloads: swarmauri_tests_griffe" src="https://img.shields.io/pypi/dm/swarmauri_tests_griffe?labelColor=1E293B&color=0E7490"></a>
|
|
18
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/README.md"><img alt="README hits: swarmauri_tests_griffe" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/pkgs/50-community/swarmauri_tests_griffe/README.md.svg?label=README%20hits&labelColor=1E293B&color=0E7490"></a>
|
|
19
|
+
</p>
|
|
20
|
+
<p align="center">
|
|
21
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml"><img alt="README standards: CI gate" src="https://img.shields.io/static/v1?label=README%20standards&message=CI%20gate&labelColor=1E293B&color=1D4ED8"></a>
|
|
22
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/tests/unit/test_readme_sources.py"><img alt="Tests: example source" src="https://img.shields.io/static/v1?label=Tests&message=example%20source&labelColor=1E293B&color=0F766E"></a>
|
|
23
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/README.md#certification-status"><img alt="Certification: not certified" src="https://img.shields.io/static/v1?label=Certification&message=not%20certified&labelColor=1E293B&color=92400E"></a>
|
|
24
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/tools/readme/POLICY.md"><img alt="Governance: repository policy" src="https://img.shields.io/static/v1?label=Governance&message=repository%20policy&labelColor=1E293B&color=4338CA"></a>
|
|
25
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml"><img alt="Evidence: source and CI" src="https://img.shields.io/static/v1?label=Evidence&message=source%20and%20CI&labelColor=1E293B&color=6D28D9"></a>
|
|
26
|
+
</p>
|
|
27
|
+
<p align="center"><a href="#overview">Overview</a> · <a href="#installation">Installation</a> · <a href="#quick-start">Quick Start</a> · <a href="#usage">Usage</a> · <a href="#public-api-and-import-surfaces">API</a> · <a href="#contributing">Contributing</a> · <a href="#governance">Governance</a> · <a href="#license">License</a></p>
|
|
28
|
+
<!-- readme-standards:end branding -->
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Overview
|
|
33
|
+
|
|
34
|
+
### Summary
|
|
35
|
+
|
|
36
|
+
`swarmauri_tests_griffe` is a [pytest](https://pytest.org) plugin that loads your
|
|
37
|
+
package metadata with [Griffe](https://github.com/mkdocstrings/griffe). The
|
|
38
|
+
plugin converts any warnings generated during inspection into failing tests so
|
|
39
|
+
that documentation, annotations, and runtime signatures stay in sync across the
|
|
40
|
+
Swarmauri ecosystem.
|
|
41
|
+
|
|
42
|
+
### Why This Package
|
|
43
|
+
|
|
44
|
+
`swarmauri_tests_griffe` isolates this responsibility: Pytest plugin that turns Griffe inspection warnings into failing quality gates for Swarmauri packages. Its [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/swarmauri_tests_griffe/__init__.py) exposes `GriffeTarget`, `GriffeWarningsItem`, `PLUGIN_NAME`, allowing consumers to select this package without treating adjacent packages as part of its public contract.
|
|
45
|
+
|
|
46
|
+
### When to Use
|
|
47
|
+
|
|
48
|
+
Choose `swarmauri_tests_griffe` when your integration needs pytest plugin that turns Griffe inspection warnings into failing quality gates for Swarmauri packages. Match the imports below to your application boundary and install its declared dependencies before using the example.
|
|
49
|
+
|
|
50
|
+
### Features
|
|
51
|
+
|
|
52
|
+
- **Python 3.10?3.12 coverage** ? verified across the supported Swarmauri
|
|
53
|
+
runtime range so you can keep consistent quality gates on every maintained
|
|
54
|
+
interpreter.
|
|
55
|
+
- **Warning-to-test enforcement** ? automatically escalates Griffe warnings to
|
|
56
|
+
failing pytest checks to stop documentation drift before it ships.
|
|
57
|
+
- **Zero-config discovery** ? the plugin registers as a pytest entry point and
|
|
58
|
+
loads without additional setup once installed.
|
|
59
|
+
- **Flexible targeting** ? tune the inspection scope with command-line flags or
|
|
60
|
+
persistent `pyproject.toml` settings.
|
|
61
|
+
|
|
62
|
+
### Non-Goals
|
|
63
|
+
|
|
64
|
+
`swarmauri_tests_griffe` owns pytest plugin that turns Griffe inspection warnings into failing quality gates for Swarmauri packages. Its imports do not by themselves configure credentials, deploy a service, or certify the behavior of its consumers. Dependencies and neighboring packages retain their own documented responsibilities.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Getting Started
|
|
69
|
+
|
|
70
|
+
### Prerequisites
|
|
71
|
+
|
|
72
|
+
Python `>=3.10,<3.15` is required. The [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/pyproject.toml) declares runtime dependencies including `pytest`, `griffe`, `tomli`. Read the example’s inputs and service requirements before execution.
|
|
73
|
+
|
|
74
|
+
### Installation
|
|
75
|
+
|
|
76
|
+
Choose the installer that best fits your workflow:
|
|
77
|
+
|
|
78
|
+
**Using uv**
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
uv add swarmauri-tests-griffe
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Using pip**
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
pip install swarmauri-tests-griffe
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Both commands add the plugin as a dependency of your project. Because the plugin
|
|
91
|
+
uses pytest entry points, it is automatically discovered the next time your test
|
|
92
|
+
suite runs?no manual configuration required.
|
|
93
|
+
|
|
94
|
+
> **Supported Python versions:** The plugin is tested and published for Python
|
|
95
|
+
> 3.10, 3.11, and 3.12 across the Swarmauri platform.
|
|
96
|
+
|
|
97
|
+
#### uv
|
|
98
|
+
|
|
99
|
+
<!-- readme-standards:begin installation.uv -->
|
|
100
|
+
```bash
|
|
101
|
+
uv add swarmauri_tests_griffe
|
|
102
|
+
```
|
|
103
|
+
<!-- readme-standards:end installation.uv -->
|
|
104
|
+
|
|
105
|
+
#### pip
|
|
106
|
+
|
|
107
|
+
<!-- readme-standards:begin installation.pip -->
|
|
108
|
+
```bash
|
|
109
|
+
python -m pip install swarmauri_tests_griffe
|
|
110
|
+
```
|
|
111
|
+
<!-- readme-standards:end installation.pip -->
|
|
112
|
+
|
|
113
|
+
#### Poetry
|
|
114
|
+
|
|
115
|
+
<!-- readme-standards:begin installation.poetry -->
|
|
116
|
+
```bash
|
|
117
|
+
poetry add swarmauri_tests_griffe
|
|
118
|
+
```
|
|
119
|
+
<!-- readme-standards:end installation.poetry -->
|
|
120
|
+
|
|
121
|
+
### Quick Start
|
|
122
|
+
|
|
123
|
+
#### Example
|
|
124
|
+
|
|
125
|
+
<!-- readme-standards:begin example.quick-start -->
|
|
126
|
+
Source: [docs/readme/quick_start.sh](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/docs/readme/quick_start.sh).
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
pytest --griffe-package your_package --griffe-package another_package
|
|
130
|
+
```
|
|
131
|
+
<!-- readme-standards:end example.quick-start -->
|
|
132
|
+
|
|
133
|
+
#### Expected Result
|
|
134
|
+
|
|
135
|
+
The example demonstrates the documented `swarmauri_tests_griffe` source boundary or workflow. Complete its required configuration first. README CI checks the maintained source’s syntax and declarations; it does not claim that external services or the application workflow were exercised.
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Usage
|
|
140
|
+
|
|
141
|
+
### Common Workflows
|
|
142
|
+
|
|
143
|
+
<!-- readme-standards:begin example.usage -->
|
|
144
|
+
Source: [docs/readme/usage.sh](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/docs/readme/usage.sh).
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
pytest --griffe-package your_package --griffe-package another_package
|
|
148
|
+
```
|
|
149
|
+
<!-- readme-standards:end example.usage -->
|
|
150
|
+
|
|
151
|
+
After installation, execute your test suite as normal and a dynamic Griffe check
|
|
152
|
+
is injected for each configured package. By default, the package defined in
|
|
153
|
+
`pyproject.toml` is inspected. You can target additional packages or limit the
|
|
154
|
+
scope with command-line options:
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
Each `--griffe-package` argument adds a module to the inspection list. If
|
|
158
|
+
Griffe produces warnings while processing any module, the corresponding dynamic
|
|
159
|
+
test fails and the collected warnings are rendered in the pytest output, making
|
|
160
|
+
it easy to pinpoint the files that need attention.
|
|
161
|
+
|
|
162
|
+
**Configuring defaults**
|
|
163
|
+
|
|
164
|
+
For larger projects, keep the configuration in `pyproject.toml` to avoid
|
|
165
|
+
repeating command-line flags:
|
|
166
|
+
|
|
167
|
+
```toml
|
|
168
|
+
[tool.pytest.ini_options]
|
|
169
|
+
addopts = "--griffe-package swarmauri_core --griffe-package swarmauri_tests_griffe"
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
With the options saved, every pytest run enforces the same quality gates across
|
|
173
|
+
your codebase without extra setup.
|
|
174
|
+
|
|
175
|
+
### Configuration
|
|
176
|
+
|
|
177
|
+
Configure `swarmauri_tests_griffe` through the APIs in [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/swarmauri_tests_griffe/__init__.py); its [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/pyproject.toml) describes installation requirements, not an implicit service configuration. No additional package-global configuration contract is inferred from dependencies.
|
|
178
|
+
|
|
179
|
+
### Error Handling
|
|
180
|
+
|
|
181
|
+
The inspected `swarmauri_tests_griffe` source raises `AssertionError`, `pytest.UsageError`. Handle these at the calling boundary and consult the implementation for the triggering conditions.
|
|
182
|
+
|
|
183
|
+
### Best Practices
|
|
184
|
+
|
|
185
|
+
Use the explicit `swarmauri_tests_griffe` imports documented below and keep collaborator configuration with the caller. Run the package’s relevant tests after changing `GriffeTarget`, `GriffeWarningsItem`, `PLUGIN_NAME`; an import or successful installation alone does not establish its runtime guarantees.
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## Package Boundary
|
|
190
|
+
|
|
191
|
+
### What It Owns
|
|
192
|
+
|
|
193
|
+
`swarmauri_tests_griffe` is located in `community` and owns pytest plugin that turns Griffe inspection warnings into failing quality gates for Swarmauri packages. Source-declared APIs include `GriffeTarget`, `GriffeWarningsItem`, `PLUGIN_NAME`. The [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/pyproject.toml) records its direct dependency boundary.
|
|
194
|
+
|
|
195
|
+
### Public API and Import Surfaces
|
|
196
|
+
|
|
197
|
+
Import namespace: `swarmauri_tests_griffe`.
|
|
198
|
+
|
|
199
|
+
Source-declared exports or types: `GriffeTarget`, `GriffeWarningsItem`, `PLUGIN_NAME`.
|
|
200
|
+
|
|
201
|
+
Inspect [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/swarmauri_tests_griffe/__init__.py) for exact signatures; this inventory does not designate every internal module as stable.
|
|
202
|
+
|
|
203
|
+
### Entry Points
|
|
204
|
+
|
|
205
|
+
<!-- readme-standards:begin entry-points -->
|
|
206
|
+
- `pytest11` → `swarmauri_tests_griffe` → `swarmauri_tests_griffe`
|
|
207
|
+
<!-- readme-standards:end entry-points -->
|
|
208
|
+
|
|
209
|
+
### Injected Dependencies
|
|
210
|
+
|
|
211
|
+
The direct installation dependencies of `swarmauri_tests_griffe` are `pytest`, `griffe`, `tomli`. These declarations do not imply automatic provider selection. Pass collaborators through the explicit constructors or call signatures in [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/swarmauri_tests_griffe/__init__.py).
|
|
212
|
+
|
|
213
|
+
### Protocol Consumers
|
|
214
|
+
|
|
215
|
+
No direct package-manifest dependency on `swarmauri_tests_griffe` was found in the audited three-repository inventory. External consumers may still use its documented imports or commands.
|
|
216
|
+
|
|
217
|
+
### Extensions
|
|
218
|
+
|
|
219
|
+
For `swarmauri_tests_griffe`, use the source-declared public interfaces (`GriffeTarget`, `GriffeWarningsItem`, `PLUGIN_NAME`) when composing or extending behavior. Its entry-point section below is authoritative for registered plugins; no additional extension loader is inferred from the package name.
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## Operations and Readiness
|
|
224
|
+
|
|
225
|
+
### Operational Requirements
|
|
226
|
+
|
|
227
|
+
Operate `swarmauri_tests_griffe` according to its actual entry points and collaborators. The dependency and Python requirements in the [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/pyproject.toml) are prerequisites; deployment topology, credentials, and readiness remain the responsibility of the consuming application unless explicitly documented above.
|
|
228
|
+
|
|
229
|
+
### Health and Observability
|
|
230
|
+
|
|
231
|
+
This README does not establish a standalone health endpoint for `swarmauri_tests_griffe`. Observe the concrete caller’s results, exceptions, and existing test reports. An application that embeds this package must define its own health and telemetry contract.
|
|
232
|
+
|
|
233
|
+
### Security and Resource Limits
|
|
234
|
+
|
|
235
|
+
Apply the input, credential, and resource constraints implemented in [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/swarmauri_tests_griffe/__init__.py). The `swarmauri_tests_griffe` README gate is a documentation check, not a security review or a substitute for the implementation’s limits and caller authorization.
|
|
236
|
+
|
|
237
|
+
### Compatibility
|
|
238
|
+
|
|
239
|
+
This source version of `swarmauri_tests_griffe` declares Python `>=3.10,<3.15`. Consult its dependency constraints before upgrading. Source-version and registry-version badges have separate meanings; this migration makes no additional platform or interoperability certification claim.
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## Verification
|
|
244
|
+
|
|
245
|
+
### Tests
|
|
246
|
+
|
|
247
|
+
Run `python -m pytest tests/unit/test_readme_sources.py` from the `swarmauri_tests_griffe` package directory for the maintained example source checks (Python compilation and non-Python file presence). Existing package tests include:
|
|
248
|
+
|
|
249
|
+
- [tests/test_plugin.py](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/tests/test_plugin.py)
|
|
250
|
+
|
|
251
|
+
The repository README gate also checks the required heading tree, metadata, managed fragments, and referenced files.
|
|
252
|
+
|
|
253
|
+
### Certification Status
|
|
254
|
+
|
|
255
|
+
No external certification is asserted for `swarmauri_tests_griffe` by this documentation migration. README conformance, example syntax, runtime tests, and protocol or security certification are distinct evidence scopes.
|
|
256
|
+
|
|
257
|
+
### Evidence
|
|
258
|
+
|
|
259
|
+
The [README standards CI](https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml) records mechanical documentation results for its tested commit. The [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/swarmauri_tests_griffe/__init__.py) and example sources support the package-boundary description; external runtime behavior requires its own test evidence.
|
|
260
|
+
|
|
261
|
+
---
|
|
262
|
+
|
|
263
|
+
## FAQ
|
|
264
|
+
|
|
265
|
+
### Why
|
|
266
|
+
|
|
267
|
+
**Why select this package?** `swarmauri_tests_griffe` provides pytest plugin that turns Griffe inspection warnings into failing quality gates for Swarmauri packages; use its own API boundary rather than assuming neighboring packages are bundled or configured automatically.
|
|
268
|
+
|
|
269
|
+
### How
|
|
270
|
+
|
|
271
|
+
**How do I start?** Install or synchronize the environment under Getting Started, follow the maintained example for `swarmauri_tests_griffe`, and consult [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/swarmauri_tests_griffe/__init__.py) for the exact types and signatures involved.
|
|
272
|
+
|
|
273
|
+
### When
|
|
274
|
+
|
|
275
|
+
**When should I validate an upgrade?** Recheck `swarmauri_tests_griffe` whenever its source version, declared collaborators, configuration, or caller changes. Run relevant behavioral tests in addition to the README gate before promotion.
|
|
276
|
+
|
|
277
|
+
---
|
|
278
|
+
|
|
279
|
+
## Documentation and Related Packages
|
|
280
|
+
|
|
281
|
+
### More Documentation
|
|
282
|
+
|
|
283
|
+
The [repository contribution guide](https://github.com/swarmauri/swarmauri-sdk/blob/master/CONTRIBUTING.md), [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/swarmauri_tests_griffe/__init__.py), and [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/pyproject.toml) provide the supporting context for `swarmauri_tests_griffe`. The [README policy](https://github.com/groupsum/readme-standards/blob/master/docs/outline.md) defines the common document structure.
|
|
284
|
+
|
|
285
|
+
### Related Packages
|
|
286
|
+
|
|
287
|
+
No direct local dependency was identified for `swarmauri_tests_griffe` in this checkout. External dependency names are listed under Prerequisites; packages in the same directory layer are not automatically dependencies.
|
|
288
|
+
|
|
289
|
+
### Project Links
|
|
290
|
+
|
|
291
|
+
<!-- readme-standards:begin project-links -->
|
|
292
|
+
- [pypi: swarmauri_tests_griffe](https://pypi.org/project/swarmauri_tests_griffe/)
|
|
293
|
+
<!-- readme-standards:end project-links -->
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## Contributing
|
|
298
|
+
|
|
299
|
+
### How to Contribute
|
|
300
|
+
|
|
301
|
+
Follow the [contribution guide](https://github.com/swarmauri/swarmauri-sdk/blob/master/CONTRIBUTING.md) and include a focused example or regression for changes to `swarmauri_tests_griffe`. Keep package behavior, its documented boundary, and its tests aligned.
|
|
302
|
+
|
|
303
|
+
### Development Setup
|
|
304
|
+
|
|
305
|
+
Work from the `pkgs/50-community/swarmauri_tests_griffe` checkout. Synchronize its declared development environment with uv, then run the relevant package tests and `python -m pytest tests/unit/test_readme_sources.py`. The repository’s dedicated README job installs `readme-standards==0.1.3` without resolving unrelated runtime packages.
|
|
306
|
+
|
|
307
|
+
### Notes for Maintainers
|
|
308
|
+
|
|
309
|
+
Edit authored prose directly in this `swarmauri_tests_griffe` README. Update source examples in `docs/readme/`, then run `readme-standards render --root . --write` from the package directory and review the diff. Required headings and generated blocks come from package-guide-v1.
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
313
|
+
## Governance
|
|
314
|
+
|
|
315
|
+
### Ownership and Decision Making
|
|
316
|
+
|
|
317
|
+
Changes to `swarmauri_tests_griffe` follow the maintainer review process of [swarmauri/swarmauri-sdk](https://github.com/swarmauri/swarmauri-sdk) and its contribution guide. Author attribution remains in the [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/pyproject.toml); this README does not assign new publishing or administrative authority.
|
|
318
|
+
|
|
319
|
+
### Standards and Policies
|
|
320
|
+
|
|
321
|
+
`swarmauri_tests_griffe` follows the versioned [package-guide-v1 outline](https://github.com/groupsum/readme-standards/blob/master/docs/outline.md). All fixed headings, hierarchy, order, separators, and package-specific branding are checked by CI; reviewers assess the accuracy and usefulness of authored claims.
|
|
322
|
+
|
|
323
|
+
### Lifecycle and Migration
|
|
324
|
+
|
|
325
|
+
The `swarmauri_tests_griffe` source version is `0.11.0`.
|
|
326
|
+
|
|
327
|
+
---
|
|
328
|
+
|
|
329
|
+
## License and Attribution
|
|
330
|
+
|
|
331
|
+
### License
|
|
332
|
+
|
|
333
|
+
<!-- readme-standards:begin license -->
|
|
334
|
+
Licensed under `Apache-2.0`. See [LICENSE](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/LICENSE).
|
|
335
|
+
<!-- readme-standards:end license -->
|
|
336
|
+
|
|
337
|
+
### Notices
|
|
338
|
+
|
|
339
|
+
<!-- readme-standards:begin notices -->
|
|
340
|
+
See [NOTICE](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/NOTICE) for attribution.
|
|
341
|
+
<!-- readme-standards:end notices -->
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "swarmauri_tests_griffe"
|
|
3
|
+
version = "0.11.0"
|
|
4
|
+
description = "Pytest plugin that turns Griffe inspection warnings into failing quality gates for Swarmauri packages."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.10,<3.15"
|
|
7
|
+
license = "Apache-2.0"
|
|
8
|
+
authors = [{ name = "Jacob Stewart", email = "jacob@swarmauri.com" }]
|
|
9
|
+
classifiers = [
|
|
10
|
+
"Development Status :: 1 - Planning",
|
|
11
|
+
"Framework :: Pytest",
|
|
12
|
+
"Intended Audience :: Developers",
|
|
13
|
+
"Topic :: Software Development :: Quality Assurance",
|
|
14
|
+
"Natural Language :: English",
|
|
15
|
+
"Development Status :: 3 - Alpha",
|
|
16
|
+
"Topic :: Software Development :: Libraries :: Application Frameworks",
|
|
17
|
+
"Programming Language :: Python",
|
|
18
|
+
"Programming Language :: Python :: 3",
|
|
19
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
20
|
+
"Programming Language :: Python :: 3.10",
|
|
21
|
+
"Programming Language :: Python :: 3.11",
|
|
22
|
+
"Programming Language :: Python :: 3.12",
|
|
23
|
+
"Programming Language :: Python :: 3.13",
|
|
24
|
+
"Programming Language :: Python :: 3.14",
|
|
25
|
+
]
|
|
26
|
+
keywords = [
|
|
27
|
+
"swarmauri",
|
|
28
|
+
"pytest",
|
|
29
|
+
"griffe",
|
|
30
|
+
"static analysis",
|
|
31
|
+
"developer experience",
|
|
32
|
+
"quality gates",
|
|
33
|
+
"tests",
|
|
34
|
+
"plugin",
|
|
35
|
+
"turns",
|
|
36
|
+
"inspection",
|
|
37
|
+
"warnings",
|
|
38
|
+
"failing",
|
|
39
|
+
"quality",
|
|
40
|
+
"gates",
|
|
41
|
+
"packages",
|
|
42
|
+
]
|
|
43
|
+
dependencies = [
|
|
44
|
+
"pytest>=8.0",
|
|
45
|
+
"griffe>=0.48",
|
|
46
|
+
"tomli; python_version < '3.11'",
|
|
47
|
+
]
|
|
48
|
+
license-files = ["LICENSE", "NOTICE"]
|
|
49
|
+
|
|
50
|
+
[project.entry-points."pytest11"]
|
|
51
|
+
swarmauri_tests_griffe = "swarmauri_tests_griffe"
|
|
52
|
+
|
|
53
|
+
[build-system]
|
|
54
|
+
requires = ["poetry-core>=1.0.0"]
|
|
55
|
+
build-backend = "poetry.core.masonry.api"
|
|
56
|
+
|
|
57
|
+
[dependency-groups]
|
|
58
|
+
dev = [
|
|
59
|
+
"pytest>=8.0",
|
|
60
|
+
"ruff>=0.9.9",
|
|
61
|
+
"readme-standards==0.1.3; python_version >= \"3.11\"",
|
|
62
|
+
]
|
|
63
|
+
|
|
64
|
+
[tool.readme_standards]
|
|
65
|
+
policy = "package-guide-v1"
|
|
66
|
+
readme = "README.md"
|
|
67
|
+
brand = "swarmauri"
|
|
68
|
+
brand_catalog = "../../../tools/readme/brands.toml"
|
|
69
|
+
repository = "https://github.com/swarmauri/swarmauri-sdk"
|
|
70
|
+
ref = "master"
|
|
71
|
+
package_path = "pkgs/50-community/swarmauri_tests_griffe"
|
|
72
|
+
layer = "community"
|
|
73
|
+
lifecycle = "active"
|
|
74
|
+
license_file = "LICENSE"
|
|
75
|
+
notice_file = "NOTICE"
|
|
76
|
+
|
|
77
|
+
[tool.readme_standards.distributions.pypi]
|
|
78
|
+
name = "swarmauri_tests_griffe"
|
|
79
|
+
published = true
|
|
80
|
+
|
|
81
|
+
[tool.readme_standards.examples.quick_start]
|
|
82
|
+
source = "docs/readme/quick_start.sh"
|
|
83
|
+
test = "tests/unit/test_readme_sources.py"
|
|
84
|
+
language = "bash"
|
|
85
|
+
expected_exit_code = 0
|
|
86
|
+
|
|
87
|
+
[tool.readme_standards.examples.usage]
|
|
88
|
+
source = "docs/readme/usage.sh"
|
|
89
|
+
test = "tests/unit/test_readme_sources.py"
|
|
90
|
+
language = "bash"
|
|
91
|
+
expected_exit_code = 0
|
|
92
|
+
|
|
93
|
+
[tool.readme_standards.statuses.readme]
|
|
94
|
+
label = "CI gate"
|
|
95
|
+
url = "https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml"
|
|
96
|
+
|
|
97
|
+
[tool.readme_standards.statuses.tests]
|
|
98
|
+
label = "example source"
|
|
99
|
+
url = "https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/tests/unit/test_readme_sources.py"
|
|
100
|
+
|
|
101
|
+
[tool.readme_standards.statuses.certification]
|
|
102
|
+
label = "not certified"
|
|
103
|
+
url = "https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tests_griffe/README.md#certification-status"
|
|
104
|
+
|
|
105
|
+
[tool.readme_standards.statuses.governance]
|
|
106
|
+
label = "repository policy"
|
|
107
|
+
url = "https://github.com/swarmauri/swarmauri-sdk/blob/master/tools/readme/POLICY.md"
|
|
108
|
+
|
|
109
|
+
[tool.readme_standards.statuses.evidence]
|
|
110
|
+
label = "source and CI"
|
|
111
|
+
url = "https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml"
|
|
@@ -42,7 +42,8 @@ def pytest_addoption(parser: pytest.Parser) -> None:
|
|
|
42
42
|
default=None,
|
|
43
43
|
help=(
|
|
44
44
|
"Package name to inspect with Griffe. "
|
|
45
|
-
"Can be provided multiple times. Defaults to the package
|
|
45
|
+
"Can be provided multiple times. Defaults to the package "
|
|
46
|
+
"defined in pyproject.toml."
|
|
46
47
|
),
|
|
47
48
|
)
|
|
48
49
|
group.addoption(
|
|
@@ -50,7 +51,10 @@ def pytest_addoption(parser: pytest.Parser) -> None:
|
|
|
50
51
|
action="store",
|
|
51
52
|
dest="griffe_root",
|
|
52
53
|
default=None,
|
|
53
|
-
help=
|
|
54
|
+
help=(
|
|
55
|
+
"Root directory for resolving packages (defaults to pytest's "
|
|
56
|
+
"rootpath)."
|
|
57
|
+
),
|
|
54
58
|
)
|
|
55
59
|
|
|
56
60
|
|
|
@@ -82,7 +86,9 @@ def _discover_from_pyproject(root: Path) -> list[str]:
|
|
|
82
86
|
|
|
83
87
|
def _discover_packages(config: pytest.Config) -> list[GriffeTarget]:
|
|
84
88
|
root_option = config.getoption("griffe_root")
|
|
85
|
-
root =
|
|
89
|
+
root = (
|
|
90
|
+
Path(root_option).resolve() if root_option else Path(config.rootpath)
|
|
91
|
+
)
|
|
86
92
|
packages = config.getoption("griffe_packages")
|
|
87
93
|
explicit = bool(packages)
|
|
88
94
|
package_names: list[str]
|
|
@@ -113,23 +119,23 @@ def _discover_packages(config: pytest.Config) -> list[GriffeTarget]:
|
|
|
113
119
|
# Fall back to importing the module to resolve its path.
|
|
114
120
|
try:
|
|
115
121
|
module = importlib.import_module(package)
|
|
116
|
-
except
|
|
117
|
-
Exception
|
|
118
|
-
): # pragma: no cover - import failure should surface during test discovery
|
|
122
|
+
except Exception: # pragma: no cover - import failure should surface during test discovery # noqa: E501
|
|
119
123
|
if explicit:
|
|
120
124
|
raise pytest.UsageError(
|
|
121
|
-
f"Unable to resolve package '{package}' for Griffe inspection."
|
|
125
|
+
f"Unable to resolve package '{package}' for Griffe inspection." # noqa: E501
|
|
122
126
|
) from None
|
|
123
127
|
continue
|
|
124
128
|
module_file = getattr(module, "__file__", None)
|
|
125
129
|
if not module_file:
|
|
126
130
|
if explicit:
|
|
127
131
|
raise pytest.UsageError(
|
|
128
|
-
f"Unable to resolve package '{package}' for Griffe inspection."
|
|
132
|
+
f"Unable to resolve package '{package}' for Griffe inspection." # noqa: E501
|
|
129
133
|
)
|
|
130
134
|
continue
|
|
131
135
|
targets.append(
|
|
132
|
-
GriffeTarget(
|
|
136
|
+
GriffeTarget(
|
|
137
|
+
name=package, path=Path(module_file).resolve().parent
|
|
138
|
+
)
|
|
133
139
|
)
|
|
134
140
|
seen.add(package)
|
|
135
141
|
return targets
|
|
@@ -151,27 +157,38 @@ class GriffeWarningsItem(pytest.Item):
|
|
|
151
157
|
def runtest(self) -> None:
|
|
152
158
|
with warnings.catch_warnings(record=True) as caught:
|
|
153
159
|
warnings.simplefilter("always")
|
|
154
|
-
griffe.load(
|
|
160
|
+
griffe.load(
|
|
161
|
+
self.target.name, search_paths=[str(self.target.search_path)]
|
|
162
|
+
)
|
|
155
163
|
griffe_warnings = [
|
|
156
164
|
warning
|
|
157
165
|
for warning in caught
|
|
158
166
|
if "griffe" in (warning.filename or "")
|
|
159
167
|
or warning.category.__module__.startswith("griffe")
|
|
160
168
|
]
|
|
161
|
-
# If we didn't detect explicit Griffe warnings but still captured
|
|
162
|
-
#
|
|
169
|
+
# If we didn't detect explicit Griffe warnings but still captured
|
|
170
|
+
# warnings,
|
|
171
|
+
# treat them as relevant—Griffe ran and triggered them during
|
|
172
|
+
# inspection.
|
|
163
173
|
relevant = griffe_warnings or caught
|
|
164
174
|
if relevant:
|
|
165
175
|
formatted = "\n".join(
|
|
166
|
-
|
|
176
|
+
(
|
|
177
|
+
f"{warning.category.__name__}: {warning.message} "
|
|
178
|
+
f"({warning.filename}:{warning.lineno})"
|
|
179
|
+
)
|
|
167
180
|
for warning in relevant
|
|
168
181
|
)
|
|
169
182
|
raise AssertionError(
|
|
170
|
-
f"Griffe emitted warnings while loading {self.target.name}:\n{formatted}"
|
|
183
|
+
f"Griffe emitted warnings while loading {self.target.name}:\n{formatted}" # noqa: E501
|
|
171
184
|
)
|
|
172
185
|
|
|
173
186
|
def reportinfo(self) -> tuple[Path, int | None, str]:
|
|
174
|
-
return
|
|
187
|
+
return (
|
|
188
|
+
self.target.path,
|
|
189
|
+
None,
|
|
190
|
+
f"griffe warnings for {self.target.name}",
|
|
191
|
+
)
|
|
175
192
|
|
|
176
193
|
|
|
177
194
|
def pytest_configure(config: pytest.Config) -> None:
|
|
@@ -183,7 +200,9 @@ def pytest_configure(config: pytest.Config) -> None:
|
|
|
183
200
|
def pytest_collection_modifyitems(
|
|
184
201
|
session: pytest.Session, config: pytest.Config, items: list[pytest.Item]
|
|
185
202
|
) -> None:
|
|
186
|
-
targets: list[GriffeTarget] = getattr(
|
|
203
|
+
targets: list[GriffeTarget] = getattr(
|
|
204
|
+
config, "_swarmauri_griffe_targets", []
|
|
205
|
+
)
|
|
187
206
|
if not targets:
|
|
188
207
|
return
|
|
189
208
|
for target in targets:
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: swarmauri_tests_griffe
|
|
3
|
-
Version: 0.2.1.dev3
|
|
4
|
-
Summary: Pytest plugin that turns Griffe inspection warnings into failing quality gates for Swarmauri packages.
|
|
5
|
-
License: Apache-2.0
|
|
6
|
-
License-File: LICENSE
|
|
7
|
-
Keywords: swarmauri,pytest,griffe,static analysis,developer experience,quality gates,tests,plugin,turns,inspection,warnings,failing,quality,gates,packages
|
|
8
|
-
Author: Jacob Stewart
|
|
9
|
-
Author-email: jacob@swarmauri.com
|
|
10
|
-
Requires-Python: >=3.10,<3.15
|
|
11
|
-
Classifier: Development Status :: 1 - Planning
|
|
12
|
-
Classifier: Framework :: Pytest
|
|
13
|
-
Classifier: Intended Audience :: Developers
|
|
14
|
-
Classifier: Topic :: Software Development :: Quality Assurance
|
|
15
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
16
|
-
Classifier: Natural Language :: English
|
|
17
|
-
Classifier: Development Status :: 3 - Alpha
|
|
18
|
-
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
|
19
|
-
Classifier: Programming Language :: Python
|
|
20
|
-
Classifier: Programming Language :: Python :: 3
|
|
21
|
-
Classifier: Programming Language :: Python :: 3 :: Only
|
|
22
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
23
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
24
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
25
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
26
|
-
Classifier: Programming Language :: Python :: 3.14
|
|
27
|
-
Requires-Dist: griffe (>=0.48)
|
|
28
|
-
Requires-Dist: pytest (>=8.0)
|
|
29
|
-
Requires-Dist: tomli ; python_version < "3.11"
|
|
30
|
-
Description-Content-Type: text/markdown
|
|
31
|
-
|
|
32
|
-

|
|
33
|
-
|
|
34
|
-
<p align="center">
|
|
35
|
-
<a href="https://pepy.tech/project/swarmauri_tests_griffe/">
|
|
36
|
-
<img src="https://static.pepy.tech/badge/swarmauri_tests_griffe/month" alt="PyPI - Downloads"/></a>
|
|
37
|
-
<a href="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/community/swarmauri_tests_griffe/">
|
|
38
|
-
<img alt="Hits" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/community/swarmauri_tests_griffe.svg"/></a>
|
|
39
|
-
<a href="https://pypi.org/project/swarmauri_tests_griffe/">
|
|
40
|
-
<img src="https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue" alt="PyPI - Python Version"/></a>
|
|
41
|
-
<a href="https://pypi.org/project/swarmauri_tests_griffe/">
|
|
42
|
-
<img src="https://img.shields.io/pypi/l/swarmauri_tests_griffe" alt="PyPI - License"/></a>
|
|
43
|
-
<a href="https://pypi.org/project/swarmauri_tests_griffe/">
|
|
44
|
-
<img src="https://img.shields.io/pypi/v/swarmauri_tests_griffe?label=swarmauri_tests_griffe&color=green" alt="PyPI - swarmauri_tests_griffe"/></a>
|
|
45
|
-
</p>
|
|
46
|
-
|
|
47
|
-
# swarmauri_tests_griffe
|
|
48
|
-
|
|
49
|
-
`swarmauri_tests_griffe` is a [pytest](https://pytest.org) plugin that loads your
|
|
50
|
-
package metadata with [Griffe](https://github.com/mkdocstrings/griffe). The
|
|
51
|
-
plugin converts any warnings generated during inspection into failing tests so
|
|
52
|
-
that documentation, annotations, and runtime signatures stay in sync across the
|
|
53
|
-
Swarmauri ecosystem.
|
|
54
|
-
|
|
55
|
-
## Features
|
|
56
|
-
|
|
57
|
-
- **Python 3.10–3.12 coverage** – verified across the supported Swarmauri
|
|
58
|
-
runtime range so you can keep consistent quality gates on every maintained
|
|
59
|
-
interpreter.
|
|
60
|
-
- **Warning-to-test enforcement** – automatically escalates Griffe warnings to
|
|
61
|
-
failing pytest checks to stop documentation drift before it ships.
|
|
62
|
-
- **Zero-config discovery** – the plugin registers as a pytest entry point and
|
|
63
|
-
loads without additional setup once installed.
|
|
64
|
-
- **Flexible targeting** – tune the inspection scope with command-line flags or
|
|
65
|
-
persistent `pyproject.toml` settings.
|
|
66
|
-
|
|
67
|
-
## Installation
|
|
68
|
-
|
|
69
|
-
Choose the installer that best fits your workflow:
|
|
70
|
-
|
|
71
|
-
### Using `uv`
|
|
72
|
-
|
|
73
|
-
```bash
|
|
74
|
-
uv add swarmauri-tests-griffe
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
### Using `pip`
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
pip install swarmauri-tests-griffe
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
Both commands add the plugin as a dependency of your project. Because the plugin
|
|
84
|
-
uses pytest entry points, it is automatically discovered the next time your test
|
|
85
|
-
suite runs—no manual configuration required.
|
|
86
|
-
|
|
87
|
-
> **Supported Python versions:** The plugin is tested and published for Python
|
|
88
|
-
> 3.10, 3.11, and 3.12 across the Swarmauri platform.
|
|
89
|
-
|
|
90
|
-
## Usage
|
|
91
|
-
|
|
92
|
-
After installation, execute your test suite as normal and a dynamic Griffe check
|
|
93
|
-
is injected for each configured package. By default, the package defined in
|
|
94
|
-
`pyproject.toml` is inspected. You can target additional packages or limit the
|
|
95
|
-
scope with command-line options:
|
|
96
|
-
|
|
97
|
-
```bash
|
|
98
|
-
pytest --griffe-package your_package --griffe-package another_package
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
Each `--griffe-package` argument adds a module to the inspection list. If
|
|
102
|
-
Griffe produces warnings while processing any module, the corresponding dynamic
|
|
103
|
-
test fails and the collected warnings are rendered in the pytest output, making
|
|
104
|
-
it easy to pinpoint the files that need attention.
|
|
105
|
-
|
|
106
|
-
### Configuring defaults
|
|
107
|
-
|
|
108
|
-
For larger projects, keep the configuration in `pyproject.toml` to avoid
|
|
109
|
-
repeating command-line flags:
|
|
110
|
-
|
|
111
|
-
```toml
|
|
112
|
-
[tool.pytest.ini_options]
|
|
113
|
-
addopts = "--griffe-package swarmauri_core --griffe-package swarmauri_tests_griffe"
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
With the options saved, every pytest run enforces the same quality gates across
|
|
117
|
-
your codebase without extra setup.
|
|
118
|
-
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-

|
|
2
|
-
|
|
3
|
-
<p align="center">
|
|
4
|
-
<a href="https://pepy.tech/project/swarmauri_tests_griffe/">
|
|
5
|
-
<img src="https://static.pepy.tech/badge/swarmauri_tests_griffe/month" alt="PyPI - Downloads"/></a>
|
|
6
|
-
<a href="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/community/swarmauri_tests_griffe/">
|
|
7
|
-
<img alt="Hits" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/community/swarmauri_tests_griffe.svg"/></a>
|
|
8
|
-
<a href="https://pypi.org/project/swarmauri_tests_griffe/">
|
|
9
|
-
<img src="https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue" alt="PyPI - Python Version"/></a>
|
|
10
|
-
<a href="https://pypi.org/project/swarmauri_tests_griffe/">
|
|
11
|
-
<img src="https://img.shields.io/pypi/l/swarmauri_tests_griffe" alt="PyPI - License"/></a>
|
|
12
|
-
<a href="https://pypi.org/project/swarmauri_tests_griffe/">
|
|
13
|
-
<img src="https://img.shields.io/pypi/v/swarmauri_tests_griffe?label=swarmauri_tests_griffe&color=green" alt="PyPI - swarmauri_tests_griffe"/></a>
|
|
14
|
-
</p>
|
|
15
|
-
|
|
16
|
-
# swarmauri_tests_griffe
|
|
17
|
-
|
|
18
|
-
`swarmauri_tests_griffe` is a [pytest](https://pytest.org) plugin that loads your
|
|
19
|
-
package metadata with [Griffe](https://github.com/mkdocstrings/griffe). The
|
|
20
|
-
plugin converts any warnings generated during inspection into failing tests so
|
|
21
|
-
that documentation, annotations, and runtime signatures stay in sync across the
|
|
22
|
-
Swarmauri ecosystem.
|
|
23
|
-
|
|
24
|
-
## Features
|
|
25
|
-
|
|
26
|
-
- **Python 3.10–3.12 coverage** – verified across the supported Swarmauri
|
|
27
|
-
runtime range so you can keep consistent quality gates on every maintained
|
|
28
|
-
interpreter.
|
|
29
|
-
- **Warning-to-test enforcement** – automatically escalates Griffe warnings to
|
|
30
|
-
failing pytest checks to stop documentation drift before it ships.
|
|
31
|
-
- **Zero-config discovery** – the plugin registers as a pytest entry point and
|
|
32
|
-
loads without additional setup once installed.
|
|
33
|
-
- **Flexible targeting** – tune the inspection scope with command-line flags or
|
|
34
|
-
persistent `pyproject.toml` settings.
|
|
35
|
-
|
|
36
|
-
## Installation
|
|
37
|
-
|
|
38
|
-
Choose the installer that best fits your workflow:
|
|
39
|
-
|
|
40
|
-
### Using `uv`
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
uv add swarmauri-tests-griffe
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
### Using `pip`
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
pip install swarmauri-tests-griffe
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
Both commands add the plugin as a dependency of your project. Because the plugin
|
|
53
|
-
uses pytest entry points, it is automatically discovered the next time your test
|
|
54
|
-
suite runs—no manual configuration required.
|
|
55
|
-
|
|
56
|
-
> **Supported Python versions:** The plugin is tested and published for Python
|
|
57
|
-
> 3.10, 3.11, and 3.12 across the Swarmauri platform.
|
|
58
|
-
|
|
59
|
-
## Usage
|
|
60
|
-
|
|
61
|
-
After installation, execute your test suite as normal and a dynamic Griffe check
|
|
62
|
-
is injected for each configured package. By default, the package defined in
|
|
63
|
-
`pyproject.toml` is inspected. You can target additional packages or limit the
|
|
64
|
-
scope with command-line options:
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
pytest --griffe-package your_package --griffe-package another_package
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Each `--griffe-package` argument adds a module to the inspection list. If
|
|
71
|
-
Griffe produces warnings while processing any module, the corresponding dynamic
|
|
72
|
-
test fails and the collected warnings are rendered in the pytest output, making
|
|
73
|
-
it easy to pinpoint the files that need attention.
|
|
74
|
-
|
|
75
|
-
### Configuring defaults
|
|
76
|
-
|
|
77
|
-
For larger projects, keep the configuration in `pyproject.toml` to avoid
|
|
78
|
-
repeating command-line flags:
|
|
79
|
-
|
|
80
|
-
```toml
|
|
81
|
-
[tool.pytest.ini_options]
|
|
82
|
-
addopts = "--griffe-package swarmauri_core --griffe-package swarmauri_tests_griffe"
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
With the options saved, every pytest run enforces the same quality gates across
|
|
86
|
-
your codebase without extra setup.
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
[project]
|
|
2
|
-
name = "swarmauri_tests_griffe"
|
|
3
|
-
version = "0.2.1.dev3"
|
|
4
|
-
description = "Pytest plugin that turns Griffe inspection warnings into failing quality gates for Swarmauri packages."
|
|
5
|
-
readme = "README.md"
|
|
6
|
-
requires-python = ">=3.10,<3.15"
|
|
7
|
-
license = { text = "Apache-2.0" }
|
|
8
|
-
authors = [{ name = "Jacob Stewart", email = "jacob@swarmauri.com" }]
|
|
9
|
-
classifiers = [
|
|
10
|
-
"Development Status :: 1 - Planning",
|
|
11
|
-
"Framework :: Pytest",
|
|
12
|
-
"Intended Audience :: Developers",
|
|
13
|
-
"Topic :: Software Development :: Quality Assurance",
|
|
14
|
-
"License :: OSI Approved :: Apache Software License",
|
|
15
|
-
"Natural Language :: English",
|
|
16
|
-
"Development Status :: 3 - Alpha",
|
|
17
|
-
"Topic :: Software Development :: Libraries :: Application Frameworks",
|
|
18
|
-
"Programming Language :: Python",
|
|
19
|
-
"Programming Language :: Python :: 3",
|
|
20
|
-
"Programming Language :: Python :: 3 :: Only",
|
|
21
|
-
"Programming Language :: Python :: 3.10",
|
|
22
|
-
"Programming Language :: Python :: 3.11",
|
|
23
|
-
"Programming Language :: Python :: 3.12",
|
|
24
|
-
"Programming Language :: Python :: 3.13",
|
|
25
|
-
"Programming Language :: Python :: 3.14",
|
|
26
|
-
]
|
|
27
|
-
keywords = [
|
|
28
|
-
"swarmauri",
|
|
29
|
-
"pytest",
|
|
30
|
-
"griffe",
|
|
31
|
-
"static analysis",
|
|
32
|
-
"developer experience",
|
|
33
|
-
"quality gates",
|
|
34
|
-
"tests",
|
|
35
|
-
"plugin",
|
|
36
|
-
"turns",
|
|
37
|
-
"inspection",
|
|
38
|
-
"warnings",
|
|
39
|
-
"failing",
|
|
40
|
-
"quality",
|
|
41
|
-
"gates",
|
|
42
|
-
"packages",
|
|
43
|
-
]
|
|
44
|
-
dependencies = [
|
|
45
|
-
"pytest>=8.0",
|
|
46
|
-
"griffe>=0.48",
|
|
47
|
-
"tomli; python_version < '3.11'",
|
|
48
|
-
]
|
|
49
|
-
|
|
50
|
-
[project.entry-points."pytest11"]
|
|
51
|
-
swarmauri_tests_griffe = "swarmauri_tests_griffe"
|
|
52
|
-
|
|
53
|
-
[build-system]
|
|
54
|
-
requires = ["poetry-core>=1.0.0"]
|
|
55
|
-
build-backend = "poetry.core.masonry.api"
|
|
56
|
-
|
|
57
|
-
[dependency-groups]
|
|
58
|
-
dev = [
|
|
59
|
-
"pytest>=8.0",
|
|
60
|
-
"ruff>=0.9.9",
|
|
61
|
-
]
|
|
File without changes
|