Update test and build infrastructure and test against Django 5#77
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR modernizes the build and test infrastructure by migrating from setup.py to pyproject.toml, updating Django support to include version 5, and implementing automatic PyPI publishing workflows. The infrastructure changes enable testing against multiple Python and Django version combinations while maintaining backward compatibility.
Key changes:
- Migrated package configuration from setup.py to pyproject.toml with modern Python packaging standards
- Updated test infrastructure to support Django 5 and dynamic version matrix testing
- Added automated PyPI publishing workflows triggered by Git tags and pushes
Reviewed Changes
Copilot reviewed 9 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| setup.py | Completely removed in favor of pyproject.toml configuration |
| pyproject.toml | Added comprehensive package configuration with Django 5 support and dynamic versioning |
| tests/settings.py | Updated Django settings for compatibility and added required context processor |
| .github/workflows/tests.yml | Enhanced CI with dynamic version matrix and Django 5 testing |
| .github/workflows/pypi.yml | Added automated PyPI publishing workflow |
| docs/conf.py | Updated Django settings module reference |
| docs/apidoc/django_prbac.rst | Removed references to deprecated mock_settings module |
| django_prbac/init.py | Version bump to 1.1.1 |
| PYPI_README.md | Updated release process documentation for automated workflow |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
...by moving them out of the django_prbac package
?: (admin.W411) 'django.template.context_processors.request' must be enabled in DjangoTemplates (TEMPLATES) in order to use the admin navigation sidebar. django_prbac.Grant: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'. HINT: Configure the DEFAULT_AUTO_FIELD setting or the AppConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'. django_prbac.Role: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'. HINT: Configure the DEFAULT_AUTO_FIELD setting or the AppConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'. django_prbac.UserRole: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'. HINT: Configure the DEFAULT_AUTO_FIELD setting or the AppConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
8ffc715 to
5e47d71
Compare
1 similar comment
|
I think the drop in coverage was due to moving the tests out of the |
Modernize build and test infrastructure. Automatically publish to PyPI when pushing to Github. Enable workflow dispatch on Github Actions workflows.
🐡 Review by commit.