diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md new file mode 100644 index 0000000..645e23c --- /dev/null +++ b/DEVELOPMENT.md @@ -0,0 +1,27 @@ +# Build + +1. Install `build` for example via `pacman -S python-build` on ArchLinux + +2. Afterwards run the command to generate pip packgases in `dist/`: `pyproject-build` + +This is also needed before development because the command generates `./src/nsupdate/_version.py`. + +# Run tests + +Tests need to run inside Docker because they depend on bind9 config. + +1. Build the docker image using: `docker build -t nsupdate scripts/docker/` once + +2. Then run tests via `docker run --dns 127.0.0.1 -v $PWD:/app nsupdate` + +# Lint + +Run pylint in error-only mode to check any problems: `pipenv run pylint src/nsupdate` + +# Test locally + +1. Create database using `pipenv run python ./manage.py migrate` + +2. Create a superuser with `pipenv run python ./manage.py createsuperuser` + +2. Run the server with `pipenv run python ./manage.py runserver`