Find goal satisfaction from a plan

Abierto
#104 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
graphql, python
Área
api, cli

Línea de trabajo

No files, tests, or command entry points are named. Start by locating the CLI path that issues the scheduling_specification and scheduling_goal_analysis queries, then trace how scheduling_goal data is retrieved. Done means the result uses the last run for each goal and includes the goal information described in the issue.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement

In order to meet some of the requirements of a Mission Sim Report MPST is developing, we needed a way to get goal satisfaction from any given plan.

Through discussions with Alex Greer and Megan Jones, it looks like the following queries could be ran to get the goal satisfaction of a plan:

First, find the spec_id from this query:

query MyQuery { scheduling_specification(where: {plan_id: {_eq: $plan_id}}) { id } }

Then feed that spec_id into this query:

query MyQuery { scheduling_goal_analysis(where: {request: {specification_id: {_eq: $spec_id}}}) { goal_id analysis_id satisfied satisfying_activities_aggregate { aggregate { count(distinct: false) } } } }

And it should give you:

{ "data": { "scheduling_goal_analysis": [ { "goal_id": 27, "analysis_id": 80, "satisfied": false, "satisfying_activities_aggregate": { "aggregate": { "count": 59 } } }, { "goal_id": 26, "analysis_id": 81, "satisfied": false, "satisfying_activities_aggregate": { "aggregate": { "count": 270 } } } ] } }

You can tell if a goal is satisfied because the "satisfied" field in the query response will say true, goals are partially satisfied if the "count" number is non-zero but "satisfied" is false. If count is 0 and "satisfied" is false the goals is unsatisfied.

You can get the names for the goal_ids in the response above using this query:

query MyQuery { scheduling_goal(where: {id: {_eq: 27}}) { author name revision id definition description created_date modified_date model_id last_modified_by } }

Ideally, we would just filter for the last run for each goal so the result does not show all scheduling goal run results in that plan. It should also return all the info of the goal for that run, from the last query.

Lenguaje dominante
Python
Estrellas
5
Forks
7
Merge medio
3 d 14 h
PR fusionados (30 d)
2

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de NASA-AMMOS/plandev-cli

Todos los issues de NASA-AMMOS/plandev-cli

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.