Replies: 2 comments 1 reply
-
@CalMacCQ the book you linked looks quite fascinating! One option in GitHub actions would be to look for def get_reports_dir(root_dir):
"""
Depending on the format of the Jupyter Book (single or multipage),
the location of the reports vary. This helper function
checks both possible options.
"""
multi_page_path = f"{root_dir}/_build/html/reports"
single_page_path = f"{root_dir}/_build/_page/index/singlehtml/reports"
if os.path.exists(multi_page_path) and os.path.isdir(multi_page_path):
return multi_page_path
elif os.path.exists(single_page_path) and os.path.isdir(single_page_path):
return multi_page_path
else:
return None You can either create a step that looks for error logs in the reports directory which posts the directory as a variable, then use conditional artifact upload to have logs files uploaded at the end of a run. This |
Beta Was this translation helpful? Give feedback.
-
Please see this thread — I think it should prove useful :) |
Beta Was this translation helpful? Give feedback.
-
I use jupyterbook fairly often in my work. I find it very useful to display notebooks as built html pages.
Here is my book -> https://tket.quantinuum.com/examples/contextual_optimization.html
I usually have a CI workflow that executes the notebooks and builds the html pages. I use the "-W" flag in
jupyter-book build
to treat warnings as errors so the workflow will fail if a cell fails to execute.I've recently been having issues with certain notebooks rasing a
CellExecutionError
which I'm having a hard time reproducing locally.The output logs in github actions show that a particular notebook was the cause of the issue.
However it'd be nice to get some information about the specific lines of code that caused the
CellExecutionError
in the logs.For instance if my
circuit_generation_example.ipynb
had a line of code like"hello" + 14
I'd like to get the following output in the logs.Is this possible within jupuyterbook at the moment? I'd appreciate any help with this.
Thanks in advance :)
==============================
What I've tried so far...
I thought I could achieve this by using the
-- verbose
flag withjupyter-book build
but this doesn't seem to work.I've also tried the folllowing in
_config.yml
but no luck.Beta Was this translation helpful? Give feedback.
All reactions