Conversation
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughConfiguration updates across devcontainer, pre-commit, and Pyright to adjust exclusions; dependency/version constants updated in context files, including new keys for code generators. No functional runtime or control-flow changes; primarily tooling and metadata updates. Changes
Sequence Diagram(s)Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Pre-merge checks (1 passed, 2 warnings)❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
Poem
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. ✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for GraphQL code generation for Python clients by introducing new package versions and excluding autogenerated code from linting and type checking. This enables easier generation of code for writing E2E tests.
- Adds ariadne_codegen and graphql_codegen package versions to context configuration
- Updates various package versions (pyinstaller, nuxt_ui, eslint, graphql_codegen packages)
- Excludes graphql_codegen and openapi_codegen directories from pre-commit hooks and type checking
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| template/extensions/context.py.jinja-base | Adds template variables for ariadne_codegen and graphql_codegen_typescript_operations versions |
| extensions/context.py | Updates package versions and adds new GraphQL codegen dependencies |
| .pre-commit-config.yaml | Excludes autogenerated code directories from linting and formatting hooks |
| pyrightconfig.json | Excludes autogenerated code directories from type checking |
| .devcontainer/devcontainer.json | Updates devcontainer context hash |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| context["nuxt_apollo_version"] = "{{ nuxt_apollo_version }}" | ||
| context["graphql_codegen_cli_version"] = "{{ graphql_codegen_cli_version }}" | ||
| context["graphql_codegen_typescript_version"] = "{{ graphql_codegen_typescript_version }}" | ||
| context["graphql_codegen_typescript_operations_version"] = "{{ graphql_codegen_typescript_version }}" |
There was a problem hiding this comment.
The variable name suggests this should use graphql_codegen_typescript_operations_version template variable, but it's using graphql_codegen_typescript_version. This will cause the typescript operations version to use the wrong template value.
| context["graphql_codegen_typescript_operations_version"] = "{{ graphql_codegen_typescript_version }}" | |
| context["graphql_codegen_typescript_operations_version"] = "{{ graphql_codegen_typescript_operations_version }}" |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.pre-commit-config.yaml (1)
232-236: Consistent exclusion of generated code across ruff/pylint/pyright — LGTMGood alignment across hooks. Optional: consider YAML anchors to DRY the repeated codegen patterns.
Example anchor usage:
minimum_pre_commit_version: 4.2.0 +# anchors to reuse common excludes +_codegen_exclude: &codegen_exclude | + (?x)^( + .*/graphql_codegen/.*| + .*/openapi_codegen/.* + )$ ... - id: ruff name: ruff-src args: [--fix, --config=./ruff.toml] files: src/.+\.py$ - exclude: | - (?x)^( - .*/graphql_codegen/.*| - .*/openapi_codegen/.* - )$ + exclude: *codegen_excludeAlso applies to: 241-245, 247-251, 258-264, 275-279
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
.devcontainer/devcontainer.json(1 hunks).pre-commit-config.yaml(3 hunks)extensions/context.py(2 hunks)pyrightconfig.json(1 hunks)template/extensions/context.py.jinja-base(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: lint-matrix (ubuntu-24.04, 3.12.7, --data-file tests/copier_data/data2.yaml)
🔇 Additional comments (9)
pyrightconfig.json (1)
13-14: Add codegen excludes for Pyright — LGTMExcluding generated GraphQL/OpenAPI code from type checking is appropriate here.
.devcontainer/devcontainer.json (1)
62-62: Auto-managed devcontainer context hash — LGTMNo action required.
template/extensions/context.py.jinja-base (1)
39-39: New template variables wired correctlyBoth ariadne_codegen_version and graphql_codegen_typescript_operations_version are correctly added and named.
Also applies to: 63-63
extensions/context.py (3)
44-44: Add ariadne codegen version — LGTMValue looks reasonable and matches the template variable.
37-37: Version bumps — LGTMpyinstaller_version, nuxt_ui_version, and eslint_version updates look fine.
Also applies to: 47-47, 60-60
66-68: Peer dependencies align; no compatibility issues
CLI v6.0.0 and both plugins at v5.0.0 support overlappinggraphqlranges (CLI: ^0.8.0–^16.0.0; plugins: ^0.12.0–^16.0.0) and have no conflicting peer requirements..pre-commit-config.yaml (3)
48-53: Typos exclude block — LGTMPatterns are scoped to minified/UMD assets; reasonable to skip for spelling checks.
58-62: Trailing-whitespace exclude — LGTMSnapshot and vendor paths excluded appropriately.
65-78: End-of-file-fixer excludes — LGTMExclusions align with generators and known edge cases.
Why is this change necessary?
Allow easier generation of code for writing E2E tests
How does this change address the issue?
Adds some excludes to pre-commit hooks to not touch the autogenerated code
Adds some versions to context.py
What side effects does this change have?
None
How is this change tested?
Downstream repos
Summary by CodeRabbit