next.filmfest.by
This is a WIP website for Cinema Perpetuum Mobile short film festival. Our goal is to gracefully replace the existing version of the website feature by feature.
The new version should have a good-enough admin panel that can be used by film festival volunteers. The featureset is taken from the experience we've gathered during previous festivals.
How to contribute
We welcome all contributors and enhancements that help to make an awesome tool for festival. Feel free to jump in and help with things to your liking.
The most straightforward areas to contribute are:
- backend written in Django / Wagtail
- frontend - a lot can be done here
- design / styling
- data migration (organize data related to previous festivals in JSON)
Communication
- Chat - https://vector.im/beta/#/room/#cpm-dev:matrix.org
- Board of Chaos- https://trello.com/b/6S00yyl1/next-filmfest-by-public
- Meeting Follow Ups (notes, sources for Trello)
Development process
We use github for development. In order to start one needs to fork and clone the repository:
-
fork kinaklub/next.filmfest.by using github UI
-
clone forked repository to one's local machine:
git clone [email protected]:yourusername/next.filmfest.by.git
-
add upstream repository as a remote:
git remote add upstream [email protected]:kinaklub/next.filmfest.by.git
Before starting working on next improvement one usually does the following:
-
switch to local
master
:git checkout master
-
pull recent changes from
upstream
master
:git pull upstream master
-
create a new feature branch:
git checkout -b branch_name
-
create corresponding branch in one's fork:
git push -u origin branch_name
After commiting everything to the feature branch one usually does the following:
-
push the changes to one's fork:
git push
-
create a pull request using github UI.
PR review process:
-
we use Travis CI for launching tests on PRs
-
we don't merge PRs to master until tests are green
-
we require the PRs to be reviewed by at least one team member
-
reviewer adds comment "LGTM" when one think the PR is good to be merged
-
PRs are usually merged by the authors
Development environment
-
Install Docker and docker-compose
-
Don't forget to set DOCKER_HOST environmental variable or add yourself to group
docker
-
Start web contatiner:
docker-compose up web
-
Give postgres 20-30 seconds to initialize
-
DB provisioning (should be performed only once from another terminal):
docker-compose run web migrate docker-compose run web update_index docker-compose run web createsuperuser
-
Visit http://127.0.0.1:8000/ in your web browser
Recreating development environment
If one wants to recreate their development environment from scratch and one doesn't care about the existing data in database, one needs to:
-
stop all the containers:
docker-compose stop
-
remove containers
docker-compose rm -r
-
rebuild images
docker-compose build
-
use quickstart guide above for setting up the development environment
Testing code
The command below is usually enough for local testing:
docker-compose run web test
If Python dependencies have changed recently, one might need to add
paramter -r
once:
docker-compose run web test -r