To start the project, up
the docker containers using compose:
docker compose up -d
The system will start out empty. To load test-data into the database run the following command:
./bin/load_data.sh 200
NOTE: The 200
-argument is how many lines from the CSV files are loaded into the database.
If none is specified, all lines will be loaded, which can take awhile.
You can now access the web-ui at: http://localhost:8120/
The database can be accessed through CLI like so:
docker exec bf-db bash -c 'psql -U bf -c "SELECT * FROM common_user;"'
If we want access to the database through a program like PgAdmin, we need to portforward the bf-db
container ports.
This can be done by creating a docker-compose.override.yml
-file:
services:
bf-db:
ports:
- "5432:5432"
To run the tests run
docker exec suila-web bash -c 'coverage run manage.py test ; coverage combine ; coverage report --show-missing'
To run tests only in a specific file run
docker exec suila-web bash -c 'coverage run manage.py test data_analysis.tests.test_views'
To run type checks run:
docker exec suila-web mypy --config ../mypy.ini suila/