Enhance for development processes

This commit is contained in:
chrisbroderick 2022-09-08 23:31:02 +01:00
parent 673d12c67b
commit 9627c17a45
2 changed files with 34 additions and 0 deletions

View File

@ -57,6 +57,19 @@ test:
$(PIP) install -e .[test]
$(TOX)
rm -rf var
#: format - Run the PEP8 formatter.
.PHONY: format
format:
autopep8 --exit-code --global-config .flake8 helpdesk
#: checkformat - checks formatting against configured format specifications for the project.
.PHONY: checkformat
checkformat:
flake8 helpdesk --count --show-source --statistics --exit-zero --max-complexity=20
#: documentation - Build documentation (Sphinx, README, ...).

View File

@ -69,9 +69,30 @@ Django project.
For further installation information see `docs/install.html`
and `docs/configuration.html`
Developer Environment
---------------------
Follow these steps to set up your development environment to contribute to helpdesk:
- install a virtual environment
- using virtualenv from the helpdesk base folder do::
virtualenv .venv && source .venv/bin/activate
- install the requirements for development::
pip install -r requirements.txt -r requirements-dev.txt
To see option for the Makefile run: `make`
The project enforces a standardized formatting in the CI/CD pipeline. To ensure you have the correct formatting run::
make checkformat
To auto format any code use this::
make format
Testing
-------
From the command line you can run the tests using: `make test`
See `quicktest.py` for usage details.
Upgrading from previous versions