Skip to content

Commit

Permalink
Merge branch 'remove_jupyter_notebooks' into 'master'
Browse files Browse the repository at this point in the history
Remove remaining jupyter notebooks

See merge request ogs/ogs!5168
  • Loading branch information
bilke committed Jan 7, 2025
2 parents b3350d9 + 8009dbc commit cd5f09b
Show file tree
Hide file tree
Showing 17 changed files with 1,058 additions and 2,283 deletions.
2 changes: 1 addition & 1 deletion ProcessLib/ComponentTransport/Tests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ endif()

if(NOT OGS_USE_PETSC AND NOT WIN32)
NotebookTest(
NOTEBOOKFILE Parabolic/ComponentTransport/ReactiveTransport/DecayChain/GlobalImplicitApproach/performance_measurements.ipynb
NOTEBOOKFILE Parabolic/ComponentTransport/ReactiveTransport/DecayChain/GlobalImplicitApproach/performance_measurements.py
RUNTIME 200
SKIP_WEB
)
Expand Down
2 changes: 1 addition & 1 deletion ProcessLib/SteadyStateDiffusion/Tests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,7 @@ if(OGS_USE_MPI)
NotebookTest(NOTEBOOKFILE Notebooks/SimplePETSc.py RUNTIME 10)
else()
NotebookTest(
NOTEBOOKFILE Elliptic/cube_1x1x1_SteadyStateDiffusion/ssd-cube.ipynb
NOTEBOOKFILE Elliptic/cube_1x1x1_SteadyStateDiffusion/ssd-cube.py
RUNTIME 6
)
endif()
Expand Down
118 changes: 0 additions & 118 deletions Tests/Data/Elliptic/cube_1x1x1_SteadyStateDiffusion/ssd-cube.ipynb

This file was deleted.

60 changes: 60 additions & 0 deletions Tests/Data/Elliptic/cube_1x1x1_SteadyStateDiffusion/ssd-cube.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# ---
# jupyter:
# jupytext:
# text_representation:
# extension: .py
# format_name: percent
# format_version: '1.3'
# jupytext_version: 1.14.5
# kernelspec:
# display_name: Python 3 (ipykernel)
# language: python
# name: python3
# ---

# %% [raw]
# +++
# title = "SteadyStateDiffusion Cube Test"
# date = "2021-11-09"
# author = "Lars Bilke"
# web_subsection = "elliptic"
# draft = true
# +++
#

# %% [markdown]
# This notebook is just for testing and does not show up on the web page because `draft = true` in the metadata.

# %%
import os
from pathlib import Path

import pyvista as pv

# %%
# On CI out_dir is set to the notebooks directory inside the build directory
# similar to regular benchmark tests. On local testing it will output to the
# notebooks source directory under a _out-subdirectory.
out_dir = Path(os.environ.get("OGS_TESTRUNNER_OUT_DIR", "_out"))
if not out_dir.exists():
out_dir.mkdir(parents=True)

if "CI" in os.environ:
pv.set_jupyter_backend("static")
else:
pv.set_jupyter_backend("client")


# %%
resolution = "2e4"
# ! ogs cube_{resolution}.prj -o {out_dir} > {out_dir}/log.txt


# %%
reader = pv.get_reader(f"{out_dir}/cube_{resolution}.pvd")
reader.set_active_time_value(1.0) # go to 1 s
mesh = reader.read()[0]

plotter = pv.Plotter(notebook=True)
plotter.add_mesh(mesh, scalars="v") # pressure
plotter.show()
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# display_name: Python 3 (ipykernel)
# language: python
# name: python3
# note: 'TODO: remove after 6.5.4 release: ci skip'
# ---

# %% [raw]
Expand Down
Loading

0 comments on commit cd5f09b

Please sign in to comment.