Remove process MRBTS and introduce ADJL
Browse files- apps/database_page.py +7 -12
- queries/process_mrbts.py +11 -11
apps/database_page.py
CHANGED
|
@@ -5,6 +5,7 @@ import streamlit as st
|
|
| 5 |
from st_aggrid import AgGrid, ColumnsAutoSizeMode
|
| 6 |
|
| 7 |
from apps.dump_analysis import dump_analysis_space
|
|
|
|
| 8 |
from queries.process_all_db import (
|
| 9 |
process_all_tech_db,
|
| 10 |
process_all_tech_db_with_stats,
|
|
@@ -14,9 +15,6 @@ from queries.process_all_db import (
|
|
| 14 |
from queries.process_gsm import process_gsm_data_to_excel, process_gsm_data_to_kml
|
| 15 |
from queries.process_invunit import process_invunit_data_to_excel
|
| 16 |
from queries.process_lte import process_lte_data_to_excel, process_lte_data_to_kml
|
| 17 |
-
|
| 18 |
-
# from queries.process_mal import process_mal_data_to_excel
|
| 19 |
-
from queries.process_mrbts import process_mrbts_data_to_excel
|
| 20 |
from queries.process_neighbors import process_neighbors_data_to_excel
|
| 21 |
|
| 22 |
# from queries.process_trx import process_trx_with_bts_name_data_to_excel
|
|
@@ -57,9 +55,6 @@ def download_button(database_type):
|
|
| 57 |
elif database_type == "NEI":
|
| 58 |
data = UtilsVars.neighbors_database
|
| 59 |
file_name = f"Neighbors databases_{datetime.now()}.xlsx"
|
| 60 |
-
elif database_type == "MRBTS":
|
| 61 |
-
data = UtilsVars.final_mrbts_database
|
| 62 |
-
file_name = f"MRBTS database_{datetime.now()}.xlsx"
|
| 63 |
elif database_type == "INVUNIT":
|
| 64 |
data = UtilsVars.final_invunit_database
|
| 65 |
file_name = f"INVUNIT database_{datetime.now()}.xlsx"
|
|
@@ -69,6 +64,9 @@ def download_button(database_type):
|
|
| 69 |
elif database_type == "Nice":
|
| 70 |
data = UtilsVars.final_nice_database
|
| 71 |
file_name = f"Nice database_{datetime.now()}.xlsx"
|
|
|
|
|
|
|
|
|
|
| 72 |
st.download_button(
|
| 73 |
type="primary",
|
| 74 |
label=f"Download {database_type} Database File",
|
|
@@ -172,7 +170,6 @@ if uploaded_file is not None:
|
|
| 172 |
and Technology.lte == False
|
| 173 |
and Technology.neighbors == False
|
| 174 |
and Technology.trx == False
|
| 175 |
-
and Technology.mrbts == False
|
| 176 |
and Technology.invunit == False
|
| 177 |
):
|
| 178 |
st.error(
|
|
@@ -183,7 +180,6 @@ if uploaded_file is not None:
|
|
| 183 |
"lte": ["LNBTS", "LNCEL", "LNCEL_FDD", "LNCEL_TDD"],
|
| 184 |
"neighbors": ["ADCE", "ADJS", "ADJI", "ADJG", "ADJW", "BTS", "WCEL"],
|
| 185 |
"trx": ["TRX", "BTS"],
|
| 186 |
-
"mrbts": ["MRBTS"],
|
| 187 |
"invunit": ["INVUNIT"]
|
| 188 |
"""
|
| 189 |
)
|
|
@@ -193,7 +189,6 @@ if uploaded_file is not None:
|
|
| 193 |
and Technology.wcdma == True
|
| 194 |
and Technology.lte == True
|
| 195 |
and Technology.trx == True
|
| 196 |
-
and Technology.mrbts == True
|
| 197 |
and Technology.invunit == True
|
| 198 |
):
|
| 199 |
DumpType.full_dump = True
|
|
@@ -222,12 +217,12 @@ if uploaded_file is not None:
|
|
| 222 |
"Generate LTE DB",
|
| 223 |
on_click=lambda: process_database(process_lte_data_to_excel, "LTE"),
|
| 224 |
)
|
| 225 |
-
if
|
| 226 |
with col5:
|
| 227 |
st.button(
|
| 228 |
-
"Generate
|
| 229 |
on_click=lambda: process_database(
|
| 230 |
-
|
| 231 |
),
|
| 232 |
)
|
| 233 |
if Technology.invunit == True:
|
|
|
|
| 5 |
from st_aggrid import AgGrid, ColumnsAutoSizeMode
|
| 6 |
|
| 7 |
from apps.dump_analysis import dump_analysis_space
|
| 8 |
+
from queries.process_adjl import process_adjl_data_to_excel
|
| 9 |
from queries.process_all_db import (
|
| 10 |
process_all_tech_db,
|
| 11 |
process_all_tech_db_with_stats,
|
|
|
|
| 15 |
from queries.process_gsm import process_gsm_data_to_excel, process_gsm_data_to_kml
|
| 16 |
from queries.process_invunit import process_invunit_data_to_excel
|
| 17 |
from queries.process_lte import process_lte_data_to_excel, process_lte_data_to_kml
|
|
|
|
|
|
|
|
|
|
| 18 |
from queries.process_neighbors import process_neighbors_data_to_excel
|
| 19 |
|
| 20 |
# from queries.process_trx import process_trx_with_bts_name_data_to_excel
|
|
|
|
| 55 |
elif database_type == "NEI":
|
| 56 |
data = UtilsVars.neighbors_database
|
| 57 |
file_name = f"Neighbors databases_{datetime.now()}.xlsx"
|
|
|
|
|
|
|
|
|
|
| 58 |
elif database_type == "INVUNIT":
|
| 59 |
data = UtilsVars.final_invunit_database
|
| 60 |
file_name = f"INVUNIT database_{datetime.now()}.xlsx"
|
|
|
|
| 64 |
elif database_type == "Nice":
|
| 65 |
data = UtilsVars.final_nice_database
|
| 66 |
file_name = f"Nice database_{datetime.now()}.xlsx"
|
| 67 |
+
elif database_type == "ADJL":
|
| 68 |
+
data = UtilsVars.adjl_database
|
| 69 |
+
file_name = f"ADJL database_{datetime.now()}.xlsx"
|
| 70 |
st.download_button(
|
| 71 |
type="primary",
|
| 72 |
label=f"Download {database_type} Database File",
|
|
|
|
| 170 |
and Technology.lte == False
|
| 171 |
and Technology.neighbors == False
|
| 172 |
and Technology.trx == False
|
|
|
|
| 173 |
and Technology.invunit == False
|
| 174 |
):
|
| 175 |
st.error(
|
|
|
|
| 180 |
"lte": ["LNBTS", "LNCEL", "LNCEL_FDD", "LNCEL_TDD"],
|
| 181 |
"neighbors": ["ADCE", "ADJS", "ADJI", "ADJG", "ADJW", "BTS", "WCEL"],
|
| 182 |
"trx": ["TRX", "BTS"],
|
|
|
|
| 183 |
"invunit": ["INVUNIT"]
|
| 184 |
"""
|
| 185 |
)
|
|
|
|
| 189 |
and Technology.wcdma == True
|
| 190 |
and Technology.lte == True
|
| 191 |
and Technology.trx == True
|
|
|
|
| 192 |
and Technology.invunit == True
|
| 193 |
):
|
| 194 |
DumpType.full_dump = True
|
|
|
|
| 217 |
"Generate LTE DB",
|
| 218 |
on_click=lambda: process_database(process_lte_data_to_excel, "LTE"),
|
| 219 |
)
|
| 220 |
+
if DumpType.full_dump == True:
|
| 221 |
with col5:
|
| 222 |
st.button(
|
| 223 |
+
"Generate ADJL",
|
| 224 |
on_click=lambda: process_database(
|
| 225 |
+
process_adjl_data_to_excel, "ADJL"
|
| 226 |
),
|
| 227 |
)
|
| 228 |
if Technology.invunit == True:
|
queries/process_mrbts.py
CHANGED
|
@@ -95,14 +95,14 @@ def process_mrbts_data(
|
|
| 95 |
return df_mrbts, df_gnbcf, df_wnbts
|
| 96 |
|
| 97 |
|
| 98 |
-
def process_mrbts_data_to_excel(file_path: str) -> None:
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
|
|
|
| 95 |
return df_mrbts, df_gnbcf, df_wnbts
|
| 96 |
|
| 97 |
|
| 98 |
+
# def process_mrbts_data_to_excel(file_path: str) -> None:
|
| 99 |
+
# """
|
| 100 |
+
# Process data from the specified file path and save it to a excel file.
|
| 101 |
+
|
| 102 |
+
# Args:
|
| 103 |
+
# file_path (str): The path to the file.
|
| 104 |
+
# """
|
| 105 |
+
# mrbts_df, gnbcf_df, wnbts_df = process_mrbts_data(file_path)
|
| 106 |
+
# UtilsVars.final_mrbts_database = convert_dfs(
|
| 107 |
+
# [mrbts_df, gnbcf_df, wnbts_df], ["MRBTS", "GNBCF", "WNBTS"]
|
| 108 |
+
# )
|