Add DEVELOPMENT.md to list common development commands

This commit is contained in:
Florian Eitel 2023-01-15 12:47:06 +01:00
parent e1b3eb95ae
commit 1c435d5c1e
Signed by: flo
GPG Key ID: 9987EAFEF6F686BB

27
DEVELOPMENT.md Normal file
View File

@ -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`