Core Tech: Python
Backend Service: Django, Django Rest Framework
Database: Mysql
Test Django Test, Flake8, Factory Boy
CI/CD Docker, Github Actions
Documentation: Swagger
- Management of airport list and flight list
- Track of flight count
- Better documentation using Swagger
- Better system to using test-driven development
- Continuous Integration for deployment
Clone the project
git clone https://github.com/koksalkapucuoglu/track-flight-app.git
Go to the project directory
cd track-flight-app
Create python env
python -m venv env
Activate enviroment
source env/Scripts/activate
or
env\Scripts\activate
Install requirements
pip install -r requirements.txt
pip install -r requirements_dev.txt
Setup MySQL Enviroment
- Install XAMPP and run
- Start Apache and MySQL module
- Go to MySQL dashboard.
- Create database as trackingFlightDatabase
- Import dataset using trackingflightdatabase_old.sql file
Detect django model changes
python manage.py makemigrations
Apply django model changes
python manage.py migrate
Run django project
python manage.py runserver
- Go to http://localhost:8000/swagger to see Swagger documentation for API endpoints.
- Setup a password to login to the Django admin dashboard.
$ python manage.py createsuperuser
- Go to http://localhost:8000/admin and login to the dashboard using username
admin
and the password you chose in step 1 above.
-> -v {0 ,1 ,2 ,3} is verbocity, verbosity is for detailed display of test results
python manage.py test -v 2
coverage run manage.py test
coverage report
flake8 <dir>
- Build the docker container and get it up and running.
$ docker-compose build
$ docker-compose up
- Setup database tables by running migrations.
$ docker-compose run --rm web python manage.py makemigrations
$ docker-compose run --rm web python manage.py migrate