Skip to content

Commit

Permalink
move test_app assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
mccalluc committed Oct 16, 2024
1 parent 02c4ec9 commit 41b28db
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
13 changes: 1 addition & 12 deletions dp_creator_ii/app/analysis_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ def analysis_ui():
return ui.nav_panel(
"Define Analysis",
ui.markdown(
"Select numeric columns of interest in *TODO*, "
"Select numeric columns of interest, "
"and for each numeric column indicate the expected range, "
"the number of bins for the histogram, "
"and its relative share of the privacy budget."
),
ui.output_text("csv_name"),
ui.markdown(
"[TODO: Column selection]"
"(https://github.com/opendp/dp-creator-ii/issues/33)"
Expand Down Expand Up @@ -42,16 +41,6 @@ def analysis_ui():


def analysis_server(input, output, session):
@reactive.calc
def csv_name_calc():
csv_path_from_ui = input.csv_path_from_ui()
if csv_path_from_ui is not None:
return csv_path_from_ui[0]["datapath"]

@render.text
def csv_name():
return csv_name_calc()

@reactive.calc
def csv_fields_calc():
csv_path_from_ui = input.csv_path_from_ui()
Expand Down
4 changes: 0 additions & 4 deletions dp_creator_ii/app/dataset_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ def dataset_ui():


def dataset_server(input, output, session):
args = get_args()

csv_path_from_cli_value = reactive.value(args.csv_path)

@render.code
def unit_of_privacy_python():
contributions = input.contributions()
Expand Down
2 changes: 1 addition & 1 deletion dp_creator_ii/tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ def expect_no_error():

csv_path = Path(__file__).parent / "fixtures" / "fake.csv"
page.get_by_label("Choose CSV file").set_input_files(csv_path.resolve())
expect_visible("student_id")
expect_no_error()

page.get_by_role("button", name="Define analysis").click()
expect_not_visible(pick_dataset_text)
expect_visible(perform_analysis_text)
expect_not_visible(download_results_text)
expect_visible("student_id")
expect_no_error()

page.get_by_role("button", name="Download results").click()
Expand Down

0 comments on commit 41b28db

Please sign in to comment.