Skip to content

fix: ci and group pkg installs#2902

Merged
JacobCoffee merged 1 commit into
mainfrom
fix/guard-debug-toolbar-import
Feb 19, 2026
Merged

fix: ci and group pkg installs#2902
JacobCoffee merged 1 commit into
mainfrom
fix/guard-debug-toolbar-import

Conversation

@JacobCoffee
Copy link
Copy Markdown
Member

@JacobCoffee JacobCoffee commented Feb 18, 2026

Summary

  • Use pip install --group dev (PEP 735) instead of pip install '.[dev]' in CI and Dockerfile
    • Dev deps are under [dependency-groups], not [project.optional-dependencies]
    • This was causing all dev deps (coverage, debug_toolbar, factory-boy, etc.) to silently not install
  • Guard import debug_toolbar in urls.py and local.py with scoped ModuleNotFoundError check
    • Only suppresses when debug_toolbar itself is missing; re-raises transitive import failures

Test plan

  • CI migrations check passes
  • CI test suite runs (coverage, factory-boy, etc. installed)
  • Local make serve works with Docker

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings February 18, 2026 23:58
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 900d427654

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread pydotorg/urls.py Outdated
Copy link
Copy Markdown

Copilot AI left a 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 adds defensive error handling for the optional django-debug-toolbar dependency in the URL configuration. The change guards against ModuleNotFoundError when DEBUG=True in settings but the debug toolbar package is not installed, which can occur in CI environments or when only core dependencies are installed.

Changes:

  • Wrapped debug_toolbar import and URL pattern addition in try/except ImportError block

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@JacobCoffee JacobCoffee force-pushed the fix/guard-debug-toolbar-import branch from 900d427 to 716b962 Compare February 19, 2026 00:01
Comment thread pydotorg/settings/local.py
Copilot AI review requested due to automatic review settings February 19, 2026 00:07
@JacobCoffee JacobCoffee force-pushed the fix/guard-debug-toolbar-import branch from 716b962 to 96c7f4b Compare February 19, 2026 00:07
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pydotorg/urls.py Outdated
Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml Outdated
@JacobCoffee JacobCoffee force-pushed the fix/guard-debug-toolbar-import branch from 96c7f4b to 543e4a4 Compare February 19, 2026 00:21
Dev dependencies are defined under [dependency-groups] (PEP 735),
not [project.optional-dependencies]. Use `pip install --group dev`
instead of `pip install '.[dev]'` in CI and Dockerfile.

Guard debug_toolbar imports in local.py and urls.py with scoped
ModuleNotFoundError checks so missing transitive deps still surface.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings February 19, 2026 00:22
@JacobCoffee JacobCoffee force-pushed the fix/guard-debug-toolbar-import branch from 543e4a4 to 31c88ce Compare February 19, 2026 00:22
@JacobCoffee JacobCoffee changed the title fix: guard debug_toolbar import in urls.py fix: ci and group pkg installs Feb 19, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml
Comment thread Dockerfile
@JacobCoffee JacobCoffee merged commit 467e3c5 into main Feb 19, 2026
21 checks passed
@JacobCoffee JacobCoffee deleted the fix/guard-debug-toolbar-import branch February 19, 2026 00:29
Comment thread Dockerfile
install \
'.[dev]'
install --group dev \
.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gross

JacobCoffee added a commit that referenced this pull request Feb 19, 2026
The docs dependencies are in [dependency-groups], not
[project.optional-dependencies], so pip install '.[docs]' fails.
Use pip install --group docs to match the pattern from #2902.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
JacobCoffee added a commit that referenced this pull request Feb 19, 2026
The docs dependencies are in [dependency-groups], not
[project.optional-dependencies], so pip install '.[docs]' fails.
Use pip install --group docs to match the pattern from #2902.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants