Skip to content

Latest commit

 

History

History
49 lines (35 loc) · 1.4 KB

File metadata and controls

49 lines (35 loc) · 1.4 KB

Developing

Local development

  1. Fork https://github.com/adamghill/django-unicorn`
  2. git clone your forked repository
  3. cd django-unicorn
  4. Install pre-commit hooks: just install-pre-commit or uv run pre-commit install
  5. uv sync --extra minify --extra docs
  6. just runserver
  7. Go to localhost:8080 in your browser

To install in another project

  1. Download the repo to your local
  2. pip install -e ../django-unicorn from inside the other project's virtualenv or add django-unicorn = { path="../django-unicorn", develop=true } to the other project's pyproject.toml

Build Sphinx documentation

  1. just docs-serve

Run unit tests on local environment

  1. Python: just test-python
  2. JavaScript: npm run test

Run Python/Django matrix unit tests

  1. Install act
  2. act -W .github/workflows/python.yml -j test

Minify JavaScript

  1. npm install
  2. npm run build

Release

  1. Update docs/source/changelog.md
  2. Update version in pyproject.toml
  3. Commit changes
  4. Tag the release: git tag #.##.#
  5. Push the tag: git push origin --tags
  6. The GitHub Action will automatically:
    • Build the JavaScript assets with the correct version
    • Build the Python package with the correct version
    • Publish to PyPI
    • Create a GitHub release
  7. Make sure live package can be installed as expected (https://pypi.org/project/django-unicorn/)