import os
from openpyxl import load_workbook
import numpy as np
wb = load_workbook(os.path.expanduser("~/Downloads/Infrastructure risk review.xlsx"))
wb.sheetnames
['Template', 'CB', 'CJ', 'MRB', 'Scopatz', 'UK', 'WV']
import string
nums = list(range(6, 18))
alphas = [c.upper() for c in string.ascii_lowercase if ord(c.upper()) >= ord("C") and ord(c.upper()) <= ord("V")]
if "total" not in wb.sheetnames:
tot = wb.create_sheet("total")
temp = wb["Template"]
for i in range(1, 19):
for a in string.ascii_uppercase:
key = "%s%d" % (a, i)
tot[key] = temp[key].value
for i in nums:
for a in alphas:
key = "%s%d" % (a, i)
tot[key] = 0.0
num = 0
for sheet in wb.sheetnames:
if sheet not in ["Template", "total"] and wb[sheet][key].value is not None:
tot[key] = tot[key].value + wb[sheet][key].value
num += 1
if num > 0:
tot[key] = tot[key].value / num
import pandas as pd
pd.set_option('display.max_columns', None)
pd.set_option('display.max_rows', None)
data = pd.DataFrame(tot.values)
data.iloc[[4, 5, 6, 7, 8, 9, 10, 11, 16], 0:22]
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | None | Description | Staged-recipes | Travis CI | Azure | Drone | CFEP-13 Output Validation | Other CI/build infra | autotick bot | webservices | anaconda.org | social media/public relations | conda | conda build | conda smithy | mamba | boa | quetz | compilers | languages (Python, R, Rust, C, C++, etc.) | Authentication/keys/access | Docs |
5 | Knowledge of system | How well do you know this system? (1 very well... | 2.5 | 2.5 | 2.5 | 3 | 3.25 | 2.66667 | 2.6 | 3 | 3 | 2.33333 | 2.75 | 2.75 | 2.75 | 2.5 | 3.75 | 4.25 | 2.75 | 2 | 2.25 | 1.5 |
6 | Documentation of system | How well do you think this system is documente... | 2.16667 | 2.5 | 2.5 | 2.5 | 3.5 | 4 | 3.8 | 3.75 | 3.6 | 3.33333 | 3.5 | 3.5 | 3.75 | 4.5 | 4.5 | 4.25 | 2.75 | 2.5 | 3.5 | 2 |
7 | Code quality (where applicable) | How good is the code quality? (including tests... | 2.66667 | 2 | 2 | 2.2 | 2.75 | 3 | 3 | 3.66667 | 2.5 | 1 | 3.5 | 4 | 3 | 2.75 | 2.33333 | 2.33333 | 2.25 | 2 | 1 | 2 |
8 | Key person risk | Is this infrastrucutre maintained by multiple ... | 2.5 | 2.16667 | 3.16667 | 2.66667 | 3.75 | 3.33333 | 4 | 3.25 | 4.2 | 2.33333 | 2.75 | 3.25 | 1.75 | 4 | 4 | 3.66667 | 3 | 2.75 | 2.25 | 1.25 |
9 | Security Risk (including DDOS) | Does this infra have security holes? How robus... | 3.16667 | 2.16667 | 2 | 2.33333 | 3.25 | 2.66667 | 3.2 | 2.75 | 2.4 | 2 | 1.25 | 1.5 | 1.75 | 2 | 1.66667 | 1.66667 | 1.5 | 1.5 | 2 | 1 |
10 | Size Risk | If CF grew by 5x in 6 months would this infra ... | 2.83333 | 4 | 2.66667 | 3.66667 | 3.5 | 2.66667 | 3.4 | 2.33333 | 2.5 | 1 | 3.75 | 2 | 2 | 1 | 1 | 1 | 1 | 1.33333 | 1 | 1 |
11 | Replacability (where applicable) | If this piece of infrastructure was removed wi... | 3.33333 | 3.16667 | 4.5 | 3 | 2.5 | 2.66667 | 3.6 | 4 | 4.6 | 1.66667 | 4.4 | 4.8 | 4.8 | 3.2 | 2.25 | 2.25 | 4.33333 | 3 | 3 | 2 |
16 | Confidence in assessment | How confident are you in this assessment, did ... | 2.33333 | 2.16667 | 2 | 2.33333 | 2.75 | 2.33333 | 2.2 | 2.25 | 2 | 1.75 | 2 | 2 | 1.75 | 2 | 2.75 | 2.75 | 1.75 | 2.25 | 1.66667 | 1.33333 |