Skip to content

Commit

Permalink
paste text from mockups
Browse files Browse the repository at this point in the history
  • Loading branch information
mccalluc committed Oct 9, 2024
1 parent a1b72e7 commit 37295ca
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 8 deletions.
26 changes: 25 additions & 1 deletion dp_creator_ii/app/analysis_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,31 @@
def analysis_ui():
return ui.nav_panel(
"Define Analysis",
"TODO: Define analysis",
ui.markdown(
"Select numeric columns of interest in *TODO*, "
"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.markdown(
"[TODO: Column selection]"
"(https://github.com/opendp/dp-creator-ii/issues/33)"
),
ui.markdown(
"What is your privacy budget for this release? "
"Values above 1 will add less noise to the data, "
"but have greater risk of revealing individual data."
),
ui.markdown(
"[TODO: Logarithmic slider]"
"(https://github.com/opendp/dp-creator-ii/issues/25)"
),
ui.markdown(
"## Preview\n"
"These plots assume a normal distribution for the columns you've selected, "
"and demonstrate the effect of different parameter choices."
),
ui.markdown("TODO"),
ui.input_action_button("go_to_results", "Download results"),
value="analysis_panel",
)
Expand Down
4 changes: 4 additions & 0 deletions dp_creator_ii/app/css/styles.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
body {
margin: 1em;
}

#top_level_nav {
margin-bottom: 1em;
}
11 changes: 10 additions & 1 deletion dp_creator_ii/app/dataset_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,17 @@
def dataset_ui():
return ui.nav_panel(
"Select Dataset",
"TODO: Pick dataset",
ui.markdown(
"[PR: CSV upload](https://github.com/opendp/dp-creator-ii/pull/45)"
),
ui.output_text("csv_path_text"),
ui.markdown(
"How many rows of the CSV can one individual contribute to? "
'This is the "unit of privacy" which will be protected.'
),
ui.markdown(
"[PR: Unit of privacy](https://github.com/opendp/dp-creator-ii/pull/41)"
),
ui.output_text("unit_of_privacy_text"),
ui.input_action_button("go_to_analysis", "Define analysis"),
value="dataset_panel",
Expand Down
21 changes: 18 additions & 3 deletions dp_creator_ii/app/results_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,24 @@
def results_ui():
return ui.nav_panel(
"Download results",
"TODO: Download results",
ui.download_button("download_script", "Download script"),
ui.download_button("download_notebook_unexecuted", "Download notebook"),
ui.markdown(
"You can now make a differentially private release of your data. "
"This will lock the configuration you’ve provided on the previous pages."
),
ui.markdown("TODO: Button: “Download Report (.txt)” (implemented as yaml?)"),
ui.markdown("TODO: Button: “Download Report (.csv)"),
ui.markdown(
"You can also download code that can be executed to produce a DP release. "
"Downloaded code does not lock the configuration."
),
ui.download_button(
"download_script",
"Download Script (.py)",
),
ui.download_button(
"download_notebook_unexecuted",
"Download Notebook (.ipynb)",
),
value="results_panel",
)

Expand Down
6 changes: 3 additions & 3 deletions dp_creator_ii/tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
# TODO: Why is incomplete coverage reported here?
# https://github.com/opendp/dp-creator-ii/issues/18
def test_app(page: Page, app: ShinyAppProc): # pragma: no cover
pick_dataset_text = "TODO: Pick dataset"
perform_analysis_text = "TODO: Define analysis"
download_results_text = "TODO: Download results"
pick_dataset_text = "How many rows of the CSV"
perform_analysis_text = "Select numeric columns of interest"
download_results_text = "You can now make a differentially private release"

def expect_visible(text):
expect(page.get_by_text(text)).to_be_visible()
Expand Down

0 comments on commit 37295ca

Please sign in to comment.