Skip to content

Commit

Permalink
rename pages to insert Metadata at step 2
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyfix committed Apr 22, 2024
1 parent d4b96ac commit 0a92b3f
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions app/menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def display_pages_menu() -> None:
st.markdown("# Pipeline steps")
st.page_link("pages/0_Import_File.py", label="Upload PDF")
st.page_link("pages/1_Selected_Pages.py", label="Pages selection")
st.page_link("pages/5_Metadata.py", label="Metadata")
st.page_link("pages/2_Merge_Tables.py", label="Merge tables")
st.page_link("pages/3_Clean_Headers.py", label="Headers setup")
st.page_link("pages/4_Clean_Tables.py", label="Tables customization")
st.page_link("pages/2_Metadata.py", label="Metadata")
st.page_link("pages/3_Merge_Tables.py", label="Merge tables")
st.page_link("pages/4_Clean_Headers.py", label="Headers setup")
st.page_link("pages/5_Clean_Tables.py", label="Tables customization")
2 changes: 1 addition & 1 deletion app/pages/1_Selected_Pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ def set_validate() -> None:
st.session_state["working_file_pdf"].name,
[i - 1 for i in selected_pages],
)
st.switch_page("pages/5_Metadata.py")
st.switch_page("pages/2_Metadata.py")
2 changes: 1 addition & 1 deletion app/pages/5_Metadata.py → app/pages/2_Metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@
"unit": unit,
"headquarter": headquarter,
}
st.switch_page("pages/2_Merge_Tables.py")
st.switch_page("pages/3_Merge_Tables.py")
4 changes: 2 additions & 2 deletions app/pages/2_Merge_Tables.py → app/pages/3_Merge_Tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def save_merge(table_extractor: str) -> None:

if "first_time_merge" not in st.session_state:
st.session_state["first_time_merge"] = False
st.switch_page("pages/3_Clean_Headers.py")
st.switch_page("pages/4_Clean_Headers.py")

col1, col2, col3 = st.columns([3, 1, 3])
with col1:
Expand Down Expand Up @@ -110,7 +110,7 @@ def save_merge(table_extractor: str) -> None:
args=(table_extractor,),
)
if validated:
st.switch_page("pages/3_Clean_Headers.py")
st.switch_page("pages/4_Clean_Headers.py")

with col3:
if merged is True:
Expand Down
8 changes: 4 additions & 4 deletions app/pages/3_Clean_Headers.py → app/pages/4_Clean_Headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@


def transpose_current_table():
st.session_state.tables[
st.session_state["algorithm_name"]
] = st.session_state.tables[st.session_state["algorithm_name"]].transpose()
st.session_state.tables[st.session_state["algorithm_name"]] = (
st.session_state.tables[st.session_state["algorithm_name"]].transpose()
)


def set_headers(algorithm_name: str) -> None:
Expand Down Expand Up @@ -107,7 +107,7 @@ def set_headers(algorithm_name: str) -> None:
)

if submitted:
st.switch_page("pages/4_Clean_Tables.py")
st.switch_page("pages/5_Clean_Tables.py")

st.markdown("# Current extraction")
st.markdown("The extracted table is displaye below")
Expand Down
File renamed without changes.

0 comments on commit 0a92b3f

Please sign in to comment.