Skip to content

Commit

Permalink
fixed issue in verismm.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Bassett committed Jun 18, 2019
1 parent 69d8672 commit bba7239
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bin/verismm.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ def maturity(cfg, agg_ratings):

# level_2
mat[2] = bool(
mat[1] and
agg_ratings['timeline_2'] >= all_pct and
agg_ratings['discovery_1'] >= all_pct and
agg_ratings['actor_1'] >= all_pct and
Expand All @@ -172,6 +173,7 @@ def maturity(cfg, agg_ratings):

# level_3
mat[3] = bool(
mat[2] and
agg_ratings['asset_2'] >= all_pct and
agg_ratings['pattern'] >= all_pct and
agg_ratings['victim_2'] >= all_pct and
Expand All @@ -187,6 +189,7 @@ def maturity(cfg, agg_ratings):

# level_4
mat[4] = bool(
mat[3] and
agg_ratings['asset_3'] >= all_pct and
#agg_ratings['quality_1'] >= all_pct and
agg_ratings['timeline_3'] >= all_pct and
Expand All @@ -200,6 +203,7 @@ def maturity(cfg, agg_ratings):

# level_5
mat[5] = bool(
mat[4] and
agg_ratings['actor_4'] >= all_pct and
agg_ratings['action_4'] >= all_pct and
agg_ratings['victim_3'] >= all_pct and
Expand All @@ -209,6 +213,7 @@ def maturity(cfg, agg_ratings):

# level_6
mat[6] = bool(
mat[5] and
agg_ratings['incident_2'] >= all_pct and
agg_ratings['a4_2'] >= all_pct and
agg_ratings['impact_2'] >= all_pct
Expand All @@ -217,6 +222,7 @@ def maturity(cfg, agg_ratings):

# level_7
mat[7] = bool(
mat[6] and
agg_ratings['actor_5'] >= all_pct and
agg_ratings['incident_3'] >= all_pct and
agg_ratings['action_5'] >= all_pct and
Expand Down Expand Up @@ -568,7 +574,7 @@ def rate_one(self, incident):
#incident_3
rating['incident_3'] = bool(
incident.get('victim', {}).get('notes', '') and # victim.notes: all
incident.get('victim', {}).get('secondary', '').get('notes', '') and # victim.secondary.notes: all
incident.get('victim', {}).get('secondary', {}).get('notes', '') and # victim.secondary.notes: all
incident.get('impact', {}).get('notes', '') # impact.notes: all
)
#action_5
Expand Down

0 comments on commit bba7239

Please sign in to comment.