Development

Contribution Guideline

Contributing

django-redshift-backend is maintained at https://github.com/shimizukawa/django-redshift-backend.

Bug reports and pull requests are welcome. See the development guide for setup and testing instructions. By contributing, you agree to follow the Code of Conduct.

Report security vulnerabilities privately using the procedure in SECURITY.md, not in a public issue.

Issue Reporting

To Be Written

Setup development environment

  • Requires supported Python version

  • do setup under django-redshift-backend.git repository root as:

    $ pip install uv
    $ uv sync
    

Testing

Run test

Just run tox:

$ tox

tox have several sections for testing.

To test the database migration as well, start postgres and test it as follows:

$ cd tests
$ docker-compose up -d
$ TEST_WITH_POSTGRES=1 tox

To test migrations with Redshift, do it as follows:

  1. Create your redshift cruster on AWS

  2. Get a redshift endpoint URI

  3. run tox as: TEST_WITH_REDSHIFT=redshift://user:password@<cluster>.<slug>.<region>.redshift.amazonaws.com:5439/<database>?DISABLE_SERVER_SIDE_CURSORS=True tox

CI (Continuous Integration)

All tests will be run on Github Actions:

Pull Request

To Be Written

Build package

Use build:

$ uv build

Releasing

New package version

The django-redshift-backend package will be uploaded to PyPI: https://pypi.org/project/django-redshift-backend/.

Use the checklist below to track release readiness.

  • [ ] Review CI results and known failures.

  • [ ] Update CHANGES.rst and version = release in doc/conf.py.

  • [ ] Run uv build and uvx twine check dist/*; check versions and project URLs.

  • [ ] Confirm Trusted Publishing and environment settings (pypi; testpypi for testing).

  • [ ] If needed, manually run the Release workflow to publish to TestPyPI.

  • [ ] Create the version tag, verify the tagged build’s version, then push the tag to publish to PyPI.

  • [ ] Approve the deployment if required; check PyPI files, attestations, and installation.

  • [ ] If creating a GitHub Release for a development version, mark it as a pre-release.

Updated documentation

Sphinx documentation under doc/ directory on the master branch will be automatically uploaded into ReadTheDocs: https://django-redshift-backend.rtfd.io/.