Skip to content

Commit

Permalink
"Cleared some outputs"
Browse files Browse the repository at this point in the history
  • Loading branch information
Dcosthephalump committed Aug 4, 2023
1 parent cd96806 commit 803e2c1
Showing 1 changed file with 2 additions and 184 deletions.
186 changes: 2 additions & 184 deletions nbs/07_app.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -60,72 +60,11 @@
"import os"
]
},
{
"cell_type": "markdown",
"metadata": {
"tags": []
},
"source": [
"## Object calls\n",
"\n",
"This next snippet of code calls and instantiates objects from ```selection```, ```information```, ```annotation```, and ```export```. In general, the id of an object returned by a method from these method calls will be a [kebab-case](https://www.freecodecamp.org/news/snake-case-vs-camel-case-vs-pascal-case-vs-kebab-case-whats-the-difference/) variant of the camelCase (e.g. the ```createManuscriptSelect()``` method call returns an object with the id ```manuscript-select```). Objects that are non-interactive or that don't need to be updated do not get ids."
]
},
{
"cell_type": "raw",
"metadata": {
"tags": []
},
"source": [
"#| export\n",
"\n",
"#################\n",
"### SELECTION ###\n",
"#################\n",
"selectionKey, manuscriptSelect = createManuscriptSelect()\n",
"selectionInfo = createSelectionInfo()\n",
"finalizeSelection = createFinalizeSelection()\n",
"\n",
"# Global Variables: selectionKey\n",
"\n",
"###################\n",
"### INFORMATION ###\n",
"###################\n",
"# the ids for objects in inputObjects are: \"work\", \"author\", \"language\", \"country\", \"city\", \"institution\"\n",
"inputObjects = createInputObjects()\n",
"centuries, centuriesSlider = createCenturiesSlider()\n",
"uploadImages, uploadManuscripts = createUploadObjects()\n",
"informationInfo = createInformationInfo()\n",
"# the id for saveNContinue is \"save-and-continue\"\n",
"saveNContinue = createSaveNContinue()\n",
"\n",
"# Global Variables: centuries\n",
"\n",
"##################\n",
"### ANNOTATION ###\n",
"##################\n",
"annotationTextArea = createAnnotationTextArea()\n",
"pageSelector = createPageSelector()\n",
"saveShapes = createSaveShapes()\n",
"saveAnnotation = createSaveAnnotation()\n",
"nextTab = createNextTab()\n",
"\n",
"\n",
"##############\n",
"### EXPORT ###\n",
"##############\n",
"exportInfo = createExportInfo()\n",
"exportName = createExportName()\n",
"directoryOptions = createDirectoryOptions()\n",
"exportButton = createExportButton()\n",
"exportDownload = createExportDownload()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Bootstrap Object Calls"
"## Bootstrap Object Calls|"
]
},
{
Expand All @@ -150,7 +89,7 @@
"source": [
"## Bootstrap Application\n",
"\n",
"This makes the bootstrap version of the application"
"This makes the bootstrap version of the application. All ids are kept in [kebab-case](https://www.freecodecamp.org/news/snake-case-vs-camel-case-vs-pascal-case-vs-kebab-case-whats-the-difference/)."
]
},
{
Expand Down Expand Up @@ -210,127 +149,6 @@
")"
]
},
{
"cell_type": "markdown",
"metadata": {
"tags": []
},
"source": [
"## Instantiating the application\n",
"\n",
"This first cell makes sure that the ```Dash``` application object is instantiated and able to be run. Additionally, it creates the initial layout for the application, in this case a layout based on ```Tabs```, an object which allows the user to select through the different layouts stored in a ```Tab``` object. Examples can be found in the [documentation](https://dash.plotly.com/dash-core-components/tabs)."
]
},
{
"cell_type": "raw",
"metadata": {
"tags": []
},
"source": [
"#| export\n",
"app = Dash(__name__)\n",
"app.layout = html.Div(\n",
" [\n",
" dcc.Tabs(\n",
" id=\"tabs-object\",\n",
" value=\"selection\",\n",
" children=[\n",
" dcc.Tab(\n",
" label=\"Selection\",\n",
" value=\"selection\",\n",
" children=[\n",
" html.Div(\n",
" [\n",
" selectionInfo,\n",
" html.Br(),\n",
" manuscriptSelect,\n",
" html.Br(),\n",
" finalizeSelection,\n",
" ]\n",
" )\n",
" ],\n",
" ),\n",
" dcc.Tab(\n",
" label=\"Information\",\n",
" value=\"information\",\n",
" children=[\n",
" html.Div(\n",
" [\n",
" informationInfo,\n",
" html.Br(),\n",
" html.Div(inputObjects),\n",
" html.Br(),\n",
" html.Div(\n",
" [\n",
" uploadImages,\n",
" uploadManuscripts,\n",
" ],\n",
" id=\"uploader-container\",\n",
" ),\n",
" html.Br(),\n",
" centuriesSlider,\n",
" html.Br(),\n",
" saveNContinue,\n",
" ]\n",
" )\n",
" ],\n",
" ),\n",
" dcc.Tab(\n",
" label=\"Annotation\",\n",
" value=\"annotation\",\n",
" children=[\n",
" html.Div(\n",
" [\n",
" pageSelector,\n",
" dcc.Graph(\n",
" id=\"annotation-figure\",\n",
" config={\n",
" \"modeBarButtonsToAdd\": [\n",
" \"drawline\",\n",
" \"drawrect\",\n",
" \"eraseshape\",\n",
" ]\n",
" },\n",
" style={\n",
" \"height\": 800,\n",
" \"width\": 800,\n",
" },\n",
" ),\n",
" saveShapes,\n",
" annotationTextArea,\n",
" saveAnnotation,\n",
" nextTab,\n",
" ]\n",
" )\n",
" ],\n",
" ),\n",
" dcc.Tab(\n",
" label=\"Export\",\n",
" value=\"export\",\n",
" children=[\n",
" html.Div(\n",
" [\n",
" exportInfo,\n",
" exportName,\n",
" directoryOptions,\n",
" exportButton,\n",
" exportDownload,\n",
" ]\n",
" )\n",
" ],\n",
" ),\n",
" ],\n",
" ),\n",
" html.Div(id=\"current-tab\"),\n",
" html.Div(\n",
" children=\"no callback\",\n",
" id=\"dummy-output\",\n",
" style={\"display\": \"none\"},\n",
" ),\n",
" ]\n",
")"
]
},
{
"cell_type": "markdown",
"metadata": {
Expand Down

0 comments on commit 803e2c1

Please sign in to comment.