Skip to content

Commit

Permalink
Merge pull request #52 from Arquisoft/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
bidof authored Mar 1, 2024
2 parents 7fffb56 + 5c350cc commit f834160
Show file tree
Hide file tree
Showing 47 changed files with 6,433 additions and 537 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
- run: npm --prefix users/authservice ci
- run: npm --prefix users/userservice ci
- run: npm --prefix gatewayservice ci
- run: npm --prefix questionsservice ci # Agrega la tarea para questionsservice
- run: npm --prefix webapp ci
- run: npm --prefix users/authservice test -- --coverage
- run: npm --prefix users/userservice test -- --coverage
Expand Down
39 changes: 31 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Deploy on release

on:
release:
types: [published]
push:
branches:
-master
-releases

jobs:
unit-tests:
Expand Down Expand Up @@ -51,7 +53,9 @@ jobs:
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
env:
API_URI: http://${{ secrets.DEPLOY_HOST }}:8000
API_URI: http://${{ secrets.DEPLOY_HOST || 'localhost' }}:8000


with:
name: arquisoft/wiq_es04c/webapp
username: ${{ github.actor }}
Expand Down Expand Up @@ -109,11 +113,29 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
workdir: gatewayservice
workdir: ./gatewayservice
docker-push-questionservice:
name: Push question service Docker Image to GitHub Packages
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
needs: [e2e-tests]
steps:
- uses: actions/checkout@v4
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: arquisoft/wiq_es04c/questionservice
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
workdir: ./questionservice

deploy:
name: Deploy over SSH
runs-on: ubuntu-latest
needs: [docker-push-userservice,docker-push-authservice,docker-push-gatewayservice,docker-push-webapp]
needs: [docker-push-userservice,docker-push-authservice,docker-push-gatewayservice,docker-push-webapp,docker-push-questionservice]
steps:
- name: Deploy over SSH
uses: fifsky/ssh-action@master
Expand All @@ -122,7 +144,8 @@ jobs:
user: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_KEY }}
command: |
wget https://raw.githubusercontent.com/arquisoft/wiq_es04c/master/docker-compose.yml -O docker-compose.yml
wget https://raw.githubusercontent.com/arquisoft/wiq_es04c/master/.env -O .env
docker compose down
wget https://raw.githubusercontent.com/arquisoft/wiq_es04c/releases/docker-compose.yml -O docker-compose.yml
wget https://raw.githubusercontent.com/arquisoft/wiq_es04c/releases/.env -O .env
git clone -b releases https://github.com/Arquisoft/wiq_es04c.git
docker compose --profile prod down
docker compose --profile prod up -d
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"asciidoc.antora.enableAntoraSupport": true
}
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# wiq_es04c

No hacer secciones nivel 0 (con solo un '=') porque no compila.
Ejemplo: no poner '= Requisitos de Calidad', sino '== Requisitos de Calidad'
No quitar el [[section-x]] del principio de un .adoc, porque si no no sale numerado.
Ejemplo: 12_glossary.adoc -> no quitar [[section-glossary]]

[![Deploy on release](https://github.com/Arquisoft/wiq_es04c/actions/workflows/release.yml/badge.svg)](https://github.com/Arquisoft/wiq_es04c/actions/workflows/release.yml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Arquisoft_wiq_es04c&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=Arquisoft_wiq_es04c)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=Arquisoft_wiq_es04c&metric=coverage)](https://sonarcloud.io/summary/new_code?id=Arquisoft_wiq_es04c)
Expand Down
13 changes: 13 additions & 0 deletions api_interfaces/api_questionservice.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
petición HTTP GET getquestion
devuelve json -> {question: string, answers: answer[]}

-------------------------------------------
answer: {answer: string, correct: boolean}

EJEMPLO
const example_data = {question: 'pregunta ejemplo', answers: [
{answer: 'respuesta correcta', correct: true},
{answer: 'respuesta incorrecta1', correct: false},
{answer: 'respuesta incorrecta2', correct: false},
{answer: 'respuesta incorrecta3', correct: false}
]};
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,19 @@ services:
networks:
- mynetwork
environment:
GENERATE_SERVICE_URL: http://questionservice:8003
AUTH_SERVICE_URL: http://authservice:8002
USER_SERVICE_URL: http://userservice:8001


questionservice:
container_name: questionservice-${teamname:-defaultASW}
build: ./questionservice
ports:
- "8003:8003"
networks:
- mynetwork

webapp:
container_name: webapp-${teamname:-defaultASW}
image: ghcr.io/arquisoft/wiq_0/webapp:latest
Expand Down
Binary file added docs/images/08_diagrama_modelo_dominio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/10_Arbol_de_calidad.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/diagrama_contexto_tecnico.drawio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 1 addition & 11 deletions docs/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// configure EN settings for asciidoc
include::src/config.adoc[]

= image:arc42-logo.png[arc42] Template
= image:arc42-logo.png[arc42] Generador de preguntas
:revnumber: 8.2 EN
:revdate: January 2023
:revremark: (based upon AsciiDoc version)
Expand Down Expand Up @@ -34,16 +34,6 @@ include::src/about-arc42.adoc[]
// horizontal line
***

[role="arc42help"]
****
[NOTE]
====
This version of the template contains some help and explanations.
It is used for familiarization with arc42 and the understanding of the concepts.
For documentation of your own system you use better the _plain_ version.
====
****


// numbering from here on
:numbered:
Expand Down
104 changes: 30 additions & 74 deletions docs/src/01_introduction_and_goals.adoc
Original file line number Diff line number Diff line change
@@ -1,96 +1,52 @@
ifndef::imagesdir[:imagesdir: ../images]

[[section-introduction-and-goals]]
== Introduction and Goals (wiq_es04c)
== Introducción y Objetivos (wiq_es04c) 🎇

Trabajo realizado por David Alvarez, Zohaib Akhtar Kausar, Sara Lamuño Garcia, Yago Navajas Gonzalez y Santiago Lopez Laso.
El proyecto de wiq_es04c es un proyecto desarrollado en la asignatura Arquitectura del Software. Consiste en la creación de una aplicación web al estilo "Saber y Ganar". Es decir, es un juego de preguntas de cultura general.

Los desarrolladores de la aplicacion son por David Álvarez Díaz, Zohaib Akhtar Kausar, Sara Lamuño García, Yago Navajas González y Santiago López Laso.

[role="arc42help"]
****
Describes the relevant requirements and the driving forces that software architects and development team must consider.
These include
La aplicación tendrá su base para las preguntas y las respuestas en Wikidata, la base de conocimiento editada en colaboración.

* underlying business goals,
* essential features,
* essential functional requirements,
* quality goals for the architecture and
* relevant stakeholders and their expectations
****

=== Requirements Overview
=== Requisitos Funcionales 🛠️

[role="arc42help"]
****
.Contents
Short description of the functional requirements, driving forces, extract (or abstract)
of requirements. Link to (hopefully existing) requirements documents
(with version number and information where to find it).
.Motivation
From the point of view of the end users a system is created or modified to
improve support of a business activity and/or improve the quality.
.Form
Short textual description, probably in tabular use-case format.
If requirements documents exist this overview should refer to these documents.
Keep these excerpts as short as possible. Balance readability of this document with potential redundancy w.r.t to requirements documents.
* Los usuarios se deberán loggearse en la página; esto servirá para tener registro de una serie de parámetros, como puede ser las veces que se ha jugado.
* Se podrán responder preguntas autogeneradas y se verá si han acertado o fallado, así como la respuesta correcta.
* Las preguntas deberán ser respondidas en un tiempo límite.
* Las preguntas seguirán la misma estructura: 1 pregunta correcta y 3 incorrectas, generadas automáticamente.
* Los usuarios podrán consultar datos sobre su cuentas, como pueden ser las veces que han jugado o el número de preguntas que han acertado o fallado.
.Further Information
See https://docs.arc42.org/section-1/[Introduction and Goals] in the arc42 documentation.
****

=== Quality Goals

[role="arc42help"]
****
.Contents
The top three (max five) quality goals for the architecture whose fulfillment is of highest importance to the major stakeholders.
We really mean quality goals for the architecture. Don't confuse them with project goals.
They are not necessarily identical.
Consider this overview of potential topics (based upon the ISO 25010 standard):
image::01_2_iso-25010-topics-EN.drawio.png["Categories of Quality Requirements"]
=== Atributos de Calidad 👑

.Motivation
You should know the quality goals of your most important stakeholders, since they will influence fundamental architectural decisions.
Make sure to be very concrete about these qualities, avoid buzzwords.
If you as an architect do not know how the quality of your work will be judged...
.Form
A table with quality goals and concrete scenarios, ordered by priorities
****

=== Stakeholders

[role="arc42help"]
****
.Contents
Explicit overview of stakeholders of the system, i.e. all person, roles or organizations that
* should know the architecture
* have to be convinced of the architecture
* have to work with the architecture or with code
* need the documentation of the architecture for their work
* have to come up with decisions about the system or its development
[options="header",cols="1,2,2"]
|===
| Prioridad | Objetivo | Descripción
| 1 | Usabilidad | Todos los usuarios deben poder usar la aplicación sin tener en cuenta sus limitaciones.
| 2 | Privacidad | Los datos sensibles de los usuarios deben estar restringidos al mismo usuario.
| 3 | Mantenibilidad | El código y documentación de la aplicación ha de estar conformado de tal forma que sea factible hacer cambios y ampliaciones en la aplicación.
| 4 | Eficiciencia | Los tiempos entre operaciones han de ser asumibles.
| 5 | Fiabilidad | Los datos usados en la aplicación deben ser los correctos.
|===

.Motivation
You should know all parties involved in development of the system or affected by the system.
Otherwise, you may get nasty surprises later in the development process.
These stakeholders determine the extent and the level of detail of your work and its results.

.Form
Table with role names, person names, and their expectations with respect to the architecture and its documentation.
****
=== Stakeholders 👨‍👩‍👦‍👦

[options="header",cols="1,2,2"]
|===
|Role/Name|Contact|Expectations
| _<Role-1>_ | _<Contact-1>_ | _<Expectation-1>_
| _<Role-2>_ | _<Contact-2>_ | _<Expectation-2>_
| Equipo de Desarrollo | Yago Navajas Gonzalez -> [email protected] +
David Álvarez Díaz -> [email protected] +
Zohaib Akhtar Kausar -> [email protected] +
Sara Lamuño García -> [email protected] +
Santiago Lopez Laso -> [email protected] | Los estudiantes que llevarán a cabo el desarrollo de la aplicación. Serán los encargados de la arquitectura, la documentación y la codificación.
| Profesores | Jose Emilio Labra Gayo | Supervisores de los avances y encargados de evaluar la aplicación final y el desarrollo de la misma.
| Usuario | Jugador de la aplicación | Personas que puedan interactuar tanto con el registro de usuarios como con el juego en sí y pueda completar correctamente una partida.
| HappySw | Empresa responsable | Empresa contratada, cuyo trabajo sera el desarrollo del juego de la mano del equipo de desarrollo.
| RTVE | Empleador | Interesados en la creacion del juego e impulsores de su creacion.
|===
33 changes: 9 additions & 24 deletions docs/src/02_architecture_constraints.adoc
Original file line number Diff line number Diff line change
@@ -1,27 +1,12 @@
ifndef::imagesdir[:imagesdir: ../images]

[[section-architecture-constraints]]
== Architecture Constraints


[role="arc42help"]
****
.Contents
Any requirement that constraints software architects in their freedom of design and implementation decisions or decision about the development process. These constraints sometimes go beyond individual systems and are valid for whole organizations and companies.
.Motivation
Architects should know exactly where they are free in their design decisions and where they must adhere to constraints.
Constraints must always be dealt with; they may be negotiable, though.
.Form
Simple tables of constraints with explanations.
If needed you can subdivide them into
technical constraints, organizational and political constraints and
conventions (e.g. programming or versioning guidelines, documentation or naming conventions)
.Further Information
See https://docs.arc42.org/section-2/[Architecture Constraints] in the arc42 documentation.
****
== Restricciones de arquitectura ⛔
.Restricciones
[options="header",cols="1,2"]
|===
|Restricción|Descripción
|Wikidata|Se usará la API de Wikidata para generar las preguntas automáticamente.
|Git|Control de versiones del proyecto.
|GitHub|Portal donde se guardará el código fuente del proyecto.
|===
Loading

0 comments on commit f834160

Please sign in to comment.