If you're looking for user documentation, go here.
Follow the instruction below to set up a development environment. We use Python 3.10 and Django 4.0.x for development.
- GDAL 3.3.2 or later
- PostgreSQL database with the PostGIS extension
Create a virtual environment, activate it, and install the development dependencies in it. This will enable you to run the tests and web-apps later. For Windows read here.
# Create a virtual environment, e.g. with
python3 -m venv ./venv
# activate virtual environment
source venv/bin/activate
# make sure to have a recent version of pip and setuptools
python3 -m pip install --upgrade pip setuptools
# (from the project root directory)
# install development dependencies
pip install -r requirements.txt
-
Create a
.env
file with a secret key for the django project, and the database configuration, such as:# .env file in ./citizenvoice/ SECRET_KEY = 'django-insecure-<a hexadecimal string>' POSTGRES_USER = '<username>' POSTGRES_DBASE = '<database-name>' POSTGRES_PWD = '<password>' POSTGRES_HOST = '<server-name/IP>' POSTGRES_PORT = '<port-number>'
-
Run the development server from the project directory. Saved changes will be authomatically reloaded:
python manage.py runserver
Running the tests requires an activated virtual environment with the development tools installed.
# unit tests
cd ./citizenvoice
python manage.py test
- Make sure the
CHANGELOG.md
has been updated - Verify that the information in
CITATION.cff
is correct, and that.zenodo.json
contains equivalent data - Make sure that
version
in setup.cfg andversion
in CITATION.cff have been bumped to the to-be-released version of the template - Run the unit tests with
python manage.py test
- Go through the steps outlined above for generating a new package from the command line, and verify that the generated package works as it should.
- Make sure that the GitHub-Zenodo integration is enabled for https://github.com/NLeSC/python-template
- Go to https://github.com/NLeSC/python-template/releases and click
Draft a new release