No description
Find a file
Mathias Petermann 65253a780a
Some checks failed
continuous-integration/drone/push Build is failing
udpate modules & teachers
2024-05-27 15:52:35 +02:00
.vscode style: cleanup using pre-commit 2022-12-11 11:40:45 +01:00
data udpate modules & teachers 2024-05-27 15:52:35 +02:00
timetable-frontend udpate modules & teachers 2024-05-27 15:52:35 +02:00
.drone.yml Add fork me link 2024-05-27 15:52:35 +02:00
.gitignore Remove pre-commit 2024-05-23 23:00:16 +02:00
.pre-commit-config.yaml Cleanup some files, readd prettier commit hook 2024-05-27 15:52:35 +02:00
LICENSE.md style: cleanup using pre-commit 2022-12-11 11:40:45 +01:00
README.md docs: Add pre-commit section 2022-12-11 12:27:42 +01:00

FHNW module Calendar

Updating the displayed calendar (GitLab pages)

Simply replace the PDF file data/klassen.pdf with the newer version and commit it to the repo. The CI pipeline will handle the updating of the GitLab pages.

Development

You will need to have Python 3.9 or newer with poetry to run the PDF parsing and a recent installation of NodeJS & NPM for building the frontend.

If you are stuck, have a look at the .gitlab-ci.yml to see how the pipeline parses & builds the frontend.

Dependency installation

For the python dependencies, run poetry install to get the required packages. This will also create a new virtual environment for you.

To install the frontend dependencies, run cd timetable-frontend && npm install.

Parsing the PDF

Simply run poetry run parse-pdf in the root folder to get a modules.json and config.json file in the data directory.

Running the frontend

Change into the timetable-frontend directory and run npm run dev for a live development server. You will also need to copy the data/ folder to timetable-frontend/public for the server to function correctly. You can do this using the cmd cp data/* timetable-frontend/public/.

Pre-commit

This repo uses pre-commit to check for common issues. The CI server will check for these on every push, so it's best if you also run pre-commit locally on every commit to avoid failed CI pipelines.

After installing pre-commit simply run pre-commit install to add the hooks to the git repo. This repo also follows the Conventional Commits commit style. To check if your commit message conforms to the style, you can add a pre-commit hook by running: pre-commit install --hook-type commit-msg