-
Notifications
You must be signed in to change notification settings - Fork 1
/
run.py
60 lines (46 loc) · 2.13 KB
/
run.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
"""Running the Interface Application"""
import os
import streamlit as st
from interface.streamlit_UI.multipage import MultiPage
from interface.pages import homepage, create_package ,artifact_action,\
restore_old, guidelines, common_utilities, to_do_tasks, commit_utilities
from interface.common.constants import StreamlitSetup
def check_environment_var():
MANDATORY_ENV_VARS = ['REMOTE_SER_PASSWORD', 'JIRA_AUTH_TOKEN', 'SLACK_API_TOKEN']
for var in MANDATORY_ENV_VARS:
if var not in os.environ:
raise EnvironmentError(f"Failed because {var} is not set.")
def main():
"""Application Entry Point"""
# Initial page config
st.set_page_config(
page_title=StreamlitSetup.APPLICATION_TITLE.value,
page_icon='📦',
layout="wide",
initial_sidebar_state="expanded")
st.markdown(StreamlitSetup.HIDE_STREAMLIT_STYLE.value, unsafe_allow_html=True)
st.markdown(StreamlitSetup.PAGE_SETUP.value, unsafe_allow_html=True)
st.sidebar.header("Artifact InterFace `ʕ•́ᴥ•̀ʔ`")
# Create an instance of the app
app = MultiPage()
# Add all your applications (pages) here
app.add_page("Dashboard", homepage.app)
app.add_page("Develop Package", create_package.app)
app.add_page("Process Artifact", artifact_action.app)
app.add_page("Restore Artifacts", restore_old.app)
app.add_page("Commit Utilities", commit_utilities.app)
app.add_page("Configuration setup", common_utilities.app)
app.add_page("Guide Line", guidelines.app)
# app.add_page("TODO-Enhancements", to_do_tasks.app)
# The main app
app.run()
st.sidebar.subheader("`ツ` Contribute")
col1, col2, col3 = st.sidebar.columns(3)
col1.markdown(StreamlitSetup.GITHUB_STAR.value, unsafe_allow_html=True)
col2.markdown(StreamlitSetup.GITHUB_WATCH.value, unsafe_allow_html=True)
col3.markdown(StreamlitSetup.GITHUB_FORK.value, unsafe_allow_html=True)
st.sidebar.subheader("`ツ` Connect")
st.sidebar.markdown(StreamlitSetup.SOCIAL.value, unsafe_allow_html=True)
if __name__ == "__main__":
check_environment_var()
main()