-
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 'dev' into permission-middleware
- Loading branch information
Showing
115 changed files
with
3,361 additions
and
888 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 |
---|---|---|
@@ -1,26 +1,38 @@ | ||
# UGent-5 | ||
# Apollo | ||
|
||
## Rolverdeling | ||
Apollo is an online submission platform where instructors can flexibly set requirements for | ||
student submissions. These requirements can range from simple checks on the submitted | ||
file structure to test scripts that run when a submission is made. | ||
|
||
| Rol | Verantwoordelijke | | ||
| ------------- | ------------- | | ||
| Groepsleider | Marieke Sinnaeve | | ||
| Technische lead | Bram Reyniers | | ||
| Systeembeheerder | Xander Bil | | ||
| Customer Relations Officer | Pieter Janin | | ||
| Frontendbeheerder | Mattis Cauwel | | ||
| Backendbeheerder | Dries Huybens | | ||
| Documentatiebeheerder | Pieter Janin | | ||
| Testbeheerder | Michaël Boelaert | | ||
Students quickly receive feedback on their submission, allowing them to know if it meets | ||
the project requirements. | ||
|
||
This repository hosts the web application's source code. To use Apollo, visit https://sel2-5.ugent.be. | ||
|
||
## Wiki | ||
|
||
Informatie over de gebruikte technologieën, de gebruikershandleiding en meer kan je vinden in de [wiki](https://github.com/SELab-2/UGent-5/wiki). | ||
Documentation, including a user manual for teachers, can be found in the | ||
[Apollo wiki](https://github.com/SELab-2/UGent-5/wiki). | ||
|
||
## For Developers | ||
|
||
## Setup ontwikkelomgeving | ||
Instructions for setting up the frontend development environment can be found | ||
[here](frontend/README.md). | ||
|
||
De instructies voor het opzetten van de ontwikkelomgeving van de frontend kan je [hier](frontend/README.md) vinden. De instructies voor de backend staan [hier](backend/REAMDE.md). | ||
Instructions for the backend are located [here](backend/README.md). | ||
|
||
## API | ||
|
||
Geautomatiseerde clients kunnen interageren met de webapplicatie via de [API](https://sel2-5.ugent.be/api/docs). | ||
Automated clients can interact with the web application via the [API](https://sel2-5.ugent.be/api/docs). | ||
|
||
## The team | ||
|
||
| | | | ||
|------------------|---------------------------------------------------| | ||
| Xander Bil | System Administrator | | ||
| Michaël Boelaert | Test Manager | | ||
| Mattis Cauwel | Frontend Manager | | ||
| Dries Huybens | Backend Manager | | ||
| Pieter Janin | Customer Relations Officer, Documentation Manager | | ||
| Bram Reyniers | Technical Lead | | ||
| Marieke Sinnaeve | Team Lead | |
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.
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,43 @@ | ||
# Alembic | ||
|
||
From the docs: | ||
|
||
> [Alembic](https://alembic.sqlalchemy.org/en/latest/) is a lightweight database | ||
migration tool for usage with the [SQLAlchemy](https://www.sqlalchemy.org/) | ||
Database Toolkit for Python. | ||
|
||
It allows us to generate database schemas from Python SQLAlchemy code, found in each | ||
`models.py` file. | ||
|
||
## Usage | ||
|
||
Here are some of the most commonly used commands you might need. | ||
|
||
#### Automatically generate a revision script after modifying database models in Python: | ||
|
||
```sh | ||
alembic revision --autogenerate -m "my_revision_name" | ||
``` | ||
|
||
Make sure to review the generated script in `alembic/versions` | ||
and make adjustments if needed. | ||
|
||
#### Run a migration: this will upgrade the database schema to the most recent revision. | ||
|
||
```sh | ||
alembic upgrade head | ||
``` | ||
|
||
#### Undo the most recent revision: | ||
|
||
```sh | ||
alembic downgrade -1 | ||
``` | ||
|
||
#### Reset the database to its initial (empty) state: | ||
|
||
```sh | ||
alembic downgrade base | ||
``` | ||
|
||
For more examples, see the [official Alembic tutorial](https://alembic.sqlalchemy.org/en/latest/tutorial.html). |
35 changes: 35 additions & 0 deletions
35
backend/alembic/versions/18fb90307213_project_requirements_fix.py
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,35 @@ | ||
"""project_requirements_fix: fixes bug where project requirements would remain in the database after the parent | ||
project would be deleted. | ||
Revision ID: 18fb90307213 | ||
Revises: e0c97995e669 | ||
Create Date: 2024-05-04 15:42:43.114843 | ||
""" | ||
from typing import Sequence, Union | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = '18fb90307213' | ||
down_revision: Union[str, None] = 'e0c97995e669' | ||
branch_labels: Union[str, Sequence[str], None] = None | ||
depends_on: Union[str, Sequence[str], None] = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.alter_column('requirement', 'project_id', | ||
existing_type=sa.INTEGER(), | ||
nullable=False) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.alter_column('requirement', 'project_id', | ||
existing_type=sa.INTEGER(), | ||
nullable=True) | ||
# ### end Alembic commands ### |
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,31 @@ | ||
"""add user surname | ||
Revision ID: 566f33fb161f | ||
Revises: 18fb90307213 | ||
Create Date: 2024-05-06 15:32:33.617263 | ||
""" | ||
from typing import Sequence, Union | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = '566f33fb161f' | ||
down_revision: Union[str, None] = '18fb90307213' | ||
branch_labels: Union[str, Sequence[str], None] = None | ||
depends_on: Union[str, Sequence[str], None] = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column('website_user', sa.Column('surname', sa.String(), | ||
nullable=False, server_default='SURNAME_DEFAULT')) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_column('website_user', 'surname') | ||
# ### end Alembic commands ### |
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
Oops, something went wrong.