Skip to content

Address CodeRabbit findings from PR #14 - #15

Merged
jpic merged 4 commits into
yourlabs:masterfrom
PurpleToti:coderabbit-fixes
Apr 27, 2026
Merged

jpic merged 4 commits into
yourlabs:masterfrom
PurpleToti:coderabbit-fixes

Conversation

@PurpleToti

Copy link
Copy Markdown

Summary

Follow-up to #14. Fixes all actionable CodeRabbit findings raised after the
initial review.

Changes

tox.ini — envlist cross-product

  • Replaced py{310,311,312,313,314}-dj{42,52,60} (15 envs, including invalid combos) with an explicit grouped envlist producing exactly the 10 valid pairs per the Django compatibility matrix
  • Fixed passenv to use comma-separated values (tox 4 requirement)

Tests — test_assertNoDiffSelector_non_ascii

  • Replaced test.Client().get('/admin/') (live request, Django-version-sensitive) with a directly constructed HttpResponse('<h1>à</h1>') — test no longer depends on the admin page at all
  • Removed stale fixture files from version control (MixinTest.test_assertNoDiffSelector_non_ascii.{content,metadata}); the test self-cleans at startup so they should never be committed
  • Added those paths to .gitignore
  • Dropped the now-redundant rm -rf lines from tox.ini

CI — Django version specifier

  • Fixed Django~=${dj}.0 (patch-only, e.g. >=4.2.0,<4.3) to Django>=${dj},<$((major+1)).0 (e.g. >=4.2,<5.0) to match the broader ranges used in tox.ini
  • Added cache: 'pip' to actions/setup-python for faster runs
  • Switched base install to pip install -e ".[test]" (see pyproject.toml extras below)

pyproject.toml

  • Added [project.optional-dependencies] with test and lint extras as the single source of truth for tooling deps
  • Removed contradictory line-length = 99 + ignore = ["E501"] from ruff config (keeping E501 enforced via ruff's default)

tox.ini — extras

  • [testenv] now uses extras = test; [testenv:qa] uses extras = lint — no more duplicate dep lists between tox and pyproject.toml

README

  • Fixed {content,status_code} → {content,metadata} in the fixture path example (matches actual filenames produced by response.py)
  • Fixed FixtureCreated → DiffsFound (matches the actual exception class)

Test plan

  • All 13 tests pass
  • ruff check responsediff passes
  • tox list produces exactly 10 envs + qa

🤖 Generated with Claude Code

PurpleToti and others added 3 commits April 24, 2026 16:56
The full cross-product py{310-314}-dj{42,52,60} created 15 envs
including invalid combos (py310-dj60, py314-dj42, etc).
Use grouped syntax to produce exactly the 10 valid pairs per Django docs.
Also fix passenv to use comma-separated values (tox 4 requirement).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- test_assertNoDiffSelector_non_ascii: replace live admin GET with a
  direct HttpResponse — test no longer depends on Django admin HTML
- Remove non-ascii fixture files from git (generated at runtime, test
  self-cleans); add to .gitignore; drop redundant tox rm -rf lines
- CI: fix Django pip specifier from ~=x.y.0 (patches only) to
  >=x.y,<(x+1).0 to match tox.ini's broader ranges
- tox: fix passenv to use comma-separated values (tox 4 requirement)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- README: fix {content,status_code} → {content,metadata} and
  FixtureCreated → DiffsFound (matches actual exception class)
- pyproject.toml: add [project.optional-dependencies] test/lint extras
  as single source of truth for test and lint tooling
- pyproject.toml: remove redundant line-length = 99 (E501 was ignored,
  making it a no-op; drop E501 from ignore so ruff enforces line length
  via its default 88-char limit instead)
- tox.ini: use extras = test / extras = lint instead of listing packages
  inline; deps now only contains the version-conditional Django entries
- CI: use pip install -e ".[test]" to stay in sync with pyproject.toml;
  add cache: pip to setup-python for faster runs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Apr 24, 2026 •

Copy link
Copy Markdown

Warning

Rate limit exceeded

@PurpleToti has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 35 minutes and 3 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 35 minutes and 3 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: aa1adb15-31ee-42ae-a200-453eef679a77

📥 Commits

Reviewing files that changed from the base of the PR and between 02de001 and 3d74cf1.

📒 Files selected for processing (8)
  • .github/workflows/ci.yml
  • .gitignore
  • README.rst
  • pyproject.toml
  • responsediff/tests/response_fixtures/MixinTest.test_assertNoDiffSelector_non_ascii.content
  • responsediff/tests/response_fixtures/MixinTest.test_assertNoDiffSelector_non_ascii.metadata
  • responsediff/tests/test_mixin.py
  • tox.ini
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

The [project.optional-dependencies] section was inserted after
dependencies but before classifiers, causing classifiers to be
parsed as an optional-dependency group instead of project metadata.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jpic
jpic merged commit 45fc77e into yourlabs:master Apr 27, 2026
7 checks passed
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