WIP: Switch to ruff, optional deps (#35)#92
Draft
SmileyChris wants to merge 8 commits intoradiac:mainfrom
Draft
Conversation
- Replace black and isort dependencies with ruff - Update converter.py to use ruff subprocess for formatting generated code - Update ruff config with isort rules and Django-aware sections - Bump pre-commit ruff version to v0.14.13
Split dependencies into optional extras: - api: django-ninja for @app.api - serve: gunicorn/uvicorn for production servers - convert: ruff for code formatting - static: django-nanopages, django-distill - all: everything (previous default behavior) Core install now only requires click, Django, pluggy, whitenoise.
- Switch from --with pytest to --group dev pattern - This ensures uv uses pyproject.toml coverage config - Add coverage to dev dependency-group - Filter coverage run output to show only test summary
- Add `just test-env [python] [extras]` for running individual matrix items - Add Python 3.10 to both justfile and CI matrix (matches pyproject.toml minimum)
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.
Summary
api: django-ninjaserve: gunicorn, uvicornconvert: ruffstatic: django-nanopages, django-distillall: everything (previous default)Install options
pip install nanodjango- minimal (views, models, admin)pip install nanodjango[api]- adds django-ninja for@app.apipip install nanodjango[serve]- adds gunicorn/uvicorn for productionpip install nanodjango[convert]- adds ruff for code formattingpip install nanodjango[all]- everythingBreaking change
This is a breaking change - existing users would need
pip install nanodjango[all]for current behavior.Test plan
[all]installs everything