Development

Contribution Guideline

Jazzband

This is a Jazzband project. By contributing you agree to abide by the Contributor Code of Conduct and follow the guidelines.

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/.

Here is a release procefure for releasing.

Procedure:

  1. check CI status testing result: https://github.com/jazzband/django-redshift-backend/actions?query=workflow%3ATest

  2. update release version/date in CHANGES.rst

  3. create Github release, tagging with version name that MUST following semver. e.g.: git tag 1.0.1

  4. publish Github release to invoke release process in Github Actions.

  5. approve release files. please check your email or https://jazzband.co/projects/django-redshift-backend

  6. check PyPI page: https://pypi.org/p/django-redshift-backend

  7. bump version in CHANGES.rst and commit/push them onto GitHub

Updated documentation

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