Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ebrains-spack-builds
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Klaus Noelp
ebrains-spack-builds
Commits
72b28a56
Commit
72b28a56
authored
1 year ago
by
Eleni Mathioulaki
Browse files
Options
Downloads
Patches
Plain Diff
set cell timeout to prevent tests from hanging
parent
71530f9c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/wf-brainscales2-demos/package.py
+14
-4
14 additions, 4 deletions
packages/wf-brainscales2-demos/package.py
with
14 additions
and
4 deletions
packages/wf-brainscales2-demos/package.py
+
14
−
4
View file @
72b28a56
...
...
@@ -44,6 +44,7 @@ class WfBrainscales2Demos(Package):
args
=
[
"
nbconvert
"
,
"
--ExecutePreprocessor.kernel_name=python3
"
,
"
--ExecutePreprocessor.timeout=900
"
,
"
--execute
"
,
"
--to
"
,
"
notebook
"
,
...
...
@@ -53,16 +54,25 @@ class WfBrainscales2Demos(Package):
]
try
:
# execute notebook and save
jupyter
(
*
args
)
jupyter
(
*
args
,
output
=
str
.
split
,
error
=
str
.
split
)
except
ProcessError
as
e
:
# if the above fails, re-run notebook to produce output with error
jupyter
(
*
(
args
+
[
"
--allow-errors
"
]))
# if the notebook execution fails, re-run notebook to produce output with error
# in case of a cell timeout, don't re-run
if
"
CellTimeoutError
"
not
in
e
:
jupyter
(
*
(
args
+
[
"
--allow-errors
"
]))
raise
def
_run_notebooks
(
self
,
output_dir
):
mkdirp
(
output_dir
)
# try to run all notebooks, then fail if there are errors
exceptions
=
[]
for
fn
in
glob
(
join_path
(
prefix
,
"
notebooks
"
,
"
ts*.ipynb
"
))
+
glob
(
join_path
(
prefix
,
"
notebooks
"
,
"
tp*.ipynb
"
)):
self
.
_nbconvert
(
fn
,
join_path
(
output_dir
,
os
.
path
.
basename
(
fn
)))
try
:
self
.
_nbconvert
(
fn
,
join_path
(
output_dir
,
os
.
path
.
basename
(
fn
)))
except
Exception
as
e
:
exceptions
.
append
(
e
)
if
exceptions
:
raise
Exception
(
"
Errors during notebook execution
"
)
def
_set_collab_things
(
self
):
# enable "EBRAINS lab" mode
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment