Conversation
There was a problem hiding this comment.
Pull request overview
This PR tightens and documents the developer/agent workflow for Immermatch, while applying small refactors driven by stricter linting and improving CI expectations.
Changes:
- Consolidates runtime dependencies into base
pyproject.toml(removing theprodextra) and updates workflows accordingly. - Enables additional Ruff rule families (
B,C4,SIM,RET) and applies small code refactors to satisfy them. - Adds/updates agent + Copilot guidance docs (CLAUDE quick reference + Copilot prompt files) and raises CI coverage threshold.
Reviewed changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_app_consent.py | Adjusts exception chaining to satisfy stricter linting (Bugbear-style guidance). |
| pyproject.toml | Removes prod extra, expands Ruff lint selection, keeps test/dev extras. |
| immermatch/serpapi_provider.py | Simplifies localise_query() return to align with return-style lint rules. |
| immermatch/pages/verify.py | Replaces try/except with contextlib.suppress for secrets→env injection. |
| immermatch/pages/unsubscribe.py | Same contextlib.suppress refactor for secrets→env injection. |
| immermatch/pages/privacy.py | Same contextlib.suppress refactor for secrets→env injection. |
| immermatch/pages/impressum.py | Same contextlib.suppress refactor for secrets→env injection. |
| immermatch/bundesagentur.py | Minor parsing simplification and flattens executor context management. |
| immermatch/app.py | Refactors secrets→env injection to contextlib.suppress. |
| CLAUDE.md | Replaces prior stub with a quick-reference agent guide. |
| AGENTS.md | Updates testing table and clarifies CLAUDE.md’s role; adds ruff format --check. |
| .github/workflows/daily-digest.yml | Installs package without .[prod] extra (now removed). |
| .github/workflows/ci.yml | Raises coverage threshold from 50% → 60%. |
| .github/copilot/write-tests.prompt.md | Adds Copilot prompt guidance for tests (contains a couple incorrect patch targets). |
| .github/copilot/new-pydantic-model.prompt.md | Adds Copilot prompt guidance for models (contains incorrect list-default guidance). |
| .github/copilot/new-db-function.prompt.md | Adds Copilot prompt guidance for DB functions. |
| .github/copilot-instructions.md | Updates Copilot instructions, adds architecture summary and formatting check. |
Comments suppressed due to low confidence (3)
.github/copilot/new-pydantic-model.prompt.md:13
- The guidance to use
= []for list defaults is unsafe (mutable default) and also contradicts this repo’s current Pydantic patterns, which consistently useField(default_factory=list)for lists. Update this instruction to recommenddefault_factory=list(orField(default_factory=list, ...)) for list fields to avoid shared mutable defaults.
3. **Default values:** Use `= []` for simple lists, `default_factory=list` for mutable defaults in `Field()`
4. **Add tests in `tests/test_models.py`:**
.github/copilot/write-tests.prompt.md:9
immermatch/serpapi_provider.pydoesn’t defineserpapi_search; the external call is made viaGoogleSearch(or you can patchsearch_jobs). Update this patch target so tests don’t fail with an AttributeError / ineffective mocking.
- SerpApi: `@patch("immermatch.serpapi_provider.serpapi_search")`
.github/copilot/write-tests.prompt.md:10
immermatch/bundesagentur.pyuseshttpx.Client, notrequests.get. Update the suggested patch target to something that actually intercepts network calls (e.g., patchhttpx.Client.getin the module under test, or patchBundesagenturProvider._get_with_retry/_fetch_detail*).
- Bundesagentur: `@patch("immermatch.bundesagentur.requests.get")`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.