Skip to content

Update deps#235

Closed
norkans7 wants to merge 2 commits intomainfrom
update-deps
Closed

Update deps#235
norkans7 wants to merge 2 commits intomainfrom
update-deps

Conversation

@norkans7
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings March 24, 2026 12:00
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.32%. Comparing base (77d92d1) to head (4d2e0e1).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #235   +/-   ##
=======================================
  Coverage   93.32%   93.32%           
=======================================
  Files          29       29           
  Lines        1843     1843           
=======================================
  Hits         1720     1720           
  Misses        123      123           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

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 updates the project’s Python formatting workflow to use Ruff’s formatter instead of Black, and re-applies formatting changes across the codebase alongside dependency / lockfile updates.

Changes:

  • Replace black usage with ruff format --check in code_check.py and remove Black config from pyproject.toml.
  • Update project config for Ruff/isort line length (120) and bump Ruff version in dev deps.
  • Regenerate uv.lock (including bumping requires-python to >=3.12 and updating some resolved packages).

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
uv.lock Regenerated lockfile reflecting Ruff/Black swap, Python requirement bump, and dependency resolution changes
pyproject.toml Removes Black config, updates Ruff/isort settings, bumps min Python + dependency constraints
code_check.py Switches formatting step from Black to ruff format --check
.github/workflows/ci.yml Updates Django matrix version (but still includes Python 3.11)
test_runner/tests.py Minor whitespace cleanup consistent with formatter output
test_runner/testapp/tests.py Formatting changes to assertions/ORM calls
test_runner/settings.py String literal concatenation cleanup in help text strings
dash/tags/models.py Removes stray blank line in class body
dash/stories/models.py String literal concatenation cleanup in help text
dash/orgs/views.py String literal concatenation cleanup in messages
dash/orgs/models.py String literal concatenation cleanup + formatting of field definition
dash/dashblocks/models.py String literal concatenation cleanup + one-line field formatting
dash/categories/models.py One-line field formatting

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

blank=True,
null=True,
help_text=_("A description of where this content type is used on the " "site and how it will be dsiplayed"),
help_text=_("A description of where this content type is used on the site and how it will be dsiplayed"),
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

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

Spelling in help text: "dsiplayed" should be "displayed".

Suggested change
help_text=_("A description of where this content type is used on the site and how it will be dsiplayed"),
help_text=_("A description of where this content type is used on the site and how it will be displayed"),

Copilot uses AI. Check for mistakes.
self.assertEqual(
kwargs, {"org": self.unicef, "uuid": "CF-002", "name": "Frank", "backend": self.floip_backend}
)
self.assertEqual(kwargs, {"org": self.unicef, "uuid": "CF-002", "name": "Frank", "backend": self.floip_backend})
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

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

This line looks inconsistent with the rest of the file’s formatting and may exceed the configured 120-char line length; ruff format --check (now enforced in code_check.py) may fail. Re-run ruff format and keep this assertion wrapped the way Ruff formats it.

Copilot uses AI. Check for mistakes.
Contact.objects.get(
org=self.unicef, uuid="C-002", name="Franky", backend=self.rapidpro_backend, is_active=True
)
Contact.objects.get(org=self.unicef, uuid="C-002", name="Franky", backend=self.rapidpro_backend, is_active=True)
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

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

This Contact.objects.get(...) call is now collapsed to a single long line; please re-run ruff format to ensure it matches Ruff’s formatter output (otherwise ruff format --check may fail in CI).

Copilot uses AI. Check for mistakes.
Comment on lines 8 to +10
matrix:
python-version: ["3.11.x", "3.12.x", "3.13.x"]
django-version: ["5.1.15", "5.2.9"]
django-version: ["5.1.15", "5.2.12"]
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

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

CI still runs Python 3.11 (matrix includes 3.11.x) even though this PR bumps requires-python to >=3.12 in pyproject.toml/uv.lock. This will fail uv sync/installs and also the release job still pins 3.11; update the workflow to only use supported Python versions (or revert the python requirement bump).

Copilot uses AI. Check for mistakes.
Comment on lines +18 to 33
requires-python = ">=3.12,<4.0"

dependencies = [
"Django (>= 5.1.15,< 5.3)",
"celery[redis] ~= 5.5.3",
"django-compressor >= 4.0",
"django-timezone-field >= 6.1.0",
"Pillow >= 9.4",
"Pillow >= 12.1.1",
"phonenumbers >=8.12.16",
"psycopg >= 3.1.9",
"python-dateutil >=2.8.2",
"rapidpro-python (>=2.21.0,<3.0.0)",
"smartmin (>=5.2.2,<6.0.0)",
"smartmin (>=5.2.5,<6.0.0)",
"sorl-thumbnail >= 12.9.0",
"django-valkey (>=0.2.1,<0.3.0)",
]
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

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

The PR title is about switching formatters (black -> ruff), but this also bumps the minimum Python version to 3.12 and updates runtime deps (e.g., Pillow, smartmin). If those changes aren’t required for the formatter switch, consider splitting them out (or documenting why the Python/dependency bumps are needed) to reduce upgrade risk for downstream consumers.

Copilot uses AI. Check for mistakes.
messages.info(
request,
_("Your account is not associated to an " "organization. Please Contact the adminstrator."),
_("Your account is not associated to an organization. Please Contact the adminstrator."),
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

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

Spelling: the user-facing message says "adminstrator"; should be "administrator" (and consider lowercasing "Contact" if it’s not intentionally capitalized).

Suggested change
_("Your account is not associated to an organization. Please Contact the adminstrator."),
_("Your account is not associated to an organization. Please contact the administrator."),

Copilot uses AI. Check for mistakes.
Comment on lines 23 to 24
help_text=_("The slug to idenfity this content type, used with the template tags"),
)
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

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

Spelling in help text: "idenfity" should be "identify".

Copilot uses AI. Check for mistakes.
@norkans7 norkans7 changed the title Replace black with ruff for code formatting Update deps Mar 24, 2026
@norkans7 norkans7 closed this Mar 25, 2026
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.

3 participants