File tree 7 files changed +345
-68
lines changed
7 files changed +345
-68
lines changed Original file line number Diff line number Diff line change 52
52
quarto render .
53
53
- name : Process notebooks
54
54
run : |
55
- python process_notebooks.py
55
+ python process_notebooks.py render
56
56
- name : Test Build
57
57
run : |
58
58
if [ -e yarn.lock ]; then
98
98
quarto render .
99
99
- name : Process notebooks
100
100
run : |
101
- python process_notebooks.py
101
+ python process_notebooks.py render
102
102
- name : Build website
103
103
run : |
104
104
if [ -e yarn.lock ]; then
Original file line number Diff line number Diff line change 3036
3036
"nbconvert_exporter" : " python" ,
3037
3037
"pygments_lexer" : " ipython3" ,
3038
3038
"version" : " 3.10.12"
3039
- }
3039
+ },
3040
+ "test_skip" : " Requires interactive usage"
3040
3041
},
3041
3042
"nbformat" : 4 ,
3042
3043
"nbformat_minor" : 4
Original file line number Diff line number Diff line change @@ -74,3 +74,37 @@ Learn more about configuring LLMs for agents [here](/docs/llm_configuration).
74
74
:::
75
75
````
76
76
``````
77
+
78
+ ## Testing
79
+
80
+ Notebooks can be tested by running:
81
+
82
+ ``` sh
83
+ python website/process_notebooks.py test
84
+ ```
85
+
86
+ This will automatically scan for all notebooks in the notebook/ and website/ dirs.
87
+
88
+ To test a specific notebook pass its path:
89
+
90
+ ``` sh
91
+ python website/process_notebooks.py test notebook/agentchat_logging.ipynb
92
+ ```
93
+
94
+ Options:
95
+ - ` --timeout ` - timeout for a single notebook
96
+ - ` --exit-on-first-fail ` - stop executing further notebooks after the first one fails
97
+
98
+ ### Skip tests
99
+
100
+ If a notebook needs to be skipped then add to the notebook metadata:
101
+ ``` json
102
+ {
103
+ "..." : " ..." ,
104
+ "metadata" : {
105
+ "test_skip" : " REASON"
106
+ }
107
+ }
108
+ ```
109
+
110
+ Note: Notebook metadata can be edited by opening the notebook in a text editor (Or "Open With..." -> "Text Editor" in VSCode)
Original file line number Diff line number Diff line change @@ -33,8 +33,7 @@ Navigate to the `website` folder and run:
33
33
34
34
``` console
35
35
pydoc-markdown
36
- quarto render ./docs
37
- python ./process_notebooks.py
36
+ python ./process_notebooks.py render
38
37
yarn start
39
38
```
40
39
Original file line number Diff line number Diff line change 28
28
# Generate documentation using pydoc-markdown
29
29
pydoc-markdown
30
30
31
- # Render the website using Quarto
32
- quarto render ./docs
33
-
34
31
# Process notebooks using a Python script
35
- python ./process_notebooks.py
32
+ python ./process_notebooks.py render
36
33
37
34
# Start the website using yarn
38
35
yarn start
Original file line number Diff line number Diff line change @@ -175,6 +175,8 @@ Tests for the `autogen.agentchat.contrib` module may be skipped automatically if
175
175
required dependencies are not installed. Please consult the documentation for
176
176
each contrib module to see what dependencies are required.
177
177
178
+ See [ here] ( https://github.com/microsoft/autogen/blob/main/notebook/contributing.md#testing ) for how to run notebook tests.
179
+
178
180
#### Skip flags for tests
179
181
180
182
- ` --skip-openai ` for skipping tests that require access to OpenAI services.
@@ -216,11 +218,11 @@ Then:
216
218
217
219
``` console
218
220
npm install --global yarn # skip if you use the dev container we provided
219
- pip install pydoc-markdown # skip if you use the dev container we provided
221
+ pip install pydoc-markdown pyyaml termcolor # skip if you use the dev container we provided
220
222
cd website
221
223
yarn install --frozen-lockfile --ignore-engines
222
224
pydoc-markdown
223
- quarto render ./docs
225
+ python process_notebooks.py render
224
226
yarn start
225
227
```
226
228
@@ -245,7 +247,7 @@ Once at the CLI in Docker run the following commands:
245
247
cd website
246
248
yarn install --frozen-lockfile --ignore-engines
247
249
pydoc-markdown
248
- quarto render ./docs
250
+ python process_notebooks.py render
249
251
yarn start --host 0.0.0.0 --port 3000
250
252
```
251
253
You can’t perform that action at this time.
0 commit comments