diff --git a/SHINY.md b/SHINY.md index c7d6906..dc8e90f 100644 --- a/SHINY.md +++ b/SHINY.md @@ -78,6 +78,15 @@ If it won't stop, close the terminal window. Reopen the terminal window and be sure the virtual environment is activated before running the app again. +## Deploy the App + +Verify repository name in .github/workflows/deploy.yml. +Login to [shinyapps.io](https://www.shinyapps.io/) then Account / Tokens to find values for 3 repo secrets. +See the earlier [SHINYAPPS.md](https://github.com/denisecase/cintel-02-app/blob/main/SHINYAPPS.md) for details. + +- Name: SHINYAPPS_ACCOUNT, Secret: Paste shinyapps.io account name +- Name: SHINYAPPS_TOKEN, Secret: (paste token ) +- Name: SHINYAPPS_SECRET, Secret: (paste secret) ----- diff --git a/flights_server.py b/flights_server.py index c4bf555..71b1ae0 100644 --- a/flights_server.py +++ b/flights_server.py @@ -28,7 +28,7 @@ def get_flights_server_functions(input, output, session): """Define functions to create UI outputs.""" p = pathlib.Path(__file__).parent.joinpath("data").joinpath("flights.xlsx") - #logger.info(f"Reading data from {p}") + # logger.info(f"Reading data from {p}") original_df = pd.read_excel(p) # create new field with year as a string and month together @@ -45,7 +45,7 @@ def _(): """Reactive effect to update the filtered dataframe when inputs change. It doesn't need a name, because no one calls it directly.""" - #logger.info("UI inputs changed. Updating flights reactive df") + # logger.info("UI inputs changed. Updating flights reactive df") df = original_df.copy() @@ -72,10 +72,10 @@ def _(): @output @render.text def flights_record_count_string(): - #logger.debug("Triggered: flights_filter_record_count_string") + # logger.debug("Triggered: flights_filter_record_count_string") filtered_count = len(reactive_df.get()) message = f"Showing {filtered_count} of {total_count} records" - #logger.debug(f"filter message: {message}") + # logger.debug(f"filter message: {message}") return message @output diff --git a/mtcars_server.py b/mtcars_server.py index 94a49b8..8dd70fe 100644 --- a/mtcars_server.py +++ b/mtcars_server.py @@ -25,7 +25,7 @@ def get_mtcars_server_functions(input, output, session): """Define functions to create UI outputs.""" p = pathlib.Path(__file__).parent.joinpath("data").joinpath("mtcars.csv") - #logger.info(f"Reading data from {p}") + # logger.info(f"Reading data from {p}") original_df = pd.read_csv(p) total_count = len(original_df) @@ -59,7 +59,7 @@ def mtcars_record_count_string(): filtered_df = reactive_df.get() filtered_count = len(filtered_df) message = f"Showing {filtered_count} of {total_count} records" - #logger.debug(f"filter message: {message}") + # logger.debug(f"filter message: {message}") return message @output diff --git a/penguins_server.py b/penguins_server.py index a57e87a..8bb812d 100644 --- a/penguins_server.py +++ b/penguins_server.py @@ -23,8 +23,8 @@ def get_penguins_server_functions(input, output, session): """Define functions to create UI outputs.""" - p = (pathlib.Path(__file__).parent.joinpath("data").joinpath("penguins.xlsx")) - #logger.info(f"Reading data from {p}") + p = pathlib.Path(__file__).parent.joinpath("data").joinpath("penguins.xlsx") + # logger.info(f"Reading data from {p}") original_df = pd.read_excel(p) total_count = len(original_df) @@ -48,7 +48,7 @@ def _(): This is the only way to set a reactive value (after initialization). It doesn't need a name, because no one calls it directly.""" - #logger.info("UI inputs changed. Updating penguins reactive df") + # logger.info("UI inputs changed. Updating penguins reactive df") df = original_df.copy() @@ -90,10 +90,10 @@ def _(): @output @render.text def penguins_record_count_string(): - #logger.debug("Triggered: penguins_filter_record_count_string") + # logger.debug("Triggered: penguins_filter_record_count_string") filtered_count = len(reactive_df.get()) message = f"Showing {filtered_count} of {total_count} records" - #logger.debug(f"filter message: {message}") + # logger.debug(f"filter message: {message}") return message @output diff --git a/relationships_server.py b/relationships_server.py index 6dbf35a..d59d97f 100644 --- a/relationships_server.py +++ b/relationships_server.py @@ -36,7 +36,7 @@ def get_relationships_server_functions(input, output, session): @render_widget def relationships_output_widget1(): if input.RELATIONSHIPS_SHOW_TOGGLE(): - #logger.info("UI inputs changed. Updating relationships output widget2") + # logger.info("UI inputs changed. Updating relationships output widget2") # create a chord diagram from the links and the nodes # value = (5, None) only links with a value 5+ will be shown