-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Django5plus #505
Open
kfields
wants to merge
13
commits into
nrbnlulu:main
Choose a base branch
from
kfields:django5plus
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Django5plus #505
Conversation
This file contains 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
Hey, thanks for the PR though I think I it is too intrusive and diffused for it's task which is just updating the django if you want you can spread this PR to few separated ones.
|
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.
This PR only affects project management/maintenance. The only real code changes were to make MyPy and Ruff happy. :)
Changes
Dependencies
"Django >=3.2,<6.0"
This is what Wagtail uses in their setup.py. It seems reasonable to me. I don't think there will be any breaking changes before the next major version.
Project Management
I replaced Poetry and the Makefile with Hatch.
I ended up doing this because I needed a way to use a test matrix locally and there wasn't a
.tox
file as mentioned in the CONTRIBUTING.md file. I started to write one but then it occured to me that if a test in a matrix did fail how could you easily shell into it to debug and fix the problem? With Hatch you can!I started using Hatch a couple of years ago when I was working on a project that used Maturin as a build backend and discovered that Poetry was non-standard and was not going to work out. I've been using it for all of my Python libraries ever since.
Github Workflows
I updated all actions to the latest versions.
gh-pages.yml
See: Creating a custom GitHub Actions workflow to publish your site
This is just easier. You don't have to deal with having a gh-pages branch. You will have to change from 'use branch' to 'use actions' in you settings though.
Tested via a toy project I wrote: cowsay-django
release.yml
Replaced poetry with hatch.
Unable to test on my end. Should work.
release_check.yml
Replaced poetry with hatch.
Unable to test on my end. Should work.
tests.yml
Replaced poetry with hatch.
Tested locally using act
Also tested on GitHub with cowsay-django
Make sure you have the
CODECOV_TOKEN
in your Repository secrets undersettings/secrets/actions
.mypy.yml
Integrated into tests.yml
dependabot.yml
Deleted. Doesn't belong there.
Documentation
_prebuild.py
Changed where it was copying the RELEASE.md to changelog.md, it should be copying CHANGELOG.md to changelog.md.
TODO: RELEASE.md needs to be appended to CHANGELOG.md and then copied to docs/changelog.md.
contributing.md
Updated to use Hatch commands instead of the Makefile.
Also added instructions on how to use the quickstart example.
Examples
Created an example directory and moved the quickstart example into it.
There should be more examples. Captcha comes to mind.
Test clients would be nice.
quickstart
Added a pyproject.toml file with hatch commands to bootstrap and serve the project.
I tested it through GraphiQl and it wasn't authenticating until I changed:
schema = strawberry.Schema(query=Query, mutation=Mutation, extensions=[SchemaDirectiveExtension])
to:
schema = JwtSchema(query=Query, mutation=Mutation)
Test Project
Created an index page with links to the different graphql endpoints. Looks better than a 404.
Moved manage.py up to the repo root to simplify things.
Deleted migrate.py from the repo root because it conflicts with using migrate via manage.py since they use different settings. Like this:
This doesn't affect the tests since they create temporary databases for each pytest command.
So, settings_b is used to serve the testproject.