Skip to content

Commit 4f30399

Browse files
committed
Add CLAUDE.md
1 parent 19bb02a commit 4f30399

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

CLAUDE.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# CLAUDE.md
2+
3+
## Project
4+
5+
pydantic-forms: JSON schema form generation for FastAPI/Flask using Pydantic v2 models. Supports multi-step form wizards.
6+
7+
## Commands
8+
9+
```bash
10+
# Install
11+
flit install --deps develop --symlink
12+
13+
# Test
14+
pytest tests/unit_tests
15+
pytest -n auto tests/unit_tests # parallel
16+
pytest tests/unit_tests --cov=pydantic_forms # coverage
17+
18+
# Lint/format
19+
pre-commit run --all-files # all checks
20+
black --check . # formatting
21+
ruff check . # linting
22+
mypy pydantic_forms # type checking
23+
```
24+
25+
## Code style
26+
27+
- Python 3.10+, Pydantic v2 (>=2.9.0)
28+
- Black formatting, 120 char line length
29+
- Ruff linting with google-style docstrings
30+
- Strict mypy
31+
- No relative imports (absolute only)
32+
- Async and sync variants live in `pydantic_forms/core/`
33+
- pytest-asyncio with `asyncio_mode=auto`
34+
- No `break`/`continue` in for-loops -- use itertools (`takewhile`, `filter`) or early return in helpers
35+
- No nested for-loops -- use `itertools.product()`, `chain.from_iterable()`, comprehensions, or extract helpers
36+
- Prefer `match/case` over `isinstance` chains
37+
- No duplicate test functions -- use `@pytest.mark.parametrize` instead
38+
39+
## Plugins
40+
41+
Install the surf-python-style hooks from https://github.com/workfloworchestrator/surf-hooks:
42+
```
43+
/plugin marketplace add workfloworchestrator/surf-hooks
44+
/plugin install surf-python-style@surf-hooks
45+
```

0 commit comments

Comments
 (0)