You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e46f40b
Browse filesBrowse the repository at this point in the historyBrowse files
The clean release ships without a tests/ folder, so the original CI's
pytest+coverage steps had nothing to run. Strip them from ci.yml, drop
pytest extras and ini_options from pyproject, and remove dead test
references from CONTRIBUTING.md and README.md.
CI now runs ruff, bandit, and a docs-presence check across Python
3.10/3.11/3.12; inspect-smoke on PRs is unchanged.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+9-32Lines changed: 9 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Contributing to ifixai
2
2
3
-
Thanks for considering a contribution. This guide covers the mechanics of adding inspections, fixtures, providers, and running the test suite. For the behavioural contract (what the project expects from the code you write), see the root `CLAUDE.md` if it exists plus `.claude/rules/common/*.md` in the repository.
3
+
Thanks for considering a contribution. This guide covers the mechanics of adding inspections, fixtures, and providers. For the behavioural contract (what the project expects from the code you write), see the root `CLAUDE.md` if it exists plus `.claude/rules/common/*.md` in the repository.
4
4
5
5
## Environment setup
6
6
@@ -18,13 +18,10 @@ The `pre-commit install` step wires up local hooks (`gitleaks`, `ruff`, a `.env`
18
18
Verify:
19
19
20
20
```bash
21
-
ruff check ifixai tests
22
-
python -m pytest --cov=ifixai --cov-report=term
21
+
ruff check ifixai
23
22
```
24
23
25
-
The coverage floor is declared in `.github/workflows/ci.yml`. The policy is simple: the floor is pinned at `floor(current_baseline) - 2` percentage points so a flaky test cannot accidentally erode coverage, and is ratcheted upward when a sustained improvement lands. Drop-below fails CI.
26
-
27
-
## Adding a test (inspection)
24
+
## Adding an inspection
28
25
29
26
Each inspection is one file under `ifixai/tests/bNN_short_name.py`. The minimum contract:
30
27
@@ -35,14 +32,6 @@ Each inspection is one file under `ifixai/tests/bNN_short_name.py`. The minimum
35
32
5. Register the inspection in `ifixai/tests/registry.py` (import + add to `ALL_SPECS` + `create_inspection` switch).
36
33
6. Update `ifixai/scoring/category_weights.py` only if the inspection belongs to the strategic set.
37
34
38
-
### Inspection testing
39
-
40
-
Every inspection should have a companion test under `tests/test_bNN_*.py` covering at least:
Fixtures are YAML files under `ifixai/fixtures/`. Validate against `ifixai/fixtures/schema.json`. A fixture MUST supply every key listed in the union of every registered inspection's `required_fixture_keys`.
@@ -59,22 +48,12 @@ Providers implement the `ChatProvider` protocol from `ifixai/providers/base.py`.
59
48
2. Register the provider string in `ifixai/providers/resolver.py`.
60
49
3. Add an optional dependency extra in `pyproject.toml` under `[project.optional-dependencies]` so users install only what they need.
61
50
4. Do not swallow exceptions silently. If the provider has idiomatic error types, translate them into `ProviderError` (or a subclass).
62
-
5. Add `tests/test_<your_provider>.py` with stub / mock coverage.
@@ -91,19 +70,17 @@ Follow the Conventional Commits-style prefixes used by this project:
91
70
-`fix:` bug fix
92
71
-`refactor:` behaviour-preserving change
93
72
-`docs:` documentation only
94
-
-`test:` test-only changes
95
73
-`chore:` tooling / housekeeping
96
74
-`perf:` performance improvement
97
75
-`ci:` CI configuration
98
76
99
-
Keep commits small and atomic. Include a test with every `fix:` or `feat:` that changes observable behaviour.
77
+
Keep commits small and atomic.
100
78
101
79
## Pull requests
102
80
103
81
- Target branch: `main`.
104
-
- Include a test plan in the PR body.
105
-
- Confirm `ruff`, `pytest`, and `bandit` all pass locally before requesting review. `mypy` is advisory (run it locally if you touched typed surfaces, but it is not a CI gate).
106
-
- For any inspection / fixture / provider change, paste one worked example scorecard snippet (JSON or Markdown) into the PR body. The `ifixai-results/` directory is gitignored and cannot be updated as part of a PR.
82
+
- Confirm `ruff` and `bandit` pass locally before requesting review. `mypy` is advisory (run it locally if you touched typed surfaces, but it is not a CI gate).
83
+
- For any inspection / fixture / provider change, paste one worked example scorecard snippet (JSON or Markdown) into the PR body.
0 commit comments