-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* clean up dataset page, and move half-baked to analysis * move test_app assertion * app_test uses fixture, not generated file. Fix #76 * check branch coverage. Fix #74 * label log slider * move to separate file * id parameter * lower and upper parameter * rename and reorg * remove commented-out block * columns checkbox group * columns_ui * stub per-column controls * fix warning on startup, because there is a default contrib * add a test that exercises conversion error handling * execise Template param checks * playwrite test of dynamic form * test the log slider: click on the bar and it moves half-way * comment linting * Move stray files to utils directory * move tests dir up and out * Remove top-level coverage skip * remove redundant css * collect info from dynamic form elements * numeric values * pull columns into module * rename * add pragma to fix coverage
- Loading branch information
Showing
36 changed files
with
199 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
from shiny import ui, render, module | ||
|
||
|
||
@module.ui | ||
def column_ui(): # pragma: no cover | ||
return [ | ||
ui.input_numeric("min", "Min", 0), | ||
ui.input_numeric("max", "Max", 10), | ||
ui.input_numeric("bins", "Bins", 10), | ||
ui.input_select( | ||
"weight", | ||
"Weight", | ||
choices={ | ||
1: "Least accurate", | ||
2: "Less accurate", | ||
4: "More accurate", | ||
8: "Most accurate", | ||
}, | ||
), | ||
ui.output_code("col_config"), | ||
] | ||
|
||
|
||
@module.server | ||
def column_server(input, output, session): # pragma: no cover | ||
@output | ||
@render.code | ||
def col_config(): | ||
return { | ||
"min": input.min(), | ||
"max": input.max(), | ||
"bins": input.bins(), | ||
"weight": input.weight(), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
from math import log10 | ||
from shiny import ui | ||
|
||
|
||
def log_slider(id, lower, upper): | ||
# Rather than engineer a new widget, hide the numbers we don't want. | ||
# The rendered widget doesn't have a unique ID, but the following | ||
# element does, so we can use some fancy CSS to get the preceding element. | ||
# Long term solution is just to make our own widget. | ||
return ( | ||
ui.tags.table( | ||
ui.HTML( | ||
f""" | ||
<style> | ||
.irs:has(+ #{id}) .irs-min, .irs-max, .irs-single {{ | ||
display: none; | ||
}} | ||
</style> | ||
""" | ||
), | ||
ui.tags.tr( | ||
ui.tags.td(lower), | ||
ui.tags.td( | ||
ui.input_slider(id, None, log10(lower), log10(upper), 0, step=0.1), | ||
), | ||
ui.tags.td(upper), | ||
), | ||
), | ||
) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
dp_creator_ii/templates/README.md → dp_creator_ii/utils/templates/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Strings of ALL CAPS are replaced in these templates. Keeping them in a format which can actually be parsed as python makes some things easier, but it is also reinventing the wheel. We may revisit this. | ||
Strings of ALL CAPS are replaced in these templates. Keeping them in a format which can actually be parsed as python makes some things easier, but it is also reinventing the wheel. We may revisit this. |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
student_id,class_year,hw_number,grade | ||
1234,1,1,90 | ||
1234,1,2,95 | ||
1234,1,3,85 | ||
6789,2,1,70 | ||
6789,2,2,100 | ||
6789,2,3,90 |
File renamed without changes.
File renamed without changes.
Oops, something went wrong.