Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
f255ca9
Prueba 1
Xigm Apr 20, 2022
105b07e
Fallo en excel report manager linea 222
Xigm May 8, 2022
b2b4209
Preparación práctica gradle
Isabel-Roman May 10, 2022
166d71e
Asumo que getState existe ya que se hace en otra tarea
Xigm May 10, 2022
0bf7bf5
solving the first issue, sustito primo
JacintoJT May 16, 2022
c8b355a
Empezando a trabajar el test
JacintoJT May 16, 2022
6a841fa
Changing Interface and implementing IndicatorConfiguration methods
JacintoJT May 19, 2022
32b5f6d
Test for definedIndicator() done
JacintoJT May 19, 2022
f39a928
Reordenación fichero build.gradle
Isabel-Roman May 24, 2022
3b08bf6
Pequeños cambios build.gradle
Isabel-Roman May 24, 2022
e0ffbba
Añadiendo pipeline al proyecto
Isabel-Roman May 24, 2022
9626804
Ampliando el demostrador de pipelines
Isabel-Roman May 24, 2022
3ff8d92
Añadiendo workflow seguridad
Isabel-Roman May 24, 2022
fa6b9a1
Añadiendo pipeline pruebas
Isabel-Roman May 24, 2022
708f13f
tareas
estheruly98 May 25, 2022
cab5abb
tareas
estheruly98 May 25, 2022
f84e238
Cambios realizados en la interfaz, clase y test de la clase report
juapalesp May 25, 2022
7fe95f5
Test Ivan
Mataas18 May 28, 2022
2111c44
Doing testSetAppIndicators
JacintoJT May 29, 2022
c5da4ba
First step of work
May 29, 2022
5e7a761
test commit
AntwanV May 29, 2022
b1caded
Correction two files (Checker + MetricConfiguration)
May 29, 2022
b67fe0e
Update pruebas.yml
juapalesp Jun 2, 2022
472d6a1
Update pruebas.yml
juapalesp Jun 2, 2022
92845ef
Version Final pruebas.yml
juapalesp Jun 2, 2022
4c7f6aa
Rename .github/workflows/pruebas.yml to pruebas.yml
juapalesp Jun 2, 2022
ae31c2e
Version final
juapalesp Jun 2, 2022
74048e0
Merge branch 'MIT-FS:V.0.2' into V.0.2
Jun 3, 2022
e51ed6a
Update build.gradle
estheruly1998 Jun 3, 2022
d5d3bde
Nueva rama
Jun 9, 2022
e058d69
Merge branch 'V.0.2' of https://github.com/antaramol/Audit4Improve-AP…
Jun 9, 2022
ee23b9d
añadido contextoo.txt
juapalesp Jun 14, 2022
ecd0f59
Terminados issues #44 y #45
Isabel-Roman Dec 29, 2022
e9380e2
Cambios issue #49, los test no están revisados
Isabel-Roman Dec 29, 2022
ae52641
issue 37, modificaciones para Indicador
Isabel-Roman Dec 30, 2022
5a1d2b1
issue 35 PersistenceManager y ExcelReportManager, sin probar, los tests
Isabel-Roman Dec 30, 2022
3bf7677
Issue 51, Cambios en Checker
Isabel-Roman Dec 30, 2022
0ecaf96
Issues 33 y 41
Isabel-Roman Dec 30, 2022
d82bdc2
Preparacion V.0.2
Isabel-Roman Jan 10, 2023
b0966fe
Preparando v.0.2
Isabel-Roman Jan 11, 2023
4aeca18
Preparando V.0.2
Isabel-Roman Jan 11, 2023
62b79c2
Pequeños cambios V.0.2
Isabel-Roman Jan 11, 2023
3d024fd
Repaso del paquete config
Isabel-Roman Jan 20, 2023
bb720f3
Preparando V.0.2
Isabel-Roman Feb 16, 2023
3b6198d
Mejorando V.0.2
Isabel-Roman Feb 16, 2023
5de2997
Arreglos para javadoc
Isabel-Roman Feb 16, 2023
acf699b
Mejoras V.0.2
Isabel-Roman Feb 16, 2023
20379f4
Trabajando ExcelReportManager
Isabel-Roman Feb 16, 2023
3b4bb0c
Eliminado ReportFormaterI del paquete control
Isabel-Roman May 4, 2023
285aa09
FEAT: se crea el patrón estrategia para los indicadores y se implementa
celllarod May 9, 2023
7dc9a54
Test context.getIndicatorFont(), y cambio algunos métodos estáticos
May 9, 2023
5921af0
Cambios en ficheros de configuración y test GetIndicatorFont
May 11, 2023
c2bed80
Issues 86 y 90
manmanher May 11, 2023
4578805
Merge branch 'FontConfiguration' into FontConfiguration
frarosrap May 11, 2023
f200e2f
Merge pull request #1 from manmanher/FontConfiguration
frarosrap May 11, 2023
2849530
Merge pull request #1 from frarosrap/FontConfiguration
manmanher May 11, 2023
4d8a9b1
Fixed errors with Issue #86
manmanher May 11, 2023
cfb173d
issue 89
May 11, 2023
273bb84
Merge branch 'FontConfiguration' into FontConfiguration
manmanher May 11, 2023
86a5cc7
Merge pull request #2 from frarosrap/FontConfiguration
manmanher May 11, 2023
0315105
Merge pull request #4 from celllarod/Calculadora
vicguzher May 11, 2023
c77fea1
FIX: Se modifican los tipos genéricos de la interfaz
celllarod May 11, 2023
fa72c40
Merge pull request #5 from celllarod/Calculadora
vicguzher May 11, 2023
69c152a
Tarea 95
vicguzher May 11, 2023
a1b5f7a
FIXED: else
vicguzher May 11, 2023
8186603
Merge pull request #1 from vicguzher/Calculadora
celllarod May 11, 2023
fd1f889
TEST: IssuesRatioIndicator
vicguzher May 11, 2023
a94f75b
FIX: warning de los test
vicguzher May 11, 2023
dc59ddb
Merge pull request #2 from vicguzher/Calculadora
celllarod May 11, 2023
67aa3de
FIX: Se corrige tipo de la métrica
celllarod May 11, 2023
1da03cb
TEST: Se crean tests para RepositoryCalculator
celllarod May 11, 2023
38f02a7
Cambios issues 95 y 96, Calculadora
Isabel-Roman Dec 12, 2023
d36073c
Issues 95 y 96
Isabel-Roman Dec 12, 2023
de6f804
Merge branch 'Calculadora' into V.0.2
Isabel-Roman Dec 12, 2023
614dc2b
Merge branch 'FontConfiguration' into V.0.2
Isabel-Roman Feb 29, 2024
4cc3b70
primeros cambios relacionados con Font
Isabel-Roman Mar 1, 2024
a2aa305
Terminado el issue 86
Isabel-Roman Mar 4, 2024
316215c
Terminado Issue 89
Isabel-Roman Mar 4, 2024
54176a8
problemas al guardar el estilo
Isabel-Roman Mar 4, 2024
ba7607d
Issue 93
Isabel-Roman Mar 5, 2024
eac27ad
Fin gestión de formato de fuentes
Isabel-Roman Mar 5, 2024
dfd06aa
issues 82 y 84
Isabel-Roman Mar 5, 2024
1fe8701
issue 80
Isabel-Roman Mar 5, 2024
29502ea
Eliminado la introducción de New en el nombre del fichero
Isabel-Roman Mar 5, 2024
0532baf
Trabajando en los issues 105 a 108
Isabel-Roman Mar 5, 2024
cfe3adb
GitHubOrganizationEquirer
Isabel-Roman Mar 5, 2024
0bfcb0f
Mejoras de GitHubOrganizationEnquirer y sus tests
Isabel-Roman Mar 8, 2024
cd1e136
Mejoras en GitHubRepositoryEnquirer
Isabel-Roman Mar 8, 2024
df1c372
101 a 104: Cambios en GitHubRepositoryEnquierer
Isabel-Roman Mar 8, 2024
5361913
Arreglando javadoc
Isabel-Roman Mar 8, 2024
da4d75c
Indicador 3, rendimiento de un desarrollador
Isabel-Roman Feb 21, 2025
ab59263
Indicador equipo4 pullRequests
Isabel-Roman Feb 22, 2025
9a6bd7e
Arreglando OrganizationEquirer
Isabel-Roman Feb 23, 2025
2bd6028
Cerrando equipos 3 y 4
Isabel-Roman Feb 23, 2025
9895bf5
PRPerformance Indicator Equipo 5
Isabel-Roman Feb 23, 2025
2d1acd9
Indicador fixTime equipo 6
Isabel-Roman Feb 23, 2025
a0c81a1
Indicador repoActivity Equipo 8
Isabel-Roman Feb 23, 2025
e43c05b
Indicador conventionsCompliant del equipo 1 del curso 23/24
Isabel-Roman Feb 23, 2025
1ee4fc2
Incluyendo indicador teamsBalanceI
Isabel-Roman Feb 23, 2025
7b05f3c
actualizando gradle
Isabel-Roman Feb 25, 2025
d35a5c3
Limpiando RepositoryEnquirer
Isabel-Roman Feb 27, 2025
ea29f8b
Aplicando criterio mapa de punteros al resto de los equirers
Isabel-Roman Feb 28, 2025
8e8d599
Reorganizando RemoteEnquirer
Isabel-Roman Feb 28, 2025
a3e97a2
Mejora tests clase Context
Isabel-Roman Mar 16, 2025
620f775
Update pruebas.yml
Isabel-Roman Mar 16, 2025
41981a0
Preparando la práctica de pruebas unidad
Isabel-Roman Mar 16, 2025
21effde
Merge remote-tracking branch 'origin/V.0.2' into V.0.2
Isabel-Roman Mar 16, 2025
a546b2e
Preparando práctica de pruebas unidad
Isabel-Roman Mar 17, 2025
0058ea8
Preparando pruebas unidad
Isabel-Roman Mar 17, 2025
6d37638
Mejora de la arquitectura paquete config
Isabel-Roman Mar 17, 2025
3cf4718
Incluida gestión de excepciones FileNotFound en MetricsConfig
Isabel-Roman Mar 22, 2025
4396e3e
Update build.gradle
Isabel-Roman Apr 3, 2025
6b8b9b4
Add test IndicatorStrategy and Modified JSON to add metrics and indic…
juanitrofkis May 17, 2025
26bf196
Add IEFRemoteEnquirerTest.java
liamorFS May 17, 2025
b48564a
Add IEFRemoteEnquirerTest.java
liamorFS May 17, 2025
6541f4b
Add IEFStrategy.java
liamorFS May 17, 2025
cbd9a11
Add IEFStrategy.java
liamorFS May 17, 2025
435e8b6
Add IEFRemoteEnquirer
juanitrofkis May 17, 2025
a833f30
Modified TestRemoteEnquire
juanitrofkis May 17, 2025
4006b28
Modified IEFStrategy and IEFStrategyTest
juanitrofkis May 17, 2025
3edcd75
Merge branch 'IEF_IndicatorStrategy' into desarrollo
liamorFS May 25, 2025
a746a65
Merge branch 'IEF_RemoteStrategy' into desarrollo
liamorFS May 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Demostrador para Acciones GitHub
on: [push]
jobs:
Explore-GitHub-Actions:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v3
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
- name: List files in the repository
run: |
ls ${{ github.workspace }}
- run: echo "🍏 This job's status is ${{ job.status }}."

dump_contexts_to_log:
runs-on: ubuntu-latest
steps:
- name: Mostrando contexto GitHub
id: github_context_step
run: echo '${{ toJSON(github) }}'
- name: Mostrando contexto job
run: echo '${{ toJSON(job) }}'
- name: Mostrando contexto steps
run: echo '${{ toJSON(steps) }}'
- name: Mostrando contexto runner
run: echo '${{ toJSON(runner) }}'
- name: Mostrando contexto strategy
run: echo '${{ toJSON(strategy) }}'
- name: Mostrando contexto matrix
run: echo '${{ toJSON(matrix) }}'
28 changes: 28 additions & 0 deletions .github/workflows/pruebas.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Flujo de trabajo para ejecutar los test
on:
workflow_dispatch:
push:
branches: [ V.0.2 ]
pull_request:
branches: [ V.0.2 ]
schedule:
- cron: '1 23 * * 0-4'
jobs:
Build:
runs-on: ubuntu-latest
env:
GITHUB_LOGIN: ${{ github.actor }}
GITHUB_PACKAGES: ${{ secrets.GHTOKEN }}
GITHUB_OAUTH: ${{ secrets.GHTOKEN }}
steps:
- name: Clonando el repositorio y estableciendo el espacio de trabajo
uses: actions/checkout@v3
- name: Configurando java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '16'
- name: Construyendo y probando el código
run: |
chmod +x gradlew
./gradlew build
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.compile.nullAnalysis.mode": "automatic"
}
237 changes: 20 additions & 217 deletions src/main/java/us/muit/fs/a4i/config/Checker.java
Original file line number Diff line number Diff line change
@@ -1,240 +1,43 @@
/**
*
*/
package us.muit.fs.a4i.config;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.logging.Logger;

import javax.json.*;

/**
* <p>
* Clase para verificar las m�tricas e indicadores
* </p>
* <p>
* La API incluye sus m�tricas e indicadores por defecto en la carpeta
* resources, en el fichero a4iDefault.json
* </p>
* <p>
* Si la aplicaci�n cliente crea nuevas m�tricas o indicadores las guarda en un
* fichero json de configuraci�n, que tendr� que indic�rsele al Checker
* </p>
* <p>
* Deuda t�cnica: analizar la posibilidad de leer s�lo una vez y mantener en
* memoria
* Esta clase permite acceder a las interfaces para configurar y verificar
* métricas e indicadores Se mantiene separada la lógica de la gestión de
* configuración de métricas e indicadores porque en el futuro van a ser
* bastante diferentes. En la versión actual son muy similares y por tanto el
* diseño no es bueno ya que no identifica bien la reutilización
* </p>
*
* @author Isabel Rom�n
* @author Isabel Román
*
*/
public class Checker {
private static Logger log = Logger.getLogger(Checker.class.getName());
private String a4iMetrics = "a4iDefault.json";
/*
* Definir la ruta completa del fichero de configuraci�n
*/
private String appMetrics = null;

public void setAppMetrics(String appMetricsPath) {
appMetrics = appMetricsPath;
private MetricConfigurationI metricConf;
private IndicatorConfigurationI indiConf;
/**
* El constructor recibe los objetos configuradores, que podrán ser diferentes según el contexto.
*/
Checker(MetricConfigurationI metricConf, IndicatorConfigurationI indiConf) {
this.metricConf = metricConf;
this.indiConf = indiConf;
}

/**
* <p>
* Comprueba si la m�trica est� definida en el fichero por defecto o en el de la
* aplicaci�n cliente
* </p>
* <p>
* Tambi�n verifica que el tipo es el adecuado
* </p>
*
* @param metricName nombre de la m�trica que se quiere comprobar
* @param metricType tipo de la m�trica
* @return metricDefinition Si la m�trica est� definida y el tipo es correcto se devuelve un mapa con las unidades y la descripci�n
* @throws FileNotFoundException Si no se localiza el fichero de configuraci�n
* @return interfaz para la configuración de métricas
*/
public HashMap<String,String> definedMetric(String metricName, String metricType) throws FileNotFoundException {
log.info("Checker solicitud de b�squeda m�trica " + metricName);

HashMap<String,String> metricDefinition=null;

String filePath="/"+a4iMetrics;
log.info("Buscando el archivo " + filePath);
InputStream is=this.getClass().getResourceAsStream(filePath);
log.info("InputStream "+is+" para "+filePath);
InputStreamReader isr = new InputStreamReader(is);


metricDefinition = isDefinedMetric(metricName, metricType, isr);
if ((metricDefinition==null) && appMetrics != null) {
is=new FileInputStream(appMetrics);
isr=new InputStreamReader(is);
metricDefinition = isDefinedMetric(metricName, metricType, isr);
}

return metricDefinition;
}

private HashMap<String,String> isDefinedMetric(String metricName, String metricType, InputStreamReader isr)
throws FileNotFoundException {

HashMap<String,String> metricDefinition=null;


JsonReader reader = Json.createReader(isr);
log.info("Creo el JsonReader");

JsonObject confObject = reader.readObject();
log.info("Leo el objeto");
reader.close();

log.info("Muestro la configuraci�n le�da " + confObject);
JsonArray metrics = confObject.getJsonArray("metrics");
log.info("El n�mero de m�tricas es " + metrics.size());
for (int i = 0; i < metrics.size(); i++) {
log.info("nombre: " + metrics.get(i).asJsonObject().getString("name"));
if (metrics.get(i).asJsonObject().getString("name").equals(metricName)) {
log.info("Localizada la m�trica");
log.info("tipo: " + metrics.get(i).asJsonObject().getString("type"));
if (metrics.get(i).asJsonObject().getString("type").equals(metricType)) {
metricDefinition=new HashMap<String,String>();
metricDefinition.put("description", metrics.get(i).asJsonObject().getString("description"));
metricDefinition.put("unit", metrics.get(i).asJsonObject().getString("unit"));
}

}
}

return metricDefinition;
public MetricConfigurationI getMetricConfiguration() {
return this.metricConf;
}

/**
* <p>
* Comprueba si el indicador est� definido en el fichero por defecto o en el de
* la aplicaci�n cliente
* </p>
* <p>
* Tambi�n verifica que el tipo es el adecuado
* </p>
*
* @param indicatorName nombre del indicador que se quiere comprobar
* @param indicatorType tipo del indicador
* @return indicatorDefinition Si el indicador est� definido y el tipo es correcto se devuelve un mapa con las unidades y la descripci�n
* @throws FileNotFoundException Si no se localiza el fichero de configuraci�n
* @return interfaz para la configuración de indicadores
*/
public HashMap<String,String> definedIndicator(String indicatorName, String indicatorType) throws FileNotFoundException {
HashMap<String,String> indicatorDefinition=null;
log.info("Checker solicitud de b�squeda indicador " + indicatorName);
boolean defined = false;


String filePath="/"+a4iMetrics;
log.info("Buscando el archivo " + filePath);
InputStream is=this.getClass().getResourceAsStream(filePath);
log.info("InputStream "+is+" para "+filePath);
InputStreamReader isr = new InputStreamReader(is);



indicatorDefinition = isDefinedIndicator(indicatorName, indicatorType, isr);
if ((indicatorDefinition==null) && appMetrics != null) {
is=new FileInputStream(appMetrics);
isr=new InputStreamReader(is);
indicatorDefinition = isDefinedIndicator(indicatorName, indicatorType, isr);
}

return indicatorDefinition;
}

private HashMap<String,String> isDefinedIndicator(String indicatorName, String indicatorType, InputStreamReader isr)
throws FileNotFoundException {
HashMap<String,String> indicatorDefinition=null;

JsonReader reader = Json.createReader(isr);
log.info("Creo el JsonReader");

JsonObject confObject = reader.readObject();
log.info("Leo el objeto");
reader.close();

log.info("Muestro la configuraci�n le�da " + confObject);
JsonArray indicators = confObject.getJsonArray("indicators");
log.info("El n�mero de indicadores es " + indicators.size());
for (int i = 0; i < indicators.size(); i++) {
log.info("nombre: " + indicators.get(i).asJsonObject().getString("name"));
if (indicators.get(i).asJsonObject().getString("name").equals(indicatorName)) {
log.info("Localizado el indicador");
log.info("tipo: " + indicators.get(i).asJsonObject().getString("type"));
if (indicators.get(i).asJsonObject().getString("type").equals(indicatorType)) {
indicatorDefinition=new HashMap<String,String>();
indicatorDefinition.put("description", indicators.get(i).asJsonObject().getString("description"));
indicatorDefinition.put("unit", indicators.get(i).asJsonObject().getString("unit"));
}

}
}

return indicatorDefinition;
public IndicatorConfigurationI getIndicatorConfiguration() {
return this.indiConf;
}

public HashMap<String,String> getMetricInfo(String metricName) throws FileNotFoundException {
log.info("Checker solicitud de b�squeda detalles de la m�trica " + metricName);

HashMap<String,String> metricDefinition=null;
String filePath="/"+a4iMetrics;
log.info("Buscando el archivo " + filePath);
InputStream is=this.getClass().getResourceAsStream(filePath);
log.info("InputStream "+is+" para "+filePath);
InputStreamReader isr = new InputStreamReader(is);

log.info("Creo el inputStream");
metricDefinition = getMetricInfo(metricName, isr);
if ((metricDefinition==null) && appMetrics != null) {
is=new FileInputStream(appMetrics);
isr=new InputStreamReader(is);
metricDefinition = getMetricInfo(metricName, isr);
}

return metricDefinition;
}


private HashMap<String,String> getMetricInfo(String metricName, InputStreamReader isr)
throws FileNotFoundException {

HashMap<String,String> metricDefinition=null;

JsonReader reader = Json.createReader(isr);
log.info("Creo el JsonReader");

JsonObject confObject = reader.readObject();
log.info("Leo el objeto");
reader.close();

log.info("Muestro la configuraci�n le�da " + confObject);
JsonArray metrics = confObject.getJsonArray("metrics");
log.info("El n�mero de m�tricas es " + metrics.size());
for (int i = 0; i < metrics.size(); i++) {
log.info("nombre: " + metrics.get(i).asJsonObject().getString("name"));
if (metrics.get(i).asJsonObject().getString("name").equals(metricName)) {
log.info("Localizada la m�trica");
log.info("tipo: " + metrics.get(i).asJsonObject().getString("type"));
metricDefinition=new HashMap<String,String>();
metricDefinition.put("name", metrics.get(i).asJsonObject().getString("name"));
metricDefinition.put("description", metrics.get(i).asJsonObject().getString("description"));
metricDefinition.put("unit", metrics.get(i).asJsonObject().getString("unit"));
metricDefinition.put("type", metrics.get(i).asJsonObject().getString("type"));

}
}

return metricDefinition;
}

}
Loading