You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-4
Original file line number
Diff line number
Diff line change
@@ -15,19 +15,20 @@ Each exercise folder contains the following:
15
15
- A partial copy of the NanoDash codebase (under `exerciseN/nanodash/`), containing one or more spots for you to "fill-in-the-blanks" by implementing part of the NanoDash logic
16
16
17
17
- A sample app (`exerciseN/app.py`) which will run correctly once the exercise has been completed
18
+
- To run the app from the repository root: `python exerciseN/app.py`
18
19
19
20
- A tests file (`test_exerciseN.py`) which will pass once the exercise has been completed.
20
21
- To run the tests for exercise N from the repository root: `python -m pytest exerciseN/`
21
-
- To run the tests for exercise N from within the exercise directory: `python -m pytest`
22
22
23
-
## Note on running Pytest
24
-
We recommend running `python -m pytest` rather than just `pytest`, because it ensures using the python in your virtual environment rather than the system python.
23
+
## A note on running Pytest
24
+
We recommend using the command `python -m pytest` rather than just `pytest`, because it ensures using the Python in your virtual environment rather than the system Python.
25
25
26
26
## Exercise outline
27
27
28
28
Each exercise focuses on implementing a specific part of the NanoDash framework.
29
29
30
30
### Exercise 1: Making a basic Flask server which serves a static HTML page
31
+
---
31
32
32
33
**Goal**: Set up a simple Flask server that serves one static HTML page.
33
34
@@ -41,6 +42,7 @@ Each exercise focuses on implementing a specific part of the NanoDash framework.
41
42
`python -m pytest exercise1/`
42
43
43
44
### Exercise 2: Implementing input components
45
+
---
44
46
45
47
**Goal**: Implement basic input components as Python objects, to be used as building blocks for interactive dashboards.
46
48
@@ -55,7 +57,8 @@ Each exercise focuses on implementing a specific part of the NanoDash framework.
55
57
**Command to run tests**
56
58
`python -m pytest exercise2/`
57
59
58
-
### Exercise 3: Implementing the Graph component
60
+
### Exercise 3: Implementing the Graph component
61
+
---
59
62
60
63
**Goal**: Implement the Graph component, which uses Plotly.js to display Plotly figures in the browser.
61
64
@@ -69,6 +72,7 @@ Each exercise focuses on implementing a specific part of the NanoDash framework.
69
72
`python -m pytest exercise3/`
70
73
71
74
### Exercise 4: Gathering the page state when an input changes
75
+
---
72
76
73
77
**Goal**: Implement the Javascript logic to capture the state of all components on the page, and bundle it into a JSON request to send to the Flask server.
74
78
@@ -84,6 +88,7 @@ Don't worry — we've provided some useful helper functions inside the Javascrip
84
88
`python -m pytest exercise4/`
85
89
86
90
### Exercise 5: Running callbacks
91
+
---
87
92
88
93
**Goal**: Implement the Python logic which receives the page state from the frontend, runs the necessary callbacks, and sends the results back to the frontend. Also implement the logic which allows a user to add a callback to their app.
89
94
@@ -98,6 +103,7 @@ Don't worry — we've provided some useful helper functions inside the Javascrip
98
103
`python -m pytest exercise5/`
99
104
100
105
### Exercise 6: Updating the page with callback results
106
+
---
101
107
102
108
**Goal**: Implement the Javascript logic to update the page's UI components based on the callback results received from the server.
103
109
@@ -111,6 +117,7 @@ Don't worry — we've provided some useful helper functions inside the Javascrip
111
117
`python -m pytest exercise6/`
112
118
113
119
### Exercise 7: Writing your own NanoDash application
120
+
---
114
121
115
122
**Goal**: Use the NanoDash framework to write your own interactive dashboard. You can modify the framework or add new components if you like.
0 commit comments