Fixe sheet checking issues
Browse files- utils/check_sheet_exist.py +16 -2
utils/check_sheet_exist.py
CHANGED
|
@@ -53,21 +53,35 @@ def check_sheets(technology_attr, sheet_list, file_path):
|
|
| 53 |
"""
|
| 54 |
available_sheets = load(file_path)
|
| 55 |
missing_sheets = [sheet for sheet in sheet_list if sheet not in available_sheets]
|
|
|
|
|
|
|
|
|
|
| 56 |
if not missing_sheets:
|
| 57 |
setattr(Technology, technology_attr, True)
|
| 58 |
# print(getattr(Technology, technology_attr))
|
|
|
|
| 59 |
# print("All sheets exist")
|
|
|
|
| 60 |
# else:
|
| 61 |
# print(f"Missing sheets: {missing_sheets}")
|
|
|
|
| 62 |
# print(getattr(Technology, technology_attr))
|
| 63 |
|
| 64 |
|
| 65 |
# Check each technology's sheets
|
| 66 |
def execute_checks_sheets_exist(file_path):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
for tech_attr, sheets in sheets_to_check.items():
|
| 68 |
check_sheets(tech_attr, sheets, file_path)
|
| 69 |
|
| 70 |
|
| 71 |
-
#
|
| 72 |
-
# r"C:\Users\
|
| 73 |
# )
|
|
|
|
| 53 |
"""
|
| 54 |
available_sheets = load(file_path)
|
| 55 |
missing_sheets = [sheet for sheet in sheet_list if sheet not in available_sheets]
|
| 56 |
+
available_sheets_in_list = [
|
| 57 |
+
sheet for sheet in sheet_list if sheet in available_sheets
|
| 58 |
+
]
|
| 59 |
if not missing_sheets:
|
| 60 |
setattr(Technology, technology_attr, True)
|
| 61 |
# print(getattr(Technology, technology_attr))
|
| 62 |
+
# print(f"available:", available_sheets_in_list)
|
| 63 |
# print("All sheets exist")
|
| 64 |
+
|
| 65 |
# else:
|
| 66 |
# print(f"Missing sheets: {missing_sheets}")
|
| 67 |
+
# print(f"available:", available_sheets_in_list)
|
| 68 |
# print(getattr(Technology, technology_attr))
|
| 69 |
|
| 70 |
|
| 71 |
# Check each technology's sheets
|
| 72 |
def execute_checks_sheets_exist(file_path):
|
| 73 |
+
Technology.gsm = False
|
| 74 |
+
Technology.wcdma = False
|
| 75 |
+
Technology.lte = False
|
| 76 |
+
Technology.neighbors = False
|
| 77 |
+
Technology.trx = False
|
| 78 |
+
Technology.mrbts = False
|
| 79 |
+
Technology.mal = False
|
| 80 |
+
DumpType.full_dump = False
|
| 81 |
for tech_attr, sheets in sheets_to_check.items():
|
| 82 |
check_sheets(tech_attr, sheets, file_path)
|
| 83 |
|
| 84 |
|
| 85 |
+
# execute_checks_sheets_exist(
|
| 86 |
+
# r"C:\Users\David\Documents\PROJECTS\2023\PROJET 2023\DUMP\DUMP\2142\DUMP 2142.xlsb"
|
| 87 |
# )
|