"codebuild:UpdateReport",
                            "codebuild:BatchPutTestCases"
                        ],
                        "Resource": [
                            f"arn:aws:codebuild:{config.AWS_REGION.get_value()}:{config.AWS_ACCOUNT_ID.get_value()}:report-group/{config.CODE_BUILD_PROJECT_NAME.get_value()}-*"
                        ]
                    }
                ]
            }
        ),
    ],
)

# --- ECR Repository
cft_dir = Path(__file__).parent
repos_dir = cft_dir.change(new_basename="repos")

DEFAULT_UNTAGGED_IMAGE_EXPIRE_DAYS = 30

repo_names = list()
for subfolder in repos_dir.select_dir(recursive=False):
    repo_config_file = Path(subfolder, "config.json")
    repo_basename = subfolder.basename
    if repo_config_file.exists():
        repo_config_data = json.loads(strip_comments(repo_config_file.read_text("utf-8")))
        try:
            untagged_image_expire_days = repo_config_data["untagged_image_expire_days"]
        except:
            untagged_image_expire_days = DEFAULT_UNTAGGED_IMAGE_EXPIRE_DAYS
    else:
        untagged_image_expire_days = DEFAULT_UNTAGGED_IMAGE_EXPIRE_DAYS
# -*- coding: utf-8 -*-

import pandas as pd
from pathlib_mate import PathCls as Path
from wotlkdoc.df_to_list_table import df_to_list_table

p = Path(__file__).change(new_basename="Stat-Abbreviation.tsv")
df = pd.read_csv(p.abspath, sep="\t")
lt = df_to_list_table(df)
p = p.change(new_ext=".rst")
p.write_text(lt.render(), encoding="utf-8")