spec-test 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.
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: spec-test
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Specification-driven development tool with test verification
|
|
5
|
+
Author: Pulse Team
|
|
6
|
+
License: MIT
|
|
7
|
+
Requires-Python: >=3.11
|
|
8
|
+
Requires-Dist: pydantic>=2.0.0
|
|
9
|
+
Requires-Dist: pytest>=8.0.0
|
|
10
|
+
Requires-Dist: rich>=13.0.0
|
|
11
|
+
Requires-Dist: typer>=0.9.0
|
|
12
|
+
Provides-Extra: dev
|
|
13
|
+
Requires-Dist: mypy>=1.0.0; extra == 'dev'
|
|
14
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
|
|
15
|
+
Requires-Dist: ruff>=0.1.0; extra == 'dev'
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
|
|
18
|
+
# spec-test
|
|
19
|
+
|
|
20
|
+
Specification-driven development tool that verifies your specs have passing tests.
|
|
21
|
+
|
|
22
|
+
## Philosophy
|
|
23
|
+
|
|
24
|
+
**Every claim about system behavior must be backed by a passing test.**
|
|
25
|
+
|
|
26
|
+
- If there's no test, the behavior is unverified
|
|
27
|
+
- Specs are written first, then implementation, then tests
|
|
28
|
+
- `spec-test verify` is the source of truth for project health
|
|
29
|
+
|
|
30
|
+
## Installation
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pip install spec-test
|
|
34
|
+
# or with uv
|
|
35
|
+
uv add spec-test
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Quick Start
|
|
39
|
+
|
|
40
|
+
1. Create a spec file anywhere in your project (must be `spec-*.md`):
|
|
41
|
+
|
|
42
|
+
```markdown
|
|
43
|
+
# docs/specs/spec-auth.md
|
|
44
|
+
|
|
45
|
+
## Requirements
|
|
46
|
+
- **AUTH-001**: User can login with email and password
|
|
47
|
+
- **AUTH-002**: Invalid credentials return 401 error
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
2. Write tests with the `@spec` decorator:
|
|
51
|
+
|
|
52
|
+
```python
|
|
53
|
+
from spec_test import spec
|
|
54
|
+
|
|
55
|
+
@spec("AUTH-001", "User can login with email and password")
|
|
56
|
+
def test_user_login():
|
|
57
|
+
response = client.post("/login", json={"email": "test@example.com", "password": "secret"})
|
|
58
|
+
assert response.status_code == 200
|
|
59
|
+
|
|
60
|
+
@spec("AUTH-002", "Invalid credentials return 401 error")
|
|
61
|
+
def test_invalid_login():
|
|
62
|
+
response = client.post("/login", json={"email": "test@example.com", "password": "wrong"})
|
|
63
|
+
assert response.status_code == 401
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
3. Verify all specs have passing tests:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
spec-test verify
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Commands
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
spec-test verify # Verify all specs have passing tests
|
|
76
|
+
spec-test list-specs # List all specs found
|
|
77
|
+
spec-test check AUTH-001 # Check a single spec
|
|
78
|
+
spec-test init # Initialize spec-test in a project
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Spec File Format
|
|
82
|
+
|
|
83
|
+
Spec files must:
|
|
84
|
+
- Be named `spec-*.md` (e.g., `spec-auth.md`, `spec-api.md`)
|
|
85
|
+
- Can be anywhere in the project (nested directories supported)
|
|
86
|
+
- Use `**ID**: description` format for requirements
|
|
87
|
+
|
|
88
|
+
```markdown
|
|
89
|
+
- **AUTH-001**: User can login with email and password
|
|
90
|
+
- **AUTH-002** [manual]: Requires manual verification
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## License
|
|
94
|
+
|
|
95
|
+
MIT
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
spec_test-0.1.0.dist-info/METADATA,sha256=xBkGj3P0EEH2iE_JCWM5-NLf23EHBhk5WSnbNRdyMCE,2385
|
|
2
|
+
spec_test-0.1.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
3
|
+
spec_test-0.1.0.dist-info/entry_points.txt,sha256=ClDOAz9ZTm_HTRxVqYupt_zO-aQfaUVyPd1KUnFae3w,96
|
|
4
|
+
spec_test-0.1.0.dist-info/RECORD,,
|