-
Notifications
You must be signed in to change notification settings - Fork 32
feat: add initial test framework #157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a data-driven test framework for Vale rules using pytest, replacing manual test files with automated testing infrastructure. The framework validates Vale linting rules against expected outcomes defined in a manifest.
Key changes:
- Implements pytest-based test infrastructure with fixtures and parametrized tests
- Adds initial test coverage for two rules (000-US-spellcheck and 500-Repeated-words)
- Updates Vale configuration to enable repeated words rule and add RST directive ignores
Reviewed Changes
Copilot reviewed 41 out of 42 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/conftest.py | Core pytest configuration providing fixtures for manifest loading, Vale execution, and result validation |
| tests/test_rules.py | Main test functions implementing data-driven rule validation |
| tests/data/manifest.yml | Test manifest defining expected behaviors for two initial rules |
| tests/requirements.txt | Python dependencies including pytest, pyyaml, and vale 3.13.0.0 |
| .github/workflows/pytest.yml | GitHub Actions workflow to run tests on Python 3.10 and 3.12 |
| vale.ini | Configuration updates: enables repeated words rule, adds RST directive token ignores |
| test/.md, test/.rst, test/*.html | Removal of legacy manual test files |
| styles/Canonical/*.yml | Rule refinements including scope changes and pattern updates |
| styles/config/vocabularies/Canonical/accept.txt | Added "LTS" to accepted vocabulary |
| getting-started.md | Documentation addition about conditionally ignoring rules |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
chore: apply review suggestions Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
akcano
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Moves to a manifest generated test framework, implements some low level fixes, and adjust some rules.