Skip to content

Django application that generate best matching for team matching

Notifications You must be signed in to change notification settings

cjoshmartin/TeamUpp

Repository files navigation

TeamUpp

Unit and E2E Tests

Prerequisites

Commands To Run When Starting The Project For First Time

# build and start project
docker-compose build
docker-compose up -d

# migrate database and setup for use
docker exec -it teamup_web python ./manage.py migrate

Design Documents

Create your admin user account

This will allow you to create and delete any object in the system from http://0.0.0.0:8000/admin you can also set passwords on the User models

# start the database and server in the background
docker-compose up -d

 docker exec -it teamup_web python manage.py createsuperuser

Troubleshooting

Resetting The Database

# Make sure all containers are not running 
docker-compose down
#Start only the database container
docker-compose up -d db

#drop and recreate database
docker exec -it teamup_db psql -U testuser -d postgres -c "DROP DATABASE productiondb1;"
docker exec -it teamup_db psql -U testuser -d postgres -c "CREATE DATABASE productiondb1;"
docker exec -it teamup_web python ./manage.py migrate

Checking Logs

Sometimes the database starts after the webserver causing the webserver to crash. This can be fixed by verifying this issue with docker-compose logs. If you see this problem. Add a space anywhere in the code and save it. The server will restart and everything should be good.

Tests

Running Unit Tests

# Start the database and server in the background
docker-compose up -d

docker exec -it teamup_web pytest --cov=. --cov-report=html app/tests/

docker-compose down

Run UI Tests

# start the database and server in the background
docker-compose up -d

# run from root of projects
cd ui-tests/; npm i && $(npm bin)/cypress run; cd -

# spin down the service if you are down
docker-compose down

About

Django application that generate best matching for team matching

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published