-
-
Notifications
You must be signed in to change notification settings - Fork 1
Setting up a local development environment
For local development we use docker-compose so that we don't need to configure postgresql.
-
git clone https://github.com/geeksforsocialchange/imok.git
to download the repository -
docker-compose up
ormake run
to launch a postgresql database and the webserver -
docker-compose run web python manage.py migrate
ormake install
to run database migrations -
docker-compose run web python manage.py createsuperuser
ormake superuser
to create an admin user
You may also want to pip install -r requirements.txt
outside of Docker to get code completion in your editor
You should assume that we need to provide everything in multiple languages and support multiple timezones.
Specifically, you should make all strings translatable though:
from django.utils.translation import gettext as _
myvar = _("A string that a user or administrator will see")
print(myvar)
Tests are written using BDD in the features directory.
To run the tests:
docker-compose run web python manage.py behave --simple --failfast
or make test
We also provide twilio_mock.py for use with manual testing of the Twilio webhooks. It allows you to send a message to the system as follows:
python twilio_mock.py -f +15005550006 -m "NAME alice"
You can also achieve this through an HTTP Post using your favorite client:
curl -X POST --data '{"Body": "NAME alice", "From": "+15005550006"}' localhost:8000/application/twilio
We encourage contributions and are open to pull requests for improvements to imok.
If you follow the Conventional Commits standard for your commit messages then your PRs will be automatically labeled which helps with the release process, but this isn't a hard requirement.
Once you have submitted any pull request the test suite will automatically run against it. These tests need to pass before your change can be merged, but don't be afraid to raise a PR with broken tests - we can help you make them pass.
We use Release-Drafter to maintain releases. Repository administrators can see an unpublished release which gets automatically updated with release notes and suggested next version whenever PRs are merged.
A new release can be made at any point by editing the draft release and pressing Publish release
.
We use Semantic Versioning for our releases. Release-Drafter should automatically pick a sensible next release version number based on commit messages, but this can be overridden.
Given a version number MAJOR.MINOR.PATCH, releases should increment the:
- MAJOR version when you make incompatible API changes,
- MINOR version when you add functionality in a backwards compatible manner, and
- PATCH version when you make backwards compatible bug fixes.