Find goal satisfaction from a plan

Aperta
#104 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
graphql, python
Ambito
api, cli

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
5
Fork
7
Merge medio
3g 14h
PR unite (30g)
2

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di NASA-AMMOS/plandev-cli

Tutte le issue di NASA-AMMOS/plandev-cli

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.