-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'notifications' of github.com:SELab-2/UGent-7 into notif…
…ications
- Loading branch information
Showing
79 changed files
with
3,819 additions
and
706 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: backend-linting | ||
|
||
on: | ||
push: | ||
branches: [main, development] | ||
pull_request: | ||
branches: [main, development] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
runs-on: self-hosted | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flake8 | ||
pip install -r ./backend/requirements.txt | ||
- name: Execute linting checks | ||
run: flake8 --config ./backend/.flake8 ./backend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: backend-tests | ||
|
||
on: | ||
push: | ||
branches: [main, development] | ||
pull_request: | ||
branches: [main, development] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
runs-on: self-hosted | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flake8 | ||
pip install -r ./backend/requirements.txt | ||
- name: Execute tests | ||
run: cd backend; python manage.py test |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[flake8] | ||
|
||
# Ignore unused imports | ||
ignore = F401 | ||
|
||
max-line-length = 119 | ||
|
||
max-complexity = 10 | ||
|
||
exclude = .git, | ||
__pycache__, | ||
.venv, | ||
venv, | ||
migrations | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class ApiConfig(AppConfig): | ||
default_auto_field = 'django.db.models.BigAutoField' | ||
name = 'api' | ||
default_auto_field = "django.db.models.BigAutoField" | ||
name = "api" | ||
|
||
def ready(self): | ||
from . import signals | ||
from authentication.signals import user_created | ||
from api.signals import user_creation | ||
|
||
user_created.connect(user_creation) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
- model: api.assistant | ||
pk: '235' | ||
fields: | ||
courses: | ||
- 1 | ||
- model: api.assistant | ||
pk: '236' | ||
fields: | ||
courses: | ||
- 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
- model: api.checks | ||
pk: 1 | ||
fields: | ||
dockerfile: 'path/to/Dockerfile' | ||
allowed_file_extensions: | ||
- 1 | ||
- 2 | ||
forbidden_file_extensions: | ||
- 3 | ||
- 4 | ||
- model: api.fileextension | ||
pk: 1 | ||
fields: | ||
extension: 'py' | ||
- model: api.fileextension | ||
pk: 2 | ||
fields: | ||
extension: 'js' | ||
- model: api.fileextension | ||
pk: 3 | ||
fields: | ||
extension: 'html' | ||
- model: api.fileextension | ||
pk: 4 | ||
fields: | ||
extension: 'php' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
- model: api.course | ||
pk: 1 | ||
fields: | ||
name: Math | ||
academic_startyear: 2023 | ||
description: Math course | ||
parent_course: null | ||
- model: api.course | ||
pk: 2 | ||
fields: | ||
name: Sel2 | ||
academic_startyear: 2023 | ||
description: Software course | ||
parent_course: 3 | ||
- model: api.course | ||
pk: 3 | ||
fields: | ||
name: Sel1 | ||
academic_startyear: 2022 | ||
description: Software course | ||
parent_course: null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
- model: api.group | ||
pk: 1 | ||
fields: | ||
project: 123456 | ||
score: 7 | ||
students: | ||
- '1' | ||
- '2' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
- model: api.project | ||
pk: 123456 | ||
fields: | ||
name: sel2 | ||
description: make a project | ||
visible: true | ||
archived: false | ||
start_date: 2024-02-26 00:00:00+00:00 | ||
deadline: 2024-02-27 00:00:00+00:00 | ||
checks: 1 | ||
course: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
- model: api.student | ||
pk: '1' | ||
fields: | ||
student_id: null | ||
courses: | ||
- 1 | ||
- model: api.student | ||
pk: '2' | ||
fields: | ||
student_id: null | ||
courses: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
- model: api.submission | ||
pk: 1 | ||
fields: | ||
group: 1 | ||
submission_number: 1 | ||
submission_time: '2021-01-01T00:00:00Z' | ||
- model: api.submission | ||
pk: 2 | ||
fields: | ||
group: 1 | ||
submission_number: 2 | ||
submission_time: '2021-01-02T00:00:00Z' | ||
|
||
|
||
- model: api.submissionfile | ||
pk: 1 | ||
fields: | ||
submission: 1 | ||
file: 'submissions/1/1/1.txt' | ||
- model: api.submissionfile | ||
pk: 2 | ||
fields: | ||
submission: 2 | ||
file: 'submissions/1/2/1.txt' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
- model: api.teacher | ||
pk: '123' | ||
fields: | ||
courses: | ||
- 1 | ||
- model: api.teacher | ||
pk: '124' | ||
fields: | ||
courses: | ||
- 1 | ||
- 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.