Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🎉 First release #116

Merged
merged 481 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
481 commits
Select commit Hold shift + click to select a range
771cd9c
fix: linting issues
EwoutV Mar 5, 2024
634bdc7
fix: admin fixtures and student fields
EwoutV Mar 5, 2024
ec5e2b3
chore: faculties as list of names instead of links
EwoutV Mar 5, 2024
f9c3400
Merge branch 'development' into session-auth
EwoutV Mar 5, 2024
a4a5a1e
fix: revert student serializer
EwoutV Mar 5, 2024
47c8675
fix: execute tests in backend folder
francisvaut Mar 5, 2024
76b5fde
Merge pull request #53 from SELab-2/hotfix
EwoutV Mar 5, 2024
5060acc
Merge pull request #52 from SELab-2/session-auth
francisvaut Mar 5, 2024
ef0e2c1
Merge branch 'development' into model_update
BramMeir Mar 6, 2024
ecc5cb1
chore: refactor checks
BramMeir Mar 6, 2024
7d56998
chore: refactor checks to one model
BramMeir Mar 6, 2024
61a20f2
chore: refactor view + serializer for checks
BramMeir Mar 6, 2024
c2a5b9f
chore: refactor checks tests
BramMeir Mar 6, 2024
2c8ebd9
chore: refactor submission to have status of checks after submission
BramMeir Mar 6, 2024
6a24fa1
feat(notification): Added events
Topvennie Mar 6, 2024
854c451
Merge branch 'development' into notifications
Topvennie Mar 6, 2024
1dcea41
chore: link extra checks to submission
BramMeir Mar 6, 2024
8bbd2ed
chore: NotificationType argument hints
Topvennie Mar 6, 2024
d7ef235
Merge branch 'notifications' of github.com:SELab-2/UGent-7 into notif…
Topvennie Mar 6, 2024
53447e2
chore: change user hyperlink field
Topvennie Mar 6, 2024
46697ae
chore: fix test
Topvennie Mar 6, 2024
d0882e1
chore: fix tests submission
BramMeir Mar 6, 2024
898219c
fix: linting
BramMeir Mar 6, 2024
f3593da
fix: typo
BramMeir Mar 6, 2024
b59f565
fix: update default score project
BramMeir Mar 6, 2024
bfdda2d
Merge pull request #54 from SELab-2/notifications
EwoutV Mar 6, 2024
79caead
fix: - instead of _
BramMeir Mar 7, 2024
31672e5
Merge pull request #55 from SELab-2/model_update
EwoutV Mar 7, 2024
d2e2e2f
chore: translation of extensions allowed/forbidden fields #27
bsilkyn Mar 7, 2024
7c6fa12
Merge branch 'development' into i18n-api
bsilkyn Mar 7, 2024
22b7e32
chore: translate 404 errors to dutch #57
bsilkyn Mar 7, 2024
f01a03d
chore: startup of file structure checks
tyboro2002 Mar 7, 2024
b75c47b
chore: fxed get structure
tyboro2002 Mar 7, 2024
8adbcfd
feat: IsStudent permission class and ability to join courses (#60)
EwoutV Mar 7, 2024
620b906
chore: fixed reading zip files
tyboro2002 Mar 7, 2024
72a0ee2
chore: one link for checks in project
BramMeir Mar 7, 2024
196e195
chore: added retrieving of structure checks for project
tyboro2002 Mar 7, 2024
3a74edb
Merge branch 'file_structure_checks' of https://github.com/SELab-2/UG…
tyboro2002 Mar 7, 2024
b1dbb18
fix: update tests
BramMeir Mar 7, 2024
aee9ad8
chore: finalized initialisation of file checks and added data
tyboro2002 Mar 7, 2024
082d497
Merge branch 'file_structure_checks' of https://github.com/SELab-2/UG…
tyboro2002 Mar 7, 2024
20f6ad5
chore: add i18n for errors
tyboro2002 Mar 7, 2024
ce077ce
chore: cleanup and fixed linting warnings
tyboro2002 Mar 7, 2024
83763ce
chore: cleanup the data directory and started tests
tyboro2002 Mar 8, 2024
998c51d
chore: worked at testing the file structure
tyboro2002 Mar 8, 2024
350ec00
feat: (wip) add assistants, course permissiosn
EwoutV Mar 8, 2024
009895e
feat: add assistants, course permissions
EwoutV Mar 8, 2024
155683d
chore: linting
EwoutV Mar 8, 2024
171f12d
feat: course cloning
EwoutV Mar 8, 2024
b2aba5e
chore: linting
EwoutV Mar 8, 2024
fe9c170
chore: finished course logic with sensible permissions
EwoutV Mar 8, 2024
bdb9d9e
chore: linting
EwoutV Mar 8, 2024
a6cbd08
Merge pull request #67 from SELab-2/course-logic
EwoutV Mar 8, 2024
4082b4a
chore: serializers for validation
EwoutV Mar 8, 2024
19db3c7
Merge pull request #68 from SELab-2/course-logic
EwoutV Mar 9, 2024
af385e6
fix: course permissions
EwoutV Mar 9, 2024
3c5969a
chore: linting
EwoutV Mar 9, 2024
52913a9
Merge pull request #69 from SELab-2/course-logic
BramMeir Mar 9, 2024
bd769fb
fix: permission classes
EwoutV Mar 9, 2024
270a243
Merge pull request #70 from SELab-2/course-logic
BramMeir Mar 9, 2024
3da961a
chore: add some tests for filestructures
tyboro2002 Mar 9, 2024
df77e10
chore: finished file_structure tests
tyboro2002 Mar 9, 2024
27b9b82
Merge branch 'development' of https://github.com/SELab-2/UGent-7 into…
tyboro2002 Mar 9, 2024
cc0d8e2
chore: fix doable lintning warnings
tyboro2002 Mar 9, 2024
b1b20f2
chore: fixed some more linting errors
tyboro2002 Mar 9, 2024
a5984ba
chore: finaly fixed linter warnings
tyboro2002 Mar 9, 2024
0d4c015
chore: linting
EwoutV Mar 9, 2024
16e2e10
chore: linting
EwoutV Mar 9, 2024
1c1547d
Merge pull request #84 from SELab-2/file_structure_checks
EwoutV Mar 9, 2024
4c239be
chore: define group permissions
BramMeir Mar 8, 2024
9b69892
fix: no access to general group endpoint
BramMeir Mar 8, 2024
1e2ab1f
chore: join group for student + /group not accessible
BramMeir Mar 8, 2024
25a45ef
chore: init testing permission logic
BramMeir Mar 8, 2024
e6049d0
chore: refactor validation strat + testing
BramMeir Mar 9, 2024
9b797c8
chore: test score updates only for teachers
BramMeir Mar 9, 2024
5c8728d
chore: make groups as teacher for project
BramMeir Mar 9, 2024
7b7aa15
chore: validate number of groups
BramMeir Mar 9, 2024
3a4cd9d
chore: simplify
BramMeir Mar 9, 2024
4b0ab18
chore: check score is below max_score project
BramMeir Mar 9, 2024
b1da49b
fix: linting
BramMeir Mar 9, 2024
1e464dc
fix: linting
BramMeir Mar 9, 2024
fd78dbb
chore: no list action for groups and projects
BramMeir Mar 9, 2024
6b21dcd
chore: rebase
EwoutV Mar 9, 2024
b451035
chore: linting
EwoutV Mar 9, 2024
3abdecb
Merge pull request #72 from SELab-2/group-logic
EwoutV Mar 9, 2024
c14424e
chore: course serializer
francisvaut Mar 10, 2024
2c10e88
Revert "chore: course serializer"
francisvaut Mar 10, 2024
d683231
fix: merge conflicts
francisvaut Mar 10, 2024
d260cd5
fix: creating project
BramMeir Mar 10, 2024
bde63b8
fix: merge conflicts
francisvaut Mar 10, 2024
6584480
chore: added course context to project serializer
EwoutV Mar 10, 2024
cbb5cb5
chore: deadline project not in past
francisvaut Mar 10, 2024
4e5ef09
chore: deadline project before start_date
francisvaut Mar 10, 2024
0400af4
chore: add check project deadline is not passed and add submisions fi…
tyboro2002 Mar 10, 2024
ac5e55a
feat(notifications): send mail function #7
Topvennie Mar 10, 2024
f79616b
chore: project submission status
francisvaut Mar 10, 2024
dcd4863
Admin create action #88
DeLany123 Mar 10, 2024
b8d7710
Revert "Admin create action #88"
DeLany123 Mar 10, 2024
643956f
chore: try to upload files from submission
BramMeir Mar 10, 2024
91a709c
fix: comment
BramMeir Mar 10, 2024
8d98643
chore: check file structure when upload project
tyboro2002 Mar 10, 2024
d7e9d0e
feat(deployment): Added development environment / container
Topvennie Mar 10, 2024
41abbbc
chore: http -> https
Topvennie Mar 10, 2024
b765db6
chore: generate ssl keys
Topvennie Mar 10, 2024
176183c
chore: keep ssl directory
Topvennie Mar 10, 2024
dbfcbbd
chore: add increasing submsion number
tyboro2002 Mar 10, 2024
e81c363
chore: make submision number not required but automaticaly generated
tyboro2002 Mar 10, 2024
eb00228
chore: Use celery & Redis
Topvennie Mar 10, 2024
cd4efb8
chore: cleanup + dev environment
Topvennie Mar 10, 2024
ba1a28c
chore: linting
Topvennie Mar 11, 2024
b1bda33
chore: Remove unused nginx conf
Topvennie Mar 11, 2024
8a74d5b
fix: fix the submisionAdd validator to be used
tyboro2002 Mar 11, 2024
696b7d3
chore: linter
Topvennie Mar 11, 2024
c2024e3
chore: change single user to queryset
Topvennie Mar 11, 2024
84d5d1e
chore: max sent retries
Topvennie Mar 11, 2024
3f249e0
chore: dockerfile cleanup
Topvennie Mar 11, 2024
c644f8c
Merge pull request #89 from SELab-2/notifications
EwoutV Mar 11, 2024
ce0765d
chore: move notification urls / views to api
Topvennie Mar 11, 2024
8e3fc3e
chore: some cleanup
tyboro2002 Mar 11, 2024
6d260dc
chore: /api
Topvennie Mar 11, 2024
6184da3
fix: Update project_serializer.py
tyboro2002 Mar 11, 2024
eace686
feat(deployement): production environment
Topvennie Mar 11, 2024
c313a57
Merge pull request #93 from SELab-2/submission_logic
tyboro2002 Mar 11, 2024
6d77b64
chore: re_path -> path
Topvennie Mar 11, 2024
0d7e100
chore: Update readme
Topvennie Mar 11, 2024
5ae1e62
Merge pull request #92 from SELab-2/notification_appi
Topvennie Mar 11, 2024
15ec0c4
Merge pull request #94 from SELab-2/dev_env
Topvennie Mar 11, 2024
90147f3
merge
francisvaut Mar 11, 2024
6a30431
fix: merge conflicts
francisvaut Mar 11, 2024
d9e8917
chore: enhance submission status
francisvaut Mar 11, 2024
8b9ea34
chore: startup structure_checks add
tyboro2002 Mar 12, 2024
861932c
fix: fix git warnings
tyboro2002 Mar 12, 2024
6bcb75c
chore: score visible if set in project
BramMeir Mar 12, 2024
5fe5626
chore: score not visible for students of other groups
BramMeir Mar 12, 2024
50f2ebd
chore: test with student permissions
BramMeir Mar 12, 2024
1591485
chore: update .gitignore
Topvennie Mar 12, 2024
f3f54c0
chore: added nginx conf
Topvennie Mar 12, 2024
1f0520c
chore: add allowed host
Topvennie Mar 12, 2024
5a3022e
chore: debug env
Topvennie Mar 12, 2024
26dc597
chore: different cas urls
Topvennie Mar 12, 2024
4dadcd5
chore: support authentication
Topvennie Mar 12, 2024
a37c8cb
Merge branch 'development' of github.com:SELab-2/UGent-7 into prod_env
Topvennie Mar 12, 2024
8ff97c8
feat: give CAS attributes in debug mode
EwoutV Mar 12, 2024
8dd295f
chore: cleanup
Topvennie Mar 12, 2024
4ac8c50
Merge branches 'prod_env' and 'prod_env' of github.com:SELab-2/UGent-…
Topvennie Mar 12, 2024
7cf69ea
fix: swagger integration
Topvennie Mar 12, 2024
c9c7ad0
Merge pull request #95 from SELab-2/prod_env
Topvennie Mar 12, 2024
700e7eb
Merge pull request #97 from SELab-2/score-visibility
francisvaut Mar 12, 2024
6dc562a
fix: merge conflicts
francisvaut Mar 12, 2024
bfa13d4
chore: rebase
bsilkyn Mar 7, 2024
d66ecc5
chore: (Dutch) folder structure helper + course serializer + group se…
bsilkyn Mar 12, 2024
545a858
chore: (Dutch) folder structure helper + course serializer + group se…
bsilkyn Mar 12, 2024
ead419c
test: make authentication test names more professional
bsilkyn Mar 12, 2024
543903f
chore: add available language translations #100
bsilkyn Mar 12, 2024
4674614
chore: course_view dutch translation + adaption to translation keys #100
bsilkyn Mar 12, 2024
d5b865e
chore: group_view and project_view Dutch translation #100
bsilkyn Mar 12, 2024
90db265
chore: remote merge #100
bsilkyn Mar 12, 2024
6b9408b
chore: locked groups
francisvaut Mar 12, 2024
9364a34
chore: extra test for locked groups
francisvaut Mar 12, 2024
0db0959
fix: linting errors
francisvaut Mar 12, 2024
fbdec72
fix: conflicting migrations
francisvaut Mar 12, 2024
17d74a9
Revert "fix: linting errors"
francisvaut Mar 12, 2024
65094ab
fix: should fix server tests problem
francisvaut Mar 12, 2024
add8e53
build: migrate when testing
francisvaut Mar 12, 2024
835c3d5
fix: merge makemigrations
francisvaut Mar 12, 2024
bbf3847
Merge branch 'development' into project-logic
francisvaut Mar 13, 2024
bb9029c
fix: conflicting migrations from development
francisvaut Mar 13, 2024
55eca3d
chore: faculty permissions
BramMeir Mar 13, 2024
9fde752
chore: English translation zip checks + course_serializer + group_ser…
bsilkyn Mar 13, 2024
174ddff
chore: English translation project_serializer #100
bsilkyn Mar 13, 2024
8b65cd7
chore: English translation course_view + group_view + project_view #100
bsilkyn Mar 13, 2024
c773823
chore: slight adjustments #100
bsilkyn Mar 13, 2024
dfda4a4
chore: adjustment to courses.error.students.past_course #100
bsilkyn Mar 13, 2024
7de8329
chore: adjustment to group.errors.full translation #100
bsilkyn Mar 13, 2024
6f434a7
chore: translation remove spelling mistakes #100
bsilkyn Mar 13, 2024
892aeea
chore: automatically create groups when creating project
francisvaut Mar 13, 2024
1a0bcf1
chore: more environment variables
Topvennie Mar 13, 2024
4b4fb81
chore: add endpoint to add structure checks
tyboro2002 Mar 13, 2024
219d1cc
chore: variables rename
Topvennie Mar 13, 2024
a5ba61f
chore: finished structure_checks add endpoint
tyboro2002 Mar 13, 2024
b7cf8ed
Merge pull request #103 from SELab-2/faculty-permissions
BramMeir Mar 13, 2024
ddc7159
fix: spelling and function name
francisvaut Mar 13, 2024
0bcefb8
chore: rebase
bsilkyn Mar 7, 2024
096cfa1
chore: (Dutch) folder structure helper + course serializer + group se…
bsilkyn Mar 12, 2024
42fd593
chore: (Dutch) folder structure helper + course serializer + group se…
bsilkyn Mar 12, 2024
d140174
test: make authentication test names more professional
bsilkyn Mar 12, 2024
33734ad
chore: add available language translations #100
bsilkyn Mar 12, 2024
6ac3a1e
chore: course_view dutch translation + adaption to translation keys #100
bsilkyn Mar 12, 2024
c5e43bd
chore: group_view and project_view Dutch translation #100
bsilkyn Mar 12, 2024
964e9bb
chore: another rebase #57
bsilkyn Mar 7, 2024
6502aa4
chore: English translation zip checks + course_serializer + group_ser…
bsilkyn Mar 13, 2024
b707646
chore: English translation project_serializer #100
bsilkyn Mar 13, 2024
c04a8fd
chore: English translation course_view + group_view + project_view #100
bsilkyn Mar 13, 2024
6095adf
chore: slight adjustments #100
bsilkyn Mar 13, 2024
1bc43c2
chore: adjustment to courses.error.students.past_course #100
bsilkyn Mar 13, 2024
f7a71cb
chore: adjustment to group.errors.full translation #100
bsilkyn Mar 13, 2024
b113fd9
chore: translation remove spelling mistakes #100
bsilkyn Mar 13, 2024
db3e97a
test: add little test #100
bsilkyn Mar 13, 2024
90cb281
Merge branch 'i18n-api' of gitsel2:SELab-2/UGent-7 into i18n-api
bsilkyn Mar 13, 2024
44516cf
fix: extra group in test
francisvaut Mar 13, 2024
158043a
chore: fix for tests and linter #100
bsilkyn Mar 13, 2024
dedade7
chore: More environment variables
Topvennie Mar 13, 2024
3bb0483
build: compile .po files
francisvaut Mar 13, 2024
4d7f6da
Merge pull request #101 from SELab-2/project-logic
francisvaut Mar 13, 2024
4c27fba
test: fix test to be solely dependent on translation key, not transla…
bsilkyn Mar 13, 2024
a8c6635
Merge branch 'development' into i18n-api
bsilkyn Mar 13, 2024
7555246
chore: translate extra translation keys from project logic #100
bsilkyn Mar 13, 2024
2b0b035
fix: backend-tests.yaml
francisvaut Mar 13, 2024
1866e37
Merge pull request #59 from SELab-2/i18n-api
EwoutV Mar 13, 2024
f51096a
Merge pull request #104 from SELab-2/docker
EwoutV Mar 13, 2024
e8e6fa0
chore: started endpoint for deleting structure_checks of a project bu…
tyboro2002 Mar 14, 2024
a219d46
Merge branch 'development' into submission_logic
BramMeir Mar 14, 2024
8370eed
temp
DeLany123 Mar 10, 2024
2300246
fix: add admins
EwoutV Mar 10, 2024
83e7a0c
bugfix admins #88
DeLany123 Mar 11, 2024
ab3beba
close #90
DeLany123 Mar 11, 2024
8993826
Revert "close #90"
DeLany123 Mar 11, 2024
ead90ad
Revert "Revert "close #90""
DeLany123 Mar 11, 2024
6eba736
chore: assistant course action refactor
EwoutV Mar 11, 2024
a187908
chore: moved data to backend folder and added development enviroment
tyboro2002 Mar 14, 2024
0307675
feat: assistant permissions
EwoutV Mar 14, 2024
ac6e22f
chore: checks structure checks
tyboro2002 Mar 14, 2024
e7e3265
chore: permission cleanup
EwoutV Mar 14, 2024
d4ed3fe
chore: linting
EwoutV Mar 14, 2024
dcff399
Merge pull request #106 from SELab-2/permissions
EwoutV Mar 14, 2024
e3b87ea
chore: update README
EwoutV Mar 14, 2024
bb20502
chore: added tests
tyboro2002 Mar 14, 2024
6800132
chore: tests
tyboro2002 Mar 14, 2024
14b0ead
fix: fix github problems
tyboro2002 Mar 14, 2024
36430ed
chore: cleanup gitignore
tyboro2002 Mar 14, 2024
e10f4bd
chore: merge with development
tyboro2002 Mar 14, 2024
68adeca
chore: cleanup linting
tyboro2002 Mar 14, 2024
23e0fb8
feat(deployment): added test flag
Topvennie Mar 14, 2024
efe0334
Merge pull request #109 from SELab-2/docker_tests
EwoutV Mar 14, 2024
f5e14c5
chore: add python naming conventions
tyboro2002 Mar 14, 2024
262f85c
fix: fixed gitignore
tyboro2002 Mar 14, 2024
8c905e4
fix: fixed tyô
tyboro2002 Mar 14, 2024
ffbab50
Merge pull request #107 from SELab-2/submission_logic
tyboro2002 Mar 14, 2024
6594064
chore: update README.md
EwoutV Mar 14, 2024
8bca63d
chore: change subnet of development
Topvennie Mar 14, 2024
6a57d20
Revert "chore: change subnet of development"
Topvennie Mar 14, 2024
dade6b4
added testing environment
Topvennie Mar 14, 2024
2c5c9aa
chore: remove testing from development script
Topvennie Mar 14, 2024
16e2ce4
Update README.md
Topvennie Mar 14, 2024
44f6add
feat(deployement): auto pull
Topvennie Mar 14, 2024
40e5b95
chore: take containers down first
Topvennie Mar 14, 2024
ed1764e
chore: change branch to main
Topvennie Mar 14, 2024
cb03f4b
Merge pull request #113 from SELab-2/docker
EwoutV Mar 14, 2024
6d4bfba
Merge pull request #114 from SELab-2/doc-readme-update
EwoutV Mar 14, 2024
d579f26
Merge pull request #115 from SELab-2/deployement
EwoutV Mar 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .dev.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Default values
PUID=1000
PGID=1000
TZ=Europe/Brussels

# File directories
DATA_DIR="./data"
BACKEND_DIR="./backend"
FRONTEND_DIR="./frontend"
SSL_DIR="./data/nginx/ssl"

# Redis
REDIS_IP=192.168.90.10
REDIS_PORT=6379

# Django
DJANGO_SECRET_KEY="" # Set to a random string
DJANGO_DEBUG=True # Django debug mode
DJANGO_DOMAIN_NAME=localhost # Domain name for the Django server
DJANGO_CAS_URL_PREFIX="" # URL prefix for the CAS server. Should be empty for development
DJANGO_CAS_PORT=8080 # Port for the CAS server. Should be 8080 if DJANGO_DOMAIN_NAME is localhost
DJANGO_DB_ENGINE=django.db.backends.sqlite3 # Database engine
DJANGO_REDIS_HOST=${REDIS_IP} # Redis configuration
DJANGO_REDIS_PORT=${REDIS_PORT}
25 changes: 25 additions & 0 deletions .github/workflows/backend-linting.yaml
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
27 changes: 27 additions & 0 deletions .github/workflows/backend-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
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: Compile translations
run: django-admin compilemessages
- name: Execute tests
run: cd backend; python manage.py test
23 changes: 23 additions & 0 deletions .github/workflows/deployement.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Deploy
on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.PORT }}
script: |
cd UGent-7
docker-compose -f production.yml down
${{ secrets.PULL_SCRIPT }}
docker-compose -f production.yml build --no-cache
docker-compose -f production.yml up -d
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.tool-versions
.env
.venv
.idea
.vscode
data/*
data/nginx/ssl/*
data/postres*
data/redis/*
backend/data/production/*

/node_modules
backend/staticfiles/*

!data/nginx/ssl/.gitkeep
36 changes: 36 additions & 0 deletions .prod.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Default values
PUID=1000
PGID=1000
TZ=Europe/Brussels

# File directories
DATA_DIR="./data"
BACKEND_DIR="./backend"
FRONTEND_DIR="./frontend"
SSL_DIR=""

# Postgress DB
POSTGRES_IP=192.168.90.9
POSTGRES_PORT=5432
POSTGRES_DB=selab
POSTGRES_USER=selab_user
POSTGRES_PASSWORD="" # Set to desired password

# Redis
REDIS_IP=192.168.90.10
REDIS_PORT=6379

# Django
DJANGO_SECRET_KEY="" # Set to a random string
DJANGO_DEBUG=False # Django debug mode
DJANGO_DOMAIN_NAME="" # Domain name for the Django server
DJANGO_CAS_URL_PREFIX="" # URL prefix for the CAS server
DJANGO_CAS_PORT="" # Port for the CAS server
DJANGO_DB_ENGINE=django.db.backends.postgresql # Database engine configuration
DJANGO_DB_NAME=${POSTGRES_DB}
DJANGO_DB_USER=${POSTGRES_USER}
DJANGO_DB_PASSWORD=${POSTGRES_PASSWORD}
DJANGO_DB_HOST=${POSTGRES_IP}
DJANGO_DB_PORT=${POSTGRES_PORT}
DJANGO_REDIS_HOST=${REDIS_IP} # Redis configuration
DJANGO_REDIS_PORT=${REDIS_PORT}
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
# UGent-7
# Ypovoli

![backend linting](https://github.com/SELab-2/UGent-7/actions/workflows/backend-linting.yaml/badge.svg)
![backend tests](https://github.com/SELab-2/UGent-7/actions/workflows/backend-tests.yaml/badge.svg)

This application was developed within the framework of the course "Software Engineering Lab 2" within the Computer Science program at Ghent University.

## Documentation

See our wiki at [https://github.com/SELab-2/UGent-7/wiki](https://github.com/SELab-2/UGent-7/wiki) for more detailed information on the project's architecture.
Binary file added backend/.coverage
Binary file not shown.
15 changes: 15 additions & 0 deletions backend/.flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[flake8]

# Ignore unused imports
ignore = F401

max-line-length = 125

max-complexity = 10

exclude = .git,
__pycache__,
.venv,
venv,
migrations

5 changes: 5 additions & 0 deletions backend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.venv
.idea
db.sqlite3
__pycache__
*.mo
13 changes: 13 additions & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM python:3.11.4

RUN apt update && apt install -y gettext libgettextpo-dev && pip install --upgrade pip

WORKDIR /code

ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1

COPY requirements.txt /code/
RUN pip install -r requirements.txt

COPY . /code/
16 changes: 16 additions & 0 deletions backend/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM python:3.11.4

RUN apt update && apt install -y gettext libgettextpo-dev && pip install --upgrade pip

WORKDIR /code

ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1

COPY requirements.txt /code/
RUN pip install -r requirements.txt

COPY . /code/

RUN ./setup.sh

15 changes: 15 additions & 0 deletions backend/Dockerfile.prod
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM python:3.11.4

RUN apt update && apt install -y gettext libgettextpo-dev && pip install --upgrade pip

WORKDIR /code

ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

RUN ./setup.sh
15 changes: 15 additions & 0 deletions backend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Prerequisites

- python 3.11.8

__Django doesn't support python 3.12__

# Install instructions

- Create a virtual environment `python -m venv .venv` (make sure to use the right python version)

- Activate the virtual environment `source .venv/bin/activate`

- Run `setup.sh`

- Run the server `python manage.py runsslserver localhost:8080`
Empty file added backend/api/__init__.py
Empty file.
12 changes: 12 additions & 0 deletions backend/api/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from django.apps import AppConfig


class ApiConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "api"

def ready(self):
from authentication.signals import user_created
from api.signals import user_creation

user_created.connect(user_creation)
10 changes: 10 additions & 0 deletions backend/api/fixtures/assistants.yaml
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
22 changes: 22 additions & 0 deletions backend/api/fixtures/checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
- model: api.extracheck
pk: 1
fields:
project: 123456
run_script: 'scripts/run.sh'

- model: api.fileextension
pk: 1
fields:
extension: 'class'
- model: api.fileextension
pk: 2
fields:
extension: 'png'
- model: api.fileextension
pk: 3
fields:
extension: 'java'
- model: api.fileextension
pk: 4
fields:
extension: 'py'
21 changes: 21 additions & 0 deletions backend/api/fixtures/courses.yaml
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
20 changes: 20 additions & 0 deletions backend/api/fixtures/groups.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
- model: api.group
pk: 1
fields:
project: 123456
score: 7
students:
- '1'
- '2'
- model: api.group
pk: 3
fields:
project: 123456
score: 8
students: []
- model: api.group
pk: 2
fields:
project: 1
score: 8
students: []
24 changes: 24 additions & 0 deletions backend/api/fixtures/projects.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
- 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
group_size: 3
max_score: 20
course: 2
- model: api.project
pk: 1
fields:
name: sel3
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
group_size: 3
max_score: 20
course: 1
11 changes: 11 additions & 0 deletions backend/api/fixtures/students.yaml
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: []
Loading
Loading