diff --git a/.github/workflows/notebook-images.yml b/.github/workflows/notebook-images.yml index 5255c17..4aa0e55 100644 --- a/.github/workflows/notebook-images.yml +++ b/.github/workflows/notebook-images.yml @@ -58,8 +58,8 @@ jobs: - name: Generate notebooks run: | python3 -m pip install . - python3 -m pip install jupytext nbconvert ipykernel matplotlib pandas - python3 examples/generate_notebooks.py + python3 -m pip install jupytext nbconvert ipykernel matplotlib + python3 examples/generate_notebooks.py --skip "dirichlet_weak_imposition,simple_helmholtz_fem_bem_coupling_dolfin,opencl_benchmarks" - name: Push to GitHub run: | diff --git a/examples/generate_notebooks.py b/examples/generate_notebooks.py index a1a8fa3..d74f35c 100644 --- a/examples/generate_notebooks.py +++ b/examples/generate_notebooks.py @@ -3,10 +3,15 @@ parser = argparse.ArgumentParser(description="Generate Bempp notebooks") parser.add_argument('--run', metavar="run", default="true") +parser.add_argument('--skip', metavar="skip", default="") args = parser.parse_args() assert args.run in ["true", "false"] run_notebooks = (args.run == "true") +if args.skip == "": + skip = [] +else: + skip = args.skip.split(",") # Get all the examples in each folder notebook_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), "notebooks") @@ -44,11 +49,7 @@ assert os.system(f"jupytext --to ipynb {file_copy}") == 0 assert os.system(f"rm {file_copy}") == 0 - # Skip examples that use fmm or legacy FEniCS - if run_notebooks and i[:-3] not in [ - "dirichlet_weak_imposition", - "simple_helmholtz_fem_bem_coupling_dolfin", - ]: + if run_notebooks and i[:-3] not in skip: assert os.system( "jupyter nbconvert --execute --to notebook --inplace " + os.path.join(path, f"convert-{i[:-3]}.ipynb")