From 4756a5cedbeefca2c6665d8e92f93b5bf9185c8a Mon Sep 17 00:00:00 2001 From: Timon Coucke <73907470+LGDTimtou@users.noreply.github.com> Date: Thu, 14 Mar 2024 18:48:51 +0100 Subject: [PATCH 1/5] Update README.md --- README.md | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b13c6ec06..724965b16 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,37 @@ # UGent-4 -<<<<<<< HEAD -======= - ->>>>>>> 43302259fa87109dcb81dc91d568e658a9aa7358 +# Backend +Deze folder bevat de code van de backend. + +## Hoe runnen? + +### Benodigdheden: +- .env bestand: In deze folder moet je lokaal een .env bestand zetten. Het .env bestand bevat geheime variabelen en codes die je niet in deze repo zal vinden. Vraag het aan iemand van het backend team als je de file wilt krijgen. + +- postgres databank: Je zal zelf een postgres databank moeten opzetten. De naam van de databank, user, paswoord, ... Kan je vinden in het .env bestand. + +- virtual environment: Je zal ook een virtual environment moeten maken. Doe dit op linux met het commando: `python -m venv /path/to/new/virtual/environment`. +Vervolgens activeer je de virtual environment als volgt: `source my_env/bin/activate`. +Tenslotte installeer je alle dependencies: `pip install -r requirements.txt`. + +### de api lokaal runnen: +Om de api lokaal te runnen activeer je eerst de virtual environment. Daarna voer je volgende commando's uit in de UGent-4 directory: +```sh +./manage.py makemigrations api +./manage.py migrate api +./manage.py runserver +``` +Je kan dan surfen naar http://127.0.0.1:8000/ om de api te zien. + +## Hoe testen? + +**OPMERKING**: Al de volgende commando's moeten uitgevoerd worden terwijl de virtual environment geactiveerd is. + +Je checkt zowel de linting als de tests. + +### Linting: +De volgende commando's run je van de ***api*** directory: +Run het commando `flake8 .`. De output vertelt je waar de codestijl fout is. Om snel deze stijlfouten op te lossen kan je `black .`runnen. + + +### Testing: +Run het commando `./manage.py test` in de ***UGENT-4*** directory. From 25e2c9ed2daabbe1e72d9d0a77974e51953bc130 Mon Sep 17 00:00:00 2001 From: Timon Coucke <73907470+LGDTimtou@users.noreply.github.com> Date: Thu, 14 Mar 2024 18:50:05 +0100 Subject: [PATCH 2/5] Update README.md --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 724965b16..64dd13041 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,14 @@ # UGent-4 + +# Wiki + +- Zie de wiki voor meer informatie zoals bijvoorbeeld de use-cases en documentatie + +# Frontend + +## WIP + # Backend -Deze folder bevat de code van de backend. ## Hoe runnen? From 35ee025f12c7f89a030d6e3bec3a1ec88089ab4b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Mar 2024 17:50:10 +0000 Subject: [PATCH 3/5] Bump follow-redirects from 1.15.5 to 1.15.6 in /frontend/frontend Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.5 to 1.15.6. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.5...v1.15.6) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] --- frontend/frontend/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/frontend/package-lock.json b/frontend/frontend/package-lock.json index fdc877af6..034b0289c 100644 --- a/frontend/frontend/package-lock.json +++ b/frontend/frontend/package-lock.json @@ -2838,9 +2838,9 @@ "dev": true }, "node_modules/follow-redirects": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", - "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "funding": [ { "type": "individual", From 5de46d21cd503dec7b6a4e1379b973e771b8d409 Mon Sep 17 00:00:00 2001 From: Timon Coucke <73907470+LGDTimtou@users.noreply.github.com> Date: Thu, 14 Mar 2024 18:50:26 +0100 Subject: [PATCH 4/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 64dd13041..88a139fe3 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ # Frontend -## WIP +- WIP # Backend From eff4838d1e1f90754cc2a30667ca418b21bcb8d8 Mon Sep 17 00:00:00 2001 From: Mathis De Witte <49711425+mathis2003@users.noreply.github.com> Date: Thu, 14 Mar 2024 19:19:49 +0100 Subject: [PATCH 5/5] add main to github actions branches --- .github/workflows/django.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index ce56c1856..fa7e7f9b4 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -2,9 +2,9 @@ name: Django CI on: push: - branches: [ "develop", "tests" ] + branches: [ "develop", "tests", "main" ] pull_request: - branches: [ "develop", "tests" ] + branches: [ "develop", "tests", "main" ] jobs: build: