Skip to content

Base de la práctica de Diseño y Mantenimiento del Software (4º GII UBU) del curso 2021-2022

Notifications You must be signed in to change notification settings

JorgeRuizDev/practica-dms-2021-2022

 
 

Repository files navigation

pylint score mypy typechecking

DMS course project codebase, academic year 2021-2022

The goal of this project is to implement a basic online evaluation appliance deployed across several interconnected services.

Demo

GIF

Table of Contents

Documentation

Spanish

Changelog

E3:

  • Updated Manuals
  • Updated Frontend Design Readmes
  • Added a new endpoint to fetch all the user stats
  • Updated User Stats
  • Teacher Role users can see the current stats of any student.

Developers:

Components

The source code of the components is available under the components directory.

Services

The services comprising the appliance are:

dms2122auth

This is the authentication service. It provides the user credentials, sessions and rights functionalities of the application.

See the README.md file for further details on the service.

dms2122backend

This service provides the evaluation logic (definition of questions, grading, etc.)

See the README.md file for further details on the service.

dms2122frontend

A frontend web service that allows to interact with the other services through a web browser.

See the README.md file for further details on the application.

Libraries

These are auxiliar components shared by several services.

dms2122core

The shared core functionalities.

See the README.md file for further details on the component.

Docker

The application comes with a pre-configured Docker setup to help with the development and testing (though it can be used as a base for more complex deployments).

To run the application using Docker Compose:

docker-compose -f docker/config/dev.yml up -d

When run for the first time, the required Docker images will be built. Should images be rebuilt, do it with:

docker-compose -f docker/config/dev.yml build

To stop and remove the containers:

docker-compose -f docker/config/dev.yml rm -sfv

By default data will not be persisted across executions. The configuration file docker/config/dev.yml can be edited to mount persistent volumes and use them for the persistent data.

To see the output of a container:

docker logs CONTAINER_NAME
# To keep printing the output as its streamed until interrupted with Ctrl+C:
# docker logs CONTAINER_NAME -f

To enter a running service as another subprocess to operate inside through a terminal:

docker exec -it CONTAINER_NAME /bin/bash

To see the status of the different containers:

docker container ps -a

Helper scripts

The directory scripts contain several helper scripts.

  • verify-style.sh: Runs linting (using pylint) on the components' code. This is used to verify a basic code quality. On GitHub, this CI pass will fail if the overall score falls below 7.00.

  • verify-type-correctness.sh: Runs mypy to assess the type correctness in the components' code. It is used by GitHub to verify that no typing rules are broken in a commit.

  • verify-commit.sh: Runs some validations before committing a changeset. Right now enforces type correctness (using verify-type-correctness.sh). Can be used as a Git hook to avoid committing a breaking change: Append at the end of .git/hooks/pre-commit:

    scripts/verify-commit.sh

GitHub workflows and badges

This project includes some workflows configured in .github/workflows. They will generate the badges seen at the top of this document, so do not forget to update the URLs in this README file if the project is forked!

About

Base de la práctica de Diseño y Mantenimiento del Software (4º GII UBU) del curso 2021-2022

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 83.7%
  • HTML 13.8%
  • CSS 1.3%
  • Shell 1.1%
  • Dockerfile 0.1%