-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add common folder * Add program resource * Fix eslint rule (complexity) & fix dependencies versions * add course, cours-instance * add session resource * Add prisma, scraper, program files (modules and services) * Fix prisma & add scraper files & eslint migration * chore: address sonarlint warning (if statement) * Rollback eslint flat to v8 & remove entity & format imports * add public to classes * cleanup * add ets api hekper files * add ets-program logic & (WIP) upsert programs * Remove unnecessary dtos * (wip 🚔) Add controllers & fix course routes * fix tests * Fix ProgramType relation * Add coursePrerequisite controller & service * Move scraper folder into /common * Move pdf folder into /common * fix http & add prisma to app module * fix tests (wip) & sessions route * fix tests * rename * Add schema image generator * add methods * fix * change "program to programType" relation * fix ci test * miaow miaow * test test * only run eslint on src folder * Rollback to ".test.ts" only * pdf small test * fix logging * fix PR & remove scraper folder * update enum trimester * remove file * fix param * Add swagger * fix program creation parameters & some route parameters * fix axios vulnerability * add queues for programs and courses processing * add bull dashboard * add planification tests * yummy * Extract cheminements.txt file text * (wip) parse programs and courses * (wip) parsing of courses partially done * add cours hors-programme & remove commented lines from parsing * remove console.log * uppercase * add support of alternative courses (choix) * change id to code * Add directory parameter to FileUtil * pdfOutputPath * remove json * program upsert job creating programs and program types to db * fix progress% job * change course code to null * log verbose & fix course data format * a * test etsCourseService * refactor upsertCourses() to use findMany() for better performance * change prerequisite table relations * coverage folder to root * fix prerequisite service * cleanup course service * add program course resource * add type column to ProgramCourse table * cleanup program & courses cheminot helper * (wip) programCourse creation almost done * programCourse upsertion done * Refactor logger initialization to use readonly modifier * Add error handling * fix sonar issues * more fix * add redis env variables * fix type name
- Loading branch information
Showing
40 changed files
with
907 additions
and
164 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
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 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
...migrations/20240830020859_update_course_table_credits_attribute_to_nullable/migration.sql
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,3 @@ | ||
-- AlterTable | ||
ALTER TABLE "Course" ALTER COLUMN "code" DROP NOT NULL, | ||
ALTER COLUMN "credits" DROP NOT NULL; |
8 changes: 8 additions & 0 deletions
8
...ma/migrations/20240830021032_update_course_table_code_attribute_to_not_null/migration.sql
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 @@ | ||
/* | ||
Warnings: | ||
- Made the column `code` on table `Course` required. This step will fail if there are existing NULL values in that column. | ||
*/ | ||
-- AlterTable | ||
ALTER TABLE "Course" ALTER COLUMN "code" SET NOT NULL; |
2 changes: 2 additions & 0 deletions
2
prisma/migrations/20240830022905_update_course_table_add_cycle_attribute/migration.sql
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,2 @@ | ||
-- AlterTable | ||
ALTER TABLE "Course" ADD COLUMN "cycle" INTEGER; |
24 changes: 24 additions & 0 deletions
24
...urse_prerequisite_table_change_relation_to_one_to_many_program_course_table/migration.sql
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 @@ | ||
/* | ||
Warnings: | ||
- The primary key for the `CoursePrerequisite` table will be changed. If it partially fails, the table could be left without primary key constraint. | ||
- Added the required column `programId` to the `CoursePrerequisite` table without a default value. This is not possible if the table is not empty. | ||
*/ | ||
-- DropForeignKey | ||
ALTER TABLE "CoursePrerequisite" DROP CONSTRAINT "CoursePrerequisite_courseId_fkey"; | ||
|
||
-- DropForeignKey | ||
ALTER TABLE "CoursePrerequisite" DROP CONSTRAINT "CoursePrerequisite_prerequisiteId_fkey"; | ||
|
||
-- AlterTable | ||
ALTER TABLE "CoursePrerequisite" DROP CONSTRAINT "CoursePrerequisite_pkey", | ||
ADD COLUMN "programId" INTEGER NOT NULL, | ||
ADD COLUMN "unstructuredPrerequisite" TEXT, | ||
ADD CONSTRAINT "CoursePrerequisite_pkey" PRIMARY KEY ("courseId", "programId", "prerequisiteId"); | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "CoursePrerequisite" ADD CONSTRAINT "CoursePrerequisite_courseId_programId_fkey" FOREIGN KEY ("courseId", "programId") REFERENCES "ProgramCourse"("courseId", "programId") ON DELETE RESTRICT ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "CoursePrerequisite" ADD CONSTRAINT "CoursePrerequisite_prerequisiteId_programId_fkey" FOREIGN KEY ("prerequisiteId", "programId") REFERENCES "ProgramCourse"("courseId", "programId") ON DELETE RESTRICT ON UPDATE CASCADE; |
3 changes: 3 additions & 0 deletions
3
...ma/migrations/20240902020425_update_program_course_table_add_type_attribute/migration.sql
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,3 @@ | ||
-- AlterTable | ||
ALTER TABLE "ProgramCourse" ADD COLUMN "type" TEXT, | ||
ALTER COLUMN "typicalSessionIndex" DROP NOT 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
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 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 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 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 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 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 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 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 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 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 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 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,5 @@ | ||
export function extractNumberFromString(cycle: string): number { | ||
const match = RegExp(/\d+/).exec(cycle); | ||
|
||
return match ? parseInt(match[0], 10) : 0; | ||
} |
Oops, something went wrong.