We welcome many types of contributions, such as the following
- ideas
- bug reports
- code
- design
- community development
- outreach
- project management
In order to contribute code, you will need to run the project on your local computer.
Make sure you have installed the Poetry package manager before continuing onward in this developer guide.
Please sign our Contributor License Agreement prior to submitting any code.
Before writing any code, please choose or open an issue. If an issue exists, add a comment to claim that issue. If no related issue exists, create one and claim it.
You can download or clone this repository directly from GitHub, using a command line or GitHub Desktop.
To run this project locally, you need the following environment variable defined, such by creating a .env
file with the following contents.
DJANGO_DEBUG=True
We can automatically set the environment variables from the .env
file when activating the Poetry shell by installing the Poetry dotenv plugin.
Once you have the project cloned, you can install the project dependencies by running the following command from within the project root directory.
poetry install
Once the dependencies are installed, activate the virtual environment with the following command.
poetry shell
The following commands should be run from within the project/
subfolder of this repository. Use your command line tool to change directory into project/
.
Initialize and migrate the project database with the following command.
python manage.py migrate
Create a super-user so you can log into the project.
python manage.py createsuperuser
Run the project with the following command.
python manage.py runserver
Once the previous steps are complete and the server is running, visit the following URL in your web browser.
We use a .editorConfig to keep coding styles consistant between our different developers. See https://editorconfig.org/ for more information.
Now that the project is running, you can try things out and consider how you would like to contribute! :-)
Run the following command from within the project/
directory to generate a test coverage report.
coverage run --source='.' manage.py test
View the coverage report with the following command.
coverage report
Whenever there are simultaneous changes to our project dependencies, there is a high likelihood of conflicts in poetry.lock. This issue is not unique to our project and likely happens in every Poetry project with multiple developers.
First sync your fork of the repository to keep it up-to-date with upstream.
- Checkout to the main branch
git checkout main
- Update main
git pull
- Checkout to your working branch
git checkout your-branch
- Merge main branch into your working branch
git merge main
At this point, you may get a conflict in poetry.lock
. Here are some of the methods you can use to resolve the conflict:
In order to get poetry.lock
to look like it does in main
, you can do the following:
git checkout --theirs poetry.lock
poetry lock --no-update
- Delete the
poetry.lock
file - Re-generate the
poetry.lock
file by running:
poetry lock