valid8r 0.7.1__tar.gz → 0.7.2__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.
Potentially problematic release.
This version of valid8r might be problematic. Click here for more details.
- {valid8r-0.7.1 → valid8r-0.7.2}/.github/CONVENTIONAL_COMMITS.md +4 -4
- {valid8r-0.7.1 → valid8r-0.7.2}/.github/QUICK_REFERENCE.md +3 -3
- {valid8r-0.7.1 → valid8r-0.7.2}/.github/README.md +8 -8
- {valid8r-0.7.1 → valid8r-0.7.2}/.github/SETUP_CHECKLIST.md +7 -7
- {valid8r-0.7.1 → valid8r-0.7.2}/.github/WORKFLOWS.md +6 -6
- {valid8r-0.7.1 → valid8r-0.7.2}/.github/pull_request_template.md +6 -6
- {valid8r-0.7.1 → valid8r-0.7.2}/.readthedocs.yaml +5 -7
- {valid8r-0.7.1 → valid8r-0.7.2}/CLAUDE.md +14 -3
- {valid8r-0.7.1 → valid8r-0.7.2}/CONTRIBUTING.md +28 -20
- {valid8r-0.7.1 → valid8r-0.7.2}/PKG-INFO +15 -7
- {valid8r-0.7.1 → valid8r-0.7.2}/README.md +14 -6
- {valid8r-0.7.1 → valid8r-0.7.2}/docs/development/contributing.rst +17 -14
- {valid8r-0.7.1 → valid8r-0.7.2}/docs/development/testing.rst +21 -18
- {valid8r-0.7.1 → valid8r-0.7.2}/docs/index.rst +7 -1
- {valid8r-0.7.1 → valid8r-0.7.2}/docs/user_guide/getting_started.rst +8 -2
- {valid8r-0.7.1 → valid8r-0.7.2}/pyproject.toml +1 -1
- {valid8r-0.7.1 → valid8r-0.7.2}/uv.lock +1 -1
- {valid8r-0.7.1 → valid8r-0.7.2}/.coveragerc +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/.cursorrules +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/.github/CICD_TEST.md +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/.github/CODEOWNERS +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/.github/ISSUE_TEMPLATE/documentation.yml +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/.github/PYPI_TOKEN_SETUP_GUIDE.md +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/.github/WORKFLOW_DIAGRAM.md +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/.github/dependabot.yml +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/.github/labeler.yml +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/.github/release.yml +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/.github/workflows/ci.yml +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/.github/workflows/labeler.yml +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/.github/workflows/publish-pypi.yml +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/.github/workflows/semantic-release.yml +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/.github/workflows/size-label.yml +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/.github/workflows/stale.yml +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/.github/workflows/version-and-release.yml +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/.github/workflows/welcome.yml +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/.gitignore +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/.pre-commit-config.yaml +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/.python-version +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/CICD_SETUP_SUMMARY.md +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/CODE_OF_CONDUCT.md +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/LICENSE +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/QA_REPORT_WEB_PARSERS_V0.6.0.md +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/QA_VALIDATION_SUMMARY.md +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/ROADMAP.md +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/SECURITY.md +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/docs/__init__.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/docs/_static/css/custom.css +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/docs/api/core.rst +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/docs/api/prompt.rst +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/docs/conf.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/docs/development/changelog.rst +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/docs/examples/basic_example.rst +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/docs/examples/chaining_validators.rst +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/docs/examples/custom_validators.rst +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/docs/examples/fastapi_integration.rst +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/docs/examples/interactive_prompts.rst +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/docs/migration-poetry-to-uv.md +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/docs/user_guide/advanced_usage.rst +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/docs/user_guide/maybe_monad.rst +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/docs/user_guide/parsers.rst +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/docs/user_guide/prompting.rst +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/docs/user_guide/testing.rst +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/docs/user_guide/validators.rst +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/scripts/__init__.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/scripts/docs.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/smoke_test.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/__init__.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/bdd/__init__.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/bdd/conftest.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/bdd/environment.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/bdd/features/clean_type_parsing.feature +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/bdd/features/collection_parsing.feature +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/bdd/features/interactive_prompts.feature +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/bdd/features/phone_parsing.feature +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/bdd/features/testing_utilities.feature +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/bdd/features/url_email_parsing.feature +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/bdd/features/validator_combinators.feature +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/bdd/features/validators.feature +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/bdd/features/web_parsers.feature +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/bdd/steps/__init__.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/bdd/steps/clean_type_parsing_steps.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/bdd/steps/collection_parsing_steps.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/bdd/steps/interactive_prompts_steps.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/bdd/steps/phone_parsing_steps.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/bdd/steps/testing_utilities_steps.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/bdd/steps/url_email_parsing_steps.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/bdd/steps/validator_combinators_steps.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/bdd/steps/validators_steps.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/bdd/steps/web_parsers_steps.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/integration/__init__.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/integration/test_validator.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/qa_security_web_parsers.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/unit/__init__.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/unit/conftest.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/unit/test_combinators.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/unit/test_decimal_parser.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/unit/test_dict_parser.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/unit/test_generators.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/unit/test_ip_parsers.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/unit/test_list_parser.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/unit/test_maybe.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/unit/test_parsers.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/unit/test_phone_parsing.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/unit/test_prompt.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/unit/test_public_api.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/unit/test_testing_utilities.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/unit/test_url_email_parsers.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/unit/test_uuid_parser.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/unit/test_validators.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tests/unit/test_web_parsers.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/tox.ini +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/valid8r/__init__.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/valid8r/core/__init__.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/valid8r/core/combinators.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/valid8r/core/maybe.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/valid8r/core/parsers.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/valid8r/core/validators.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/valid8r/prompt/__init__.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/valid8r/prompt/basic.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/valid8r/py.typed +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/valid8r/testing/__init__.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/valid8r/testing/assertions.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/valid8r/testing/generators.py +0 -0
- {valid8r-0.7.1 → valid8r-0.7.2}/valid8r/testing/mock_input.py +0 -0
|
@@ -25,7 +25,7 @@ This is a quick reference guide for writing conventional commits for the valid8r
|
|
|
25
25
|
| `test` | 🔼 **patch** | Adding or updating tests | `test: add edge cases for validators` |
|
|
26
26
|
| `chore` | 🔼 **patch** | Maintenance tasks | `chore: update dependencies` |
|
|
27
27
|
| `ci` | ⚪ **none** | CI/CD changes | `ci: add Python 3.13 to matrix` |
|
|
28
|
-
| `build` | ⚪ **none** | Build system changes | `build: update
|
|
28
|
+
| `build` | ⚪ **none** | Build system changes | `build: update uv config` |
|
|
29
29
|
|
|
30
30
|
## Breaking Changes (Major Bump)
|
|
31
31
|
|
|
@@ -268,9 +268,9 @@ Before committing, check:
|
|
|
268
268
|
|
|
269
269
|
```bash
|
|
270
270
|
# Run checks before committing
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
271
|
+
uv run ruff check .
|
|
272
|
+
uv run mypy valid8r
|
|
273
|
+
uv run pytest
|
|
274
274
|
|
|
275
275
|
# Then commit
|
|
276
276
|
git commit -m "feat(parsers): add parse_phone_number"
|
|
@@ -31,9 +31,9 @@ git commit -m "feat(parsers): add phone validation"
|
|
|
31
31
|
gh pr create --fill
|
|
32
32
|
|
|
33
33
|
# Run checks locally
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
uv run pytest
|
|
35
|
+
uv run mypy valid8r
|
|
36
|
+
uv run ruff check .
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
### Manual Workflow Triggers
|
|
@@ -184,9 +184,9 @@ git checkout -b feat/add-parser
|
|
|
184
184
|
# ... edit code ...
|
|
185
185
|
|
|
186
186
|
# 3. Run tests locally
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
187
|
+
uv run pytest
|
|
188
|
+
uv run mypy valid8r
|
|
189
|
+
uv run ruff check .
|
|
190
190
|
|
|
191
191
|
# 4. Commit with conventional format
|
|
192
192
|
git commit -m "feat(parsers): add phone number parser"
|
|
@@ -284,11 +284,11 @@ gh workflow run stale.yml
|
|
|
284
284
|
|
|
285
285
|
**Run locally**:
|
|
286
286
|
```bash
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
287
|
+
uv run ruff check .
|
|
288
|
+
uv run ruff format --check .
|
|
289
|
+
uv run mypy valid8r
|
|
290
|
+
uv run pytest
|
|
291
|
+
uv run behave tests/bdd/features
|
|
292
292
|
```
|
|
293
293
|
|
|
294
294
|
Fix issues and push again.
|
|
@@ -121,17 +121,16 @@ Create `test-pypi` environment (optional):
|
|
|
121
121
|
|
|
122
122
|
```bash
|
|
123
123
|
# Ensure version is 0.1.0 in pyproject.toml
|
|
124
|
-
|
|
124
|
+
# Version is managed by semantic-release, but for first publish verify it's set correctly
|
|
125
125
|
|
|
126
126
|
# Build the package
|
|
127
|
-
|
|
127
|
+
uv build
|
|
128
128
|
|
|
129
129
|
# Publish to Test PyPI first (to verify)
|
|
130
|
-
|
|
131
|
-
poetry publish -r testpypi --username __token__ --password pypi-...
|
|
130
|
+
uv publish --publish-url https://test.pypi.org/legacy/ --token pypi-...
|
|
132
131
|
|
|
133
132
|
# If test publish succeeds, publish to production PyPI
|
|
134
|
-
|
|
133
|
+
uv publish --token pypi-...
|
|
135
134
|
```
|
|
136
135
|
|
|
137
136
|
**Option B: Trusted Publisher** (More secure, no tokens needed)
|
|
@@ -219,8 +218,9 @@ Final verification checklist:
|
|
|
219
218
|
**Expected behavior**: The workflow skips publishing if version exists.
|
|
220
219
|
|
|
221
220
|
**If you need to republish**:
|
|
222
|
-
1.
|
|
223
|
-
2. Commit and push to trigger new release
|
|
221
|
+
1. Version bump happens automatically via semantic-release based on conventional commits
|
|
222
|
+
2. Commit with appropriate conventional commit type and push to trigger new release
|
|
223
|
+
3. Or manually trigger version bump: `gh workflow run semantic-release.yml`
|
|
224
224
|
|
|
225
225
|
### Issue: Required checks not appearing in branch protection
|
|
226
226
|
|
|
@@ -240,7 +240,7 @@ vim valid8r/core/parsers.py
|
|
|
240
240
|
vim tests/unit/test_parsers.py
|
|
241
241
|
|
|
242
242
|
# Run tests locally
|
|
243
|
-
|
|
243
|
+
uv run pytest
|
|
244
244
|
|
|
245
245
|
# Commit with conventional format
|
|
246
246
|
git add .
|
|
@@ -386,11 +386,11 @@ gh workflow run version-and-release.yml -f version_bump=patch
|
|
|
386
386
|
1. Check workflow run logs in GitHub Actions tab
|
|
387
387
|
2. Run same checks locally:
|
|
388
388
|
```bash
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
389
|
+
uv run ruff check .
|
|
390
|
+
uv run ruff format --check .
|
|
391
|
+
uv run mypy valid8r
|
|
392
|
+
uv run pytest
|
|
393
|
+
uv run behave tests/bdd/features
|
|
394
394
|
```
|
|
395
395
|
3. Fix issues and push again
|
|
396
396
|
|
|
@@ -31,7 +31,7 @@ Fixes #
|
|
|
31
31
|
|
|
32
32
|
- [ ] Unit tests added/updated
|
|
33
33
|
- [ ] BDD tests added/updated (if applicable)
|
|
34
|
-
- [ ] All tests pass locally (`
|
|
34
|
+
- [ ] All tests pass locally (`uv run tox`)
|
|
35
35
|
- [ ] Test coverage maintained or improved
|
|
36
36
|
|
|
37
37
|
## Test Evidence
|
|
@@ -40,7 +40,7 @@ Fixes #
|
|
|
40
40
|
|
|
41
41
|
```
|
|
42
42
|
# Example:
|
|
43
|
-
$
|
|
43
|
+
$ uv run pytest tests/unit/test_my_feature.py
|
|
44
44
|
================================ test session starts =================================
|
|
45
45
|
collected 15 items
|
|
46
46
|
|
|
@@ -52,9 +52,9 @@ tests/unit/test_my_feature.py ............... [100%]
|
|
|
52
52
|
|
|
53
53
|
## Checklist
|
|
54
54
|
|
|
55
|
-
- [ ] Code follows the project's style guidelines (`
|
|
56
|
-
- [ ] Code is formatted properly (`
|
|
57
|
-
- [ ] Type hints are complete and pass mypy (`
|
|
55
|
+
- [ ] Code follows the project's style guidelines (`uv run ruff check .`)
|
|
56
|
+
- [ ] Code is formatted properly (`uv run ruff format .`)
|
|
57
|
+
- [ ] Type hints are complete and pass mypy (`uv run mypy valid8r`)
|
|
58
58
|
- [ ] Docstrings added/updated for public API
|
|
59
59
|
- [ ] `__all__` exports updated if public API changed
|
|
60
60
|
- [ ] CLAUDE.md updated if architecture/patterns changed
|
|
@@ -72,7 +72,7 @@ N/A
|
|
|
72
72
|
- [ ] README.md updated (if needed)
|
|
73
73
|
- [ ] API documentation updated (docstrings)
|
|
74
74
|
- [ ] Usage examples added (if new feature)
|
|
75
|
-
- [ ] Sphinx docs build successfully (`
|
|
75
|
+
- [ ] Sphinx docs build successfully (`uv run docs-build`)
|
|
76
76
|
|
|
77
77
|
# Additional Notes
|
|
78
78
|
|
|
@@ -10,14 +10,12 @@ build:
|
|
|
10
10
|
tools:
|
|
11
11
|
python: "3.11"
|
|
12
12
|
commands:
|
|
13
|
-
# Install
|
|
14
|
-
- pip install
|
|
15
|
-
# Configure poetry to not create virtualenvs
|
|
16
|
-
- poetry config virtualenvs.create false
|
|
13
|
+
# Install uv
|
|
14
|
+
- pip install uv
|
|
17
15
|
# Install all dependencies including the project itself
|
|
18
|
-
-
|
|
19
|
-
# Let
|
|
20
|
-
-
|
|
16
|
+
- uv sync --group docs
|
|
17
|
+
# Let uv run Sphinx to avoid dependency conflicts
|
|
18
|
+
- uv run sphinx-build -b html docs $READTHEDOCS_OUTPUT/html
|
|
21
19
|
|
|
22
20
|
# Build documentation formats
|
|
23
21
|
formats:
|
|
@@ -77,7 +77,11 @@ All new features MUST follow this exact workflow using the specialized agents de
|
|
|
77
77
|
|
|
78
78
|
## Common Development Commands
|
|
79
79
|
|
|
80
|
-
**Note**: This project uses `uv` for dependency management (
|
|
80
|
+
**Note**: This project uses `uv` for dependency management. The migration from Poetry to uv was completed in November 2025 (PR #48), bringing 60% faster CI pipelines and 300x+ faster dependency resolution.
|
|
81
|
+
|
|
82
|
+
See `docs/migration-poetry-to-uv.md` for the complete migration guide, including command comparisons and troubleshooting.
|
|
83
|
+
|
|
84
|
+
**Install uv:**
|
|
81
85
|
```bash
|
|
82
86
|
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
83
87
|
```
|
|
@@ -156,15 +160,22 @@ uv run python smoke_test.py
|
|
|
156
160
|
|
|
157
161
|
### Dependency Management
|
|
158
162
|
```bash
|
|
159
|
-
# Add a
|
|
163
|
+
# Add a production dependency
|
|
160
164
|
uv add requests
|
|
161
165
|
|
|
162
166
|
# Add a dev dependency
|
|
163
|
-
uv add --dev pytest-timeout
|
|
167
|
+
uv add --group dev pytest-timeout
|
|
168
|
+
|
|
169
|
+
# Add to specific dependency groups
|
|
170
|
+
uv add --group test pytest-mock
|
|
171
|
+
uv add --group docs sphinx-theme
|
|
164
172
|
|
|
165
173
|
# Update all dependencies
|
|
166
174
|
uv lock --upgrade
|
|
167
175
|
|
|
176
|
+
# Update a specific package
|
|
177
|
+
uv lock --upgrade-package requests
|
|
178
|
+
|
|
168
179
|
# Export requirements for other tools
|
|
169
180
|
uv export > requirements.txt
|
|
170
181
|
```
|
|
@@ -24,8 +24,8 @@ This project adheres to the [Contributor Covenant Code of Conduct](CODE_OF_CONDU
|
|
|
24
24
|
|
|
25
25
|
### Prerequisites
|
|
26
26
|
|
|
27
|
-
- Python 3.11 or higher
|
|
28
|
-
- [
|
|
27
|
+
- Python 3.11 or higher (3.11-3.14 supported)
|
|
28
|
+
- [uv](https://docs.astral.sh/uv/) for dependency management (10-100x faster than Poetry)
|
|
29
29
|
- [pyenv](https://github.com/pyenv/pyenv) (recommended for managing Python versions)
|
|
30
30
|
- Git
|
|
31
31
|
|
|
@@ -56,24 +56,32 @@ pyenv install 3.14.0
|
|
|
56
56
|
pyenv local 3.11.11 3.12.9 3.13.5 3.14.0
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
-
### 2. Install
|
|
59
|
+
### 2. Install uv
|
|
60
60
|
|
|
61
61
|
```bash
|
|
62
|
-
curl -
|
|
62
|
+
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**Verify installation:**
|
|
66
|
+
```bash
|
|
67
|
+
uv --version
|
|
68
|
+
# Should show: uv 0.9.x or later
|
|
63
69
|
```
|
|
64
70
|
|
|
65
71
|
### 3. Install Dependencies
|
|
66
72
|
|
|
67
73
|
```bash
|
|
68
|
-
|
|
74
|
+
uv sync
|
|
69
75
|
```
|
|
70
76
|
|
|
71
77
|
This installs all dependencies including dev, test, lint, and docs groups.
|
|
72
78
|
|
|
79
|
+
**Note**: If you previously used Poetry, see [docs/migration-poetry-to-uv.md](../docs/migration-poetry-to-uv.md) for migration instructions.
|
|
80
|
+
|
|
73
81
|
### 4. Set Up Pre-commit Hooks
|
|
74
82
|
|
|
75
83
|
```bash
|
|
76
|
-
|
|
84
|
+
uv run pre-commit install
|
|
77
85
|
```
|
|
78
86
|
|
|
79
87
|
Pre-commit hooks automatically:
|
|
@@ -101,16 +109,16 @@ Write clean, well-tested code following our style guidelines.
|
|
|
101
109
|
|
|
102
110
|
```bash
|
|
103
111
|
# Run all tests with coverage
|
|
104
|
-
|
|
112
|
+
uv run tox
|
|
105
113
|
|
|
106
114
|
# Run only unit tests
|
|
107
|
-
|
|
115
|
+
uv run pytest tests/unit
|
|
108
116
|
|
|
109
117
|
# Run BDD tests
|
|
110
|
-
|
|
118
|
+
uv run tox -e bdd
|
|
111
119
|
|
|
112
120
|
# Run linting
|
|
113
|
-
|
|
121
|
+
uv run tox -e lint
|
|
114
122
|
```
|
|
115
123
|
|
|
116
124
|
### 4. Commit Your Changes
|
|
@@ -145,13 +153,13 @@ Then create a Pull Request on GitHub.
|
|
|
145
153
|
|
|
146
154
|
```bash
|
|
147
155
|
# Format code with ruff
|
|
148
|
-
|
|
156
|
+
uv run ruff format .
|
|
149
157
|
|
|
150
158
|
# Check and fix linting issues
|
|
151
|
-
|
|
159
|
+
uv run ruff check . --fix
|
|
152
160
|
|
|
153
161
|
# Check type hints
|
|
154
|
-
|
|
162
|
+
uv run mypy valid8r
|
|
155
163
|
```
|
|
156
164
|
|
|
157
165
|
### Code Patterns
|
|
@@ -312,7 +320,7 @@ See [.github/CONVENTIONAL_COMMITS.md](.github/CONVENTIONAL_COMMITS.md) for more
|
|
|
312
320
|
|
|
313
321
|
### Before Submitting
|
|
314
322
|
|
|
315
|
-
1. Ensure all tests pass: `
|
|
323
|
+
1. Ensure all tests pass: `uv run tox`
|
|
316
324
|
2. Update documentation if needed
|
|
317
325
|
3. Add changelog entry if applicable
|
|
318
326
|
4. Verify your commits follow the conventional commit format
|
|
@@ -403,10 +411,10 @@ def parse_email(text: str) -> Maybe[EmailAddress]:
|
|
|
403
411
|
|
|
404
412
|
```bash
|
|
405
413
|
# Build documentation
|
|
406
|
-
|
|
414
|
+
uv run docs-build
|
|
407
415
|
|
|
408
416
|
# Serve with live reload
|
|
409
|
-
|
|
417
|
+
uv run docs-serve
|
|
410
418
|
```
|
|
411
419
|
|
|
412
420
|
View at http://localhost:8000
|
|
@@ -431,17 +439,17 @@ View at http://localhost:8000
|
|
|
431
439
|
|
|
432
440
|
```bash
|
|
433
441
|
# Run smoke test
|
|
434
|
-
python smoke_test.py
|
|
442
|
+
uv run python smoke_test.py
|
|
435
443
|
|
|
436
444
|
# Check coverage
|
|
437
|
-
|
|
445
|
+
uv run pytest --cov=valid8r --cov-report=html tests/unit
|
|
438
446
|
# View at htmlcov/index.html
|
|
439
447
|
|
|
440
448
|
# Run specific test
|
|
441
|
-
|
|
449
|
+
uv run pytest tests/unit/test_parsers.py::DescribeParseInt::it_parses_positive_integers
|
|
442
450
|
|
|
443
451
|
# Watch mode (requires pytest-watch)
|
|
444
|
-
|
|
452
|
+
uv run ptw tests/unit
|
|
445
453
|
```
|
|
446
454
|
|
|
447
455
|
### Debugging
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: valid8r
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.2
|
|
4
4
|
Summary: Clean, flexible input validation for Python applications
|
|
5
5
|
Project-URL: Homepage, https://valid8r.readthedocs.io/
|
|
6
6
|
Project-URL: Repository, https://github.com/mikelane/valid8r
|
|
@@ -269,28 +269,36 @@ For more examples, see the [documentation](https://valid8r.readthedocs.io/).
|
|
|
269
269
|
|
|
270
270
|
## Development
|
|
271
271
|
|
|
272
|
-
This project uses
|
|
272
|
+
This project uses `uv` for fast dependency management and `tox` for testing across Python versions.
|
|
273
273
|
|
|
274
274
|
### Setup
|
|
275
275
|
|
|
276
276
|
```bash
|
|
277
|
-
# Install
|
|
278
|
-
curl -
|
|
277
|
+
# Install uv
|
|
278
|
+
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
279
279
|
|
|
280
280
|
# Install dependencies
|
|
281
|
-
|
|
281
|
+
uv sync
|
|
282
282
|
```
|
|
283
283
|
|
|
284
284
|
### Running Tests
|
|
285
285
|
|
|
286
286
|
```bash
|
|
287
287
|
# Run all tests
|
|
288
|
-
|
|
288
|
+
uv run tox
|
|
289
|
+
|
|
290
|
+
# Run unit tests only
|
|
291
|
+
uv run pytest tests/unit
|
|
289
292
|
|
|
290
293
|
# Run BDD tests
|
|
291
|
-
|
|
294
|
+
uv run tox -e bdd
|
|
295
|
+
|
|
296
|
+
# Run with coverage
|
|
297
|
+
uv run pytest --cov=valid8r tests/unit
|
|
292
298
|
```
|
|
293
299
|
|
|
300
|
+
See [docs/migration-poetry-to-uv.md](docs/migration-poetry-to-uv.md) for the complete migration guide and command reference.
|
|
301
|
+
|
|
294
302
|
## License
|
|
295
303
|
|
|
296
304
|
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
@@ -238,28 +238,36 @@ For more examples, see the [documentation](https://valid8r.readthedocs.io/).
|
|
|
238
238
|
|
|
239
239
|
## Development
|
|
240
240
|
|
|
241
|
-
This project uses
|
|
241
|
+
This project uses `uv` for fast dependency management and `tox` for testing across Python versions.
|
|
242
242
|
|
|
243
243
|
### Setup
|
|
244
244
|
|
|
245
245
|
```bash
|
|
246
|
-
# Install
|
|
247
|
-
curl -
|
|
246
|
+
# Install uv
|
|
247
|
+
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
248
248
|
|
|
249
249
|
# Install dependencies
|
|
250
|
-
|
|
250
|
+
uv sync
|
|
251
251
|
```
|
|
252
252
|
|
|
253
253
|
### Running Tests
|
|
254
254
|
|
|
255
255
|
```bash
|
|
256
256
|
# Run all tests
|
|
257
|
-
|
|
257
|
+
uv run tox
|
|
258
|
+
|
|
259
|
+
# Run unit tests only
|
|
260
|
+
uv run pytest tests/unit
|
|
258
261
|
|
|
259
262
|
# Run BDD tests
|
|
260
|
-
|
|
263
|
+
uv run tox -e bdd
|
|
264
|
+
|
|
265
|
+
# Run with coverage
|
|
266
|
+
uv run pytest --cov=valid8r tests/unit
|
|
261
267
|
```
|
|
262
268
|
|
|
269
|
+
See [docs/migration-poetry-to-uv.md](docs/migration-poetry-to-uv.md) for the complete migration guide and command reference.
|
|
270
|
+
|
|
263
271
|
## License
|
|
264
272
|
|
|
265
273
|
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
@@ -17,23 +17,26 @@ Setting Up Your Development Environment
|
|
|
17
17
|
git clone https://github.com/your-username/valid8r.git
|
|
18
18
|
cd valid8r
|
|
19
19
|
|
|
20
|
-
3. **Set up
|
|
20
|
+
3. **Set up uv**
|
|
21
21
|
|
|
22
|
-
Valid8r uses
|
|
22
|
+
Valid8r uses uv for fast dependency management. Make sure you have uv installed:
|
|
23
23
|
|
|
24
24
|
.. code-block:: bash
|
|
25
25
|
|
|
26
|
-
# Install
|
|
27
|
-
curl -
|
|
26
|
+
# Install uv if you don't have it
|
|
27
|
+
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
28
|
+
|
|
29
|
+
# Verify installation
|
|
30
|
+
uv --version
|
|
28
31
|
|
|
29
32
|
# Install dependencies
|
|
30
|
-
|
|
33
|
+
uv sync
|
|
31
34
|
|
|
32
35
|
4. **Set up pre-commit hooks**
|
|
33
36
|
|
|
34
37
|
.. code-block:: bash
|
|
35
38
|
|
|
36
|
-
|
|
39
|
+
uv run pre-commit install
|
|
37
40
|
|
|
38
41
|
Development Workflow
|
|
39
42
|
--------------------
|
|
@@ -58,26 +61,26 @@ Development Workflow
|
|
|
58
61
|
.. code-block:: bash
|
|
59
62
|
|
|
60
63
|
# Run unit tests
|
|
61
|
-
|
|
64
|
+
uv run pytest tests/unit
|
|
62
65
|
|
|
63
66
|
# Run BDD tests
|
|
64
|
-
|
|
67
|
+
uv run behave tests/bdd/features
|
|
65
68
|
|
|
66
69
|
# Run all tests with tox (multiple Python versions)
|
|
67
|
-
|
|
70
|
+
uv run tox
|
|
68
71
|
|
|
69
72
|
4. **Check code quality**
|
|
70
73
|
|
|
71
74
|
.. code-block:: bash
|
|
72
75
|
|
|
73
76
|
# Run ruff for linting
|
|
74
|
-
|
|
77
|
+
uv run ruff check .
|
|
75
78
|
|
|
76
79
|
# Run isort to check imports
|
|
77
|
-
|
|
80
|
+
uv run isort --check-only valid8r tests
|
|
78
81
|
|
|
79
82
|
# Run mypy for type checking
|
|
80
|
-
|
|
83
|
+
uv run mypy valid8r
|
|
81
84
|
|
|
82
85
|
5. **Commit your changes**
|
|
83
86
|
|
|
@@ -151,10 +154,10 @@ Documentation is a crucial part of Valid8r:
|
|
|
151
154
|
.. code-block:: bash
|
|
152
155
|
|
|
153
156
|
# Build documentation
|
|
154
|
-
|
|
157
|
+
uv run docs-build
|
|
155
158
|
|
|
156
159
|
# Serve documentation locally
|
|
157
|
-
|
|
160
|
+
uv run docs-serve
|
|
158
161
|
|
|
159
162
|
Pull Request Process
|
|
160
163
|
--------------------
|
|
@@ -45,42 +45,45 @@ The test directory structure is organized as follows:
|
|
|
45
45
|
Running Tests
|
|
46
46
|
-------------
|
|
47
47
|
|
|
48
|
-
You can run tests using
|
|
48
|
+
You can run tests using uv or tox:
|
|
49
49
|
|
|
50
50
|
.. code-block:: bash
|
|
51
51
|
|
|
52
52
|
# Run all tests with the current Python version
|
|
53
|
-
|
|
53
|
+
uv run pytest
|
|
54
54
|
|
|
55
55
|
# Run only unit tests
|
|
56
|
-
|
|
56
|
+
uv run pytest tests/unit
|
|
57
57
|
|
|
58
58
|
# Run only BDD tests
|
|
59
|
-
|
|
59
|
+
uv run behave tests/bdd/features
|
|
60
60
|
|
|
61
61
|
# Run tests with coverage
|
|
62
|
-
|
|
62
|
+
uv run pytest --cov=valid8r tests/unit
|
|
63
63
|
|
|
64
|
-
# Run tests across all supported Python versions
|
|
65
|
-
|
|
64
|
+
# Run tests across all supported Python versions (3.11-3.14)
|
|
65
|
+
uv run tox
|
|
66
66
|
|
|
67
67
|
# Run tests for a specific Python version
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
uv run tox -e py313 # primary dev version
|
|
69
|
+
uv run tox -e py311 # minimum supported
|
|
70
|
+
uv run tox -e py314 # latest supported
|
|
70
71
|
|
|
71
72
|
# Run only BDD tests with tox
|
|
72
|
-
|
|
73
|
+
uv run tox -e bdd
|
|
73
74
|
|
|
74
75
|
Continuous Integration
|
|
75
76
|
----------------------
|
|
76
77
|
|
|
77
78
|
Valid8r uses GitHub Actions for continuous integration. The CI pipeline runs:
|
|
78
79
|
|
|
79
|
-
1. Tests across all supported Python versions
|
|
80
|
+
1. Tests across all supported Python versions (3.11, 3.12, 3.13, 3.14)
|
|
80
81
|
2. Code quality checks (ruff, isort, mypy)
|
|
81
82
|
3. Documentation builds
|
|
82
83
|
4. Coverage reporting
|
|
83
84
|
|
|
85
|
+
The migration to uv has resulted in approximately 60% faster CI pipelines compared to Poetry.
|
|
86
|
+
|
|
84
87
|
Writing Unit Tests
|
|
85
88
|
------------------
|
|
86
89
|
|
|
@@ -187,9 +190,9 @@ Valid8r aims for high test coverage. You can generate a coverage report with:
|
|
|
187
190
|
|
|
188
191
|
.. code-block:: bash
|
|
189
192
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
+
uv run pytest --cov=valid8r tests/
|
|
194
|
+
uv run coverage report -m
|
|
195
|
+
uv run coverage html
|
|
193
196
|
|
|
194
197
|
The coverage report in HTML format will be generated in the `htmlcov` directory.
|
|
195
198
|
|
|
@@ -201,16 +204,16 @@ When tests fail, you can use the following options to help debug:
|
|
|
201
204
|
.. code-block:: bash
|
|
202
205
|
|
|
203
206
|
# Show print statements during tests
|
|
204
|
-
|
|
207
|
+
uv run pytest -s
|
|
205
208
|
|
|
206
209
|
# Increase verbosity
|
|
207
|
-
|
|
210
|
+
uv run pytest -v
|
|
208
211
|
|
|
209
212
|
# Run a specific test
|
|
210
|
-
|
|
213
|
+
uv run pytest tests/unit/test_maybe.py::DescribeMaybe::it_creates_just_values
|
|
211
214
|
|
|
212
215
|
# For BDD tests, run a specific scenario
|
|
213
|
-
|
|
216
|
+
uv run behave tests/bdd/features/clean_type_parsing.feature:12
|
|
214
217
|
|
|
215
218
|
Testing Edge Cases
|
|
216
219
|
------------------
|
|
@@ -4,13 +4,19 @@ Getting Started
|
|
|
4
4
|
Installation
|
|
5
5
|
------------
|
|
6
6
|
|
|
7
|
-
Valid8r requires Python 3.11 or higher. You can install it using pip:
|
|
7
|
+
Valid8r requires Python 3.11 or higher (supports Python 3.11-3.14). You can install it using pip:
|
|
8
8
|
|
|
9
9
|
.. code-block:: bash
|
|
10
10
|
|
|
11
11
|
pip install valid8r
|
|
12
12
|
|
|
13
|
-
Or, if you use
|
|
13
|
+
Or, if you use uv (recommended for faster dependency resolution):
|
|
14
|
+
|
|
15
|
+
.. code-block:: bash
|
|
16
|
+
|
|
17
|
+
uv add valid8r
|
|
18
|
+
|
|
19
|
+
Or with Poetry:
|
|
14
20
|
|
|
15
21
|
.. code-block:: bash
|
|
16
22
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|