uvinstalled locally- Python
3.13available, as declared in.python-version
make syncIf your environment cannot write to the default uv cache location, prefix the commands with UV_CACHE_DIR=.uv-cache.
If you change dependencies in pyproject.toml, regenerate the lockfile with:
make lock
make syncRun the unit tests:
make testRun lint checks:
make lintBuild the package:
make buildTest against a specific Django branch:
make test-django DJANGO_CONSTRAINT="django>=5.1,<5.2" PYTHON=3.13django_dbml/management/commands/dbml.py: thin Django management command entrypointdjango_dbml/core/options.py: generation options shared across the coredjango_dbml/core/selection.py: model selection and related-model expansiondjango_dbml/core/builder.py: Django model introspection and schema assemblydjango_dbml/core/renderer.py: DBML renderingdjango_dbml/core/schema.py: intermediate dataclasses for tables, fields, indexes, enums, and relationsdjango_dbml/utils.py: small string-formatting helperstests/testapp/: isolated Django app used to exercise the extensiontests/test_command.py: command-level teststests/test_utils.py: unit tests for helper behavior
The repository publishes from GitHub Actions using a gated release flow:
CIruns the Django/Python compatibility matrixCIruns lint separatelyCIruns a package build check separately- publish workflows reuse
CIbefore building release artifacts - release artifacts are built once, uploaded, and published from those exact artifacts
- production publishing happens only from tags in the format
X.Y.Z - the production workflow validates that the Git tag matches
project.version - publishing uses PyPI Trusted Publishing, not long-lived API tokens
- TestPyPI publishing is manual via
workflow_dispatch - TestPyPI can also use Trusted Publishing when configured on TestPyPI
Before releasing locally, run:
make test
make lint
make buildRecommended production release flow:
make test
make lint
make build
git tag 1.1.2
git push origin 1.1.2After the tag is pushed, the PyPI workflow publishes that version if CI passes and the tag matches the package version.
If you use GitHub Releases, create the release from the existing version tag instead of using branch pushes as the release trigger.
The detailed development guide lives in docs/development.md.