Start up the Docker containers in the background:
$ docker-compose up -d
The first time this runs it will build the Docker images, which may take several minutes. (After the first time, it should only take 1-3 seconds.)
Then log into the main Docker container:
$ docker-compose exec web bash
(Commands from here on out that start with #
are being run in Docker.)
Migrate the database:
# ./manage.py migrate
Create an admin user (you will be prompted for a placeholder email address, name, and password):
# ./manage.py createsuperuser
(runs faster)
Spin up the development server:
# fab run
The first time this runs it will build the Scoop image, which may take a minute or two. (After the first time, it should only take 1-3 seconds.)
(tighter development loop during front-end development)
Install the node dependencies:
# cd frontend
# yarn install
# cd ../
Spin up the development server:
# fab run_fullstack
The first time this runs it will build the Scoop image, which may take a minute or two. (After the first time, it should be faster, but still takes a bit to start up, and takes a bit again when you first load a page.)
Visit http://localhost:8000 in your browser. You should be able to log in using the admin credentials you created earlier.
To test the API directly, first visit http://localhost:8000/user/account/ to find your API key.
Check out the User Guide at /docs/ for more info.
When you are finished, spin down Docker containers by running:
$ docker-compose down
Your database will persist and will load automatically the next time you run docker-compose up -d
.
Or, you can clean up everything Docker-related, so you can start fresh, as with a new installation:
$ bash docker/clean.sh
pytest
runs python testsflake8
runs python lintsCoverage will be generated automatically for all manually-run tests.
We use standard Django migrations
Contributions to this project should be made in individual forks and then merged by pull request. Here's an outline:
git branch feature-1
git add
and git commit
. (git diff --staged
is handy here!)git push origin feature-1
This codebase is Copyright 2020 The President and Fellows of Harvard College and is licensed under the open-source AGPLv3 for public use and modification. See LICENSE for details.