Skip to content

Commit

Permalink
Deployment (#274)
Browse files Browse the repository at this point in the history
* chore: filter on deadline

* chore: fix project link data

* chore: refactor cards

* chore: add todo

* chore: use project with course context service

* test: write group service test

* test: adjust test names

* test: make intercept server group_id url more abstract

* frontent(ProjectView) chore: closes #185

* chore: did some cleanup + add test for group

* chore: add test for group

* chore: add test for faculty

* chore: add faculty tests

* chore: added course tests

* fix: cypress types

* feat(deployment): testing script

* chore: display dashboard data depending on role

* chore: correct projects + assistant view

* chore: update usage of service + using real user id

* chore: refactor using Lander's project cards

* chore: plus button based on role

* chore: add project service tests

* chore: add student service tests

* chore: start of course creation

* chore: fix merge

* chore: working create course, backend automatically add requesting teacher to course

* chore: rest of commit

* chore: init academic year button logic

* chore: add teacher service tests

* chore: add assistant service tests

* chore: add admin service tests + create time and last login and move faculties to user

* chore: refactor authentication user field

* chore: layout + logic academic year button

* chore: add structure check tests

* fix: fix packages

* chore: add structure check service tests

* chore: add submision service tests

* chore: add submisions by project service test

* chore: clean up

* chore: add extra service tests

* chore: add extra service tests

* chore: removed cypress screenshotsé

* fix: fix error

* fix: fix error

* fix: issues after merge

* fix: using services instead of hardcoded creating

* linting: restart from dev

* linting: autofix problems

* linting: action script

* linting: fix triple-slash-reference error

* linting: fix useless constructor errors

* linting: fix unused vars errors

* linting: fix no-unused-expressions errors

* linting: fix valid-v-for errors

* linting: fix vue/require-v-for-key errors

* linting: fix eqeqeq errors

* linting: fix vue/valid-attribute-name errors

* linting: fix vue/prefer-import-from-vue errors

* linting: no-empty-pattern errors

* linting: fix minor indent errors

* linting: fix strict-boolean-expressions errors

* linting: fix no-unsafe-argument errors

* linting: fix naming-convention errors

* linting: fix unbound-method errors

* linting: create return types for services

* linting: fix last return type errors

* build: edit frontend linting action script

* build: run linting checks on github server for now

* feat(deplyment): added poetry

* fix: merges add user.id's

* chore: dashboard & project cleanup

* chore: abstracted the dashboard as example for future views

* chore: linting

* chore: linting

* chore: add celery types

* fix: actions with poetry

* chore: added extra checks models

* fix: little fixes

* fix: linting

* chore: extra checks migration

* chore: setup.sh support poetry

* chore: run pip as root deal with it

* chore: delete unused package

* chore: fix some db issues

* chore: comment out failing tests

* chore: set up jdom in tests

* chore static import jsdom

* chore: dont mount app in tests

* chore: add admin to admins in setup

* chore: admin create test

* chore: assistant create test

* chore: student create test

* chore: course-faculty relation, faculty name translations

* chore: added debug option to echo user credentials upon login

* fix: debug parameter

* feat: course list

* fix: linting

* chore: async/await constructs, better user fetching

* feat: better error handling, linting

* fix: refresh user after enrollment

* feat: pagination

* chore: squash migrations

* fix: faculty tests

* fix: linting

* chore: pr comments

* chore: translations, test linting

* chore: frontend linting

* chore: init project creation from dashboard

* chore: project creation logic

* chore: add time selection to deadline

* chore: dashboard for every role

* chore: start form validation

* chore: create course validation + academic year display

* chore: error message component

* chore: merge

* fix: fix failing tests

* Frontend: leave/join groups

* fix: group join state

* chore: action test script

* chore: run test action as sudo

* chore: secret key test

* fix: action script syntax

* chore: run test action with c flag

* chore: remove backend tests action

* chore: remove cypress login test

* chore: add permission to remove previous action script directory

* chore: fix linting, tests

* chore: add dummy cypress test

* chore: linting autofix

* Frontend: styling Closes #184

* Backend: fix, updated group submission permission

* chore: try adding the seeder lib

* chore: add student provider

* chore: seed courses

* Frontend: ProjectView

* chore: seed assistants

* chore: seed assistants moved before courses

* Frontend: feat fileupload

* chore: seed teacherss

* chore: seed projects

* chore: seed groups

* chore: seed submissions

* chore: add error handling to the commands

* chore: make admin script take in username

* chore: provide structure_checks

* Frontend: feat FileUpload logic + styling

* Frontend: feat Add projects to navbar, closes #243

* Frontend: fix linting for #245

* fix: production down when tests being run

* chore: cleanup seeders and add students assistants and teachers to courses and students to groups

* Update project.service.ts #245

* chore: added ignored nginx conf

* fix: fix linting in makeAdmin.py

* fix: make backend tests work

* fix: fix linting in makeAdmin.py

* fix: fix linting in seedDb.py

* chore: fix linter warnings

* chore: fix linter warnings

* Extra checks (#238)

* docker_view

* chore: Added check views

* chore: dynamic file paths

* chore: type hints

* chore: views

* chore: file_path uuid

* chore: run checks when checks changes

* chore: remove prints

* chore: do todo's

* chore: fix tests by commenting them out

* chore: move signal

* chore: moved everything to signals

* chore: merge

* fix: fixture

---------

Co-authored-by: EwoutV <ewoutverlinde@hotmail.com>

* feat: better calendar view

* Revert "feat: better calendar view"

This reverts commit 5caf521.

* chore: add make teacher script

* fix: added psychology faculty icon

* Calendar view improvements (#257)

* chore: add make teacher script

* fix: added psychology faculty icon

---------

Co-authored-by: tyboro2002 <verslypetybo@hotmail.com>

* feat: better calendar view

* chore: linting

* Reduce container size (#259)

* Seeders (#248)

* chore: add make teacher script

* fix: makeTeacher command

* chore: add bulk adding to the types

* speed up seeders

---------

Co-authored-by: Bram Meir <bram.meir@ugent.be>

* Role management (#260)

* chore: add make teacher script

* fix: added psychology faculty icon

* fix: faculty image filter

* chore: linting

* feat: role user mixin

* Calendar view improvements (#257)

* chore: add make teacher script

* fix: added psychology faculty icon

---------

Co-authored-by: tyboro2002 <verslypetybo@hotmail.com>

* chore: user permissions account for is_active

* chore: added role management tests, extracted common logic in helpers

* fix: student service parameter

* chore: linting

* chore: removed comment in seeder

---------

Co-authored-by: tyboro2002 <verslypetybo@hotmail.com>

* chore: hotfix

* chore: hotfix (#267)

* chore: commit changes

* Project creation update (#271)

* chore: project creation faculty

* fix: faculty added when course created

* chore: start docker upload project creation

* chore: init upload zip structure

* chore: still issues with file-upload

* chore: fix uploaded zip file parsing

* fix: cleanup

* fix: linting

* fix: tests

* fix: hopefully last fix

* Course card improvements (#272)

* chore: start update course view + based on roles

* feat: more placeholder images

* chore: layout improvements, past deadline project filter

* chore: linting

---------

Co-authored-by: Bram Meir <bram.meir@ugent.be>

* fix: user creation

* chore: linting

* chore: linting

---------

Co-authored-by: Bram Meir <bram.meir@ugent.be>
Co-authored-by: bsilkyn <brent.silkyn@ugent.be>
Co-authored-by: tyboro2002 <verslypetybo@hotmail.com>
Co-authored-by: lander <landermaes@outlook.com>
Co-authored-by: Topvennie <vincent@vallaeys.com>
Co-authored-by: Bram Meir <159529490+BramMeir@users.noreply.github.com>
Co-authored-by: Francis Vauterin <159532420+francisvaut@users.noreply.github.com>
Co-authored-by: Tybo Verslype <97916632+tyboro2002@users.noreply.github.com>
Co-authored-by: francis <francis.vauterin@ugent.be>
Co-authored-by: Lander Maes <67026331+DeLany123@users.noreply.github.com>
  • Loading branch information
11 people committed Apr 9, 2024
1 parent 31d69f5 commit a741b4b
Show file tree
Hide file tree
Showing 20 changed files with 50 additions and 70 deletions.
8 changes: 8 additions & 0 deletions frontend/.vite/deps/_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"hash": "2a2f1b62",
"configHash": "3d49becc",
"lockfileHash": "e3b0c442",
"browserHash": "86f7c323",
"optimized": {},
"chunks": {}
}
3 changes: 3 additions & 0 deletions frontend/.vite/deps/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "module"
}
18 changes: 18 additions & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
},
"devDependencies": {
"@types/js-cookie": "^3.0.6",
"@types/jsdom": "^21.1.6",
"@types/node": "^20.11.30",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@vitejs/plugin-vue": "^5.0.4",
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/components/courses/CourseGeneralCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ import type { Course } from '@/types/Course.ts';
import { type Faculty } from '@/types/Faculty.ts';
import { useAuthStore } from '@/store/authentication.store.ts';
import { storeToRefs } from 'pinia';
import { type Student } from '@/types/users/Student.ts';
/* Props */
defineProps<{
course: Course;
}>();
/* Composable injections */
const { user, student } = storeToRefs(useAuthStore());
const { user } = storeToRefs(useAuthStore());
/* State */
const images = Object.keys(
Expand Down Expand Up @@ -52,7 +53,7 @@ function getFacultyIcon(faculty: Faculty): string {
</div>
</div>
<div v-if="user && user.isStudent()">
<StudentCourseJoinButton :student="student" :course="course" />
<StudentCourseJoinButton :student="user as Student" :course="course" />
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/projects/ProjectList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ watch(
<template v-if="allProjects.length > 0">
<div class="grid align-items-stretch">
<div class="col-12 md:col-6 lg:col-4 xl:col-3" v-for="project in sortedProjects" :key="project.id">
<ProjectCard class="h-100" :project="project" :course="project.course" />
<ProjectCard class="h-100" :project="project" :course="project.course" v-if="project.course !== null" />
</div>
</div>
</template>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/composables/services/assistant.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ interface AssistantState {
assistants: Ref<Assistant[] | null>;
assistant: Ref<Assistant | null>;
response: Ref<Response | null>;
getAssistantByID: (id: string, init: boolean) => Promise<void>;
getAssistantByID: (id: string, init?: boolean) => Promise<void>;
getAssistantByCourse: (courseId: string) => Promise<void>;
getAssistants: () => Promise<void>;
assistantJoinCourse: (courseId: string, assistantId: string) => Promise<void>;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/composables/services/students.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ interface StudentsState {
students: Ref<Student[] | null>;
student: Ref<Student | null>;
response: Ref<Response | null>;
getStudentByID: (id: string, init: boolean) => Promise<void>;
getStudentByID: (id: string, init?: boolean) => Promise<void>;
getStudents: () => Promise<void>;
getStudentsByCourse: (courseId: string) => Promise<void>;
getStudentsByGroup: (groupId: string) => Promise<void>;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/composables/services/teachers.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface TeacherState {
teachers: Ref<Teacher[] | null>;
teacher: Ref<Teacher | null>;
response: Ref<Response | null>;
getTeacherByID: (id: string, init: boolean) => Promise<void>;
getTeacherByID: (id: string, init?: boolean) => Promise<void>;
getTeacherByCourse: (courseId: string) => Promise<void>;
getTeachers: () => Promise<void>;
teacherJoinCourse: (courseId: string, teacherId: string) => Promise<void>;
Expand Down
5 changes: 2 additions & 3 deletions frontend/src/test/unit/admin_service.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import { describe, it, expect, beforeEach } from 'vitest';
import { describe, it, expect } from 'vitest';
import { useAdmin } from '@/composables/services/admins.service.ts';
import { User } from '../../types/users/User';
import { User } from '@/types/users/User.ts';

const {
admins,
Expand All @@ -10,7 +10,6 @@ const {
getAdmins,

createAdmin,
deleteAdmin,
} = useAdmin();

describe('admin', (): void => {
Expand Down
8 changes: 1 addition & 7 deletions frontend/src/test/unit/assistant_service.test.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import { describe, it, expect, beforeEach } from 'vitest';
import { describe, it, expect } from 'vitest';
import { useAssistant } from '@/composables/services/assistant.service.ts';
import { User } from '../../types/users/User';
import { Assistant } from '@/types/users/Assistant';

const {
assistants,
assistant,
response,

getAssistantByID,
getAssistantByCourse,
getAssistants,

createAssistant,
deleteAssistant,

assistantJoinCourse,
assistantLeaveCourse,
} = useAssistant();

describe('assistant', (): void => {
Expand Down
12 changes: 2 additions & 10 deletions frontend/src/test/unit/faculty_service.test.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import { describe, it, expect, beforeEach } from 'vitest';
import { describe, it, expect } from 'vitest';
import { useFaculty } from '@/composables/services/faculties.service.ts';

const {
faculties,
faculty,
getFacultyByID,
getFaculties,

createFaculty,
deleteFaculty,
} = useFaculty();
const { faculties, faculty, getFacultyByID, getFaculties } = useFaculty();

describe('faculty', (): void => {
it('gets faculty data by id', async () => {
Expand Down
13 changes: 2 additions & 11 deletions frontend/src/test/unit/group_service.test.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import { describe, it, expect, beforeEach } from 'vitest';
import { describe, it, expect } from 'vitest';
import { useGroup } from '@/composables/services/groups.service.ts';

const {
groups,
group,
getGroupByID,
getGroupsByProject,
getGroupsByStudent,

createGroup,
deleteGroup,
} = useGroup();
const { groups, group, getGroupByID, getGroupsByProject, getGroupsByStudent } = useGroup();

describe('group', (): void => {
it('gets group data by id', async () => {
Expand Down
11 changes: 1 addition & 10 deletions frontend/src/test/unit/student_service.test.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import { describe, it, expect, beforeEach } from 'vitest';
import { describe, it, expect } from 'vitest';
import { useStudents } from '@/composables/services/students.service.ts';
import { Student } from '@/types/users/Student';

const {
students,
student,

response,

getStudentByID,
getStudents,
getStudentsByCourse,
getStudentsByGroup,

createStudent,
deleteStudent,

studentJoinCourse,
studentLeaveCourse,
studentJoinGroup,
studentLeaveGroup,
} = useStudents();

describe('students', (): void => {
Expand Down
13 changes: 2 additions & 11 deletions frontend/src/test/unit/submission_service.test.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import { describe, it, expect, beforeEach } from 'vitest';
import { describe, it, expect } from 'vitest';
import { useSubmission } from '@/composables/services/submission.service.ts';

const {
submissions,
submission,
getSubmissionByID,
getSubmissionByProject,
getSubmissionByGroup,

createSubmission,
deleteSubmission,
} = useSubmission();
const { submissions, submission, getSubmissionByID, getSubmissionByProject, getSubmissionByGroup } = useSubmission();

describe('submissions', (): void => {
it('gets submissions data by id', async () => {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/test/unit/submission_status_service.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import { describe, it, expect, beforeEach } from 'vitest';
import { describe, it, expect } from 'vitest';
import { useSubmissionStatus } from '@/composables/services/submission_status.service.ts';

const { submissionStatus, getSubmissionStatusByProject } = useSubmissionStatus();
Expand Down
9 changes: 1 addition & 8 deletions frontend/src/test/unit/teacher_service.test.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import { describe, it, expect, beforeEach } from 'vitest';
import { describe, it, expect } from 'vitest';
import { useTeacher } from '@/composables/services/teachers.service.ts';

const {
teachers,
teacher,
response,

getTeacherByID,
getTeacherByCourse,
getTeachers,

createTeacher,
deleteTeacher,

teacherJoinCourse,
teacherLeaveCourse,
} = useTeacher();

describe('teachers', (): void => {
Expand Down
1 change: 0 additions & 1 deletion frontend/src/types/users/Assistant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export class Assistant extends User {
faculties,
create_time,
last_login,
courses,
);
}

Expand Down
1 change: 0 additions & 1 deletion frontend/src/types/users/Teacher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export class Teacher extends User {
faculties,
create_time,
last_login,
courses,
);
}

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/projects/ProjectView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const filteredCourses = computed(
<div class="flex justify-content-between align-items-center mb-6">
<!-- Project list title -->
<Title class="m-0">{{ t('views.dashboard.projects') }}</Title>
<YearSelector :years="user?.academic_years" v-model="selectedYear" />
<YearSelector :years="user.academic_years" v-model="selectedYear" v-if="user" />
</div>

<ProjectList v-if="filteredCourses" :courses="filteredCourses" />
Expand Down

0 comments on commit a741b4b

Please sign in to comment.