Skip to content

Commit 5aa3cfa

Browse files
authored
Merge pull request #112 from finsberg/code-autolink
Code autolink
2 parents a306f44 + f3b3a6e commit 5aa3cfa

11 files changed

Lines changed: 31 additions & 22 deletions

.github/workflows/build_docs.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ jobs:
1818
container: ghcr.io/fenics/dolfinx/lab:v0.9.0
1919
env:
2020
PUBLISH_DIR: ./_build/html
21-
DISPLAY: ":99.0"
22-
PYVISTA_TRAME_SERVER_PROXY_PREFIX: "/proxy/"
23-
PYVISTA_TRAME_SERVER_PROXY_ENABLED: "True"
2421
PYVISTA_OFF_SCREEN: false
2522
PYVISTA_JUPYTER_BACKEND: "html"
2623

@@ -29,10 +26,13 @@ jobs:
2926
uses: actions/checkout@v5
3027

3128
- name: Install dependencies for pyvista
32-
run: apt-get update && apt-get install -y libgl1-mesa-dev xvfb
29+
run: apt-get update && apt-get install -y libxrender1
3330

3431
- name: Install dependencies
35-
run: python3 -m pip install ".[docs]"
32+
run: |
33+
python3 -m pip install -r https://raw.githubusercontent.com/scientificcomputing/scifem/refs/heads/main/build-requirements.txt
34+
python3 -m pip install scifem --no-build-isolation
35+
python3 -m pip install ".[docs]"
3636
3737
- name: Build docs
3838
run: jupyter book build -W --keep-going .

.github/workflows/test_package_coverage.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,9 @@ jobs:
2424
steps:
2525
- uses: actions/checkout@v5
2626

27-
- name: Install development version of scifem
28-
if : ${{ matrix.container == 'ghcr.io/fenics/dolfinx/dolfinx:nightly' }}
29-
run: |
30-
python3 -m pip install git+https://github.com/scientificcomputing/scifem.git --no-build-isolation
31-
3227
- name: Install package
3328
run: |
29+
python3 -m pip install -r https://raw.githubusercontent.com/scientificcomputing/scifem/refs/heads/main/build-requirements.txt
3430
python3 -m pip install scifem --no-build-isolation
3531
python3 -m pip install .[test]
3632

_config.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,29 @@ sphinx:
4040
- fmt: py
4141

4242
suppress_warnings: ["mystnb.unknown_mime_type", "bibtex.duplicate_citation"]
43-
html_js_files:
44-
- https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js
43+
codeautolink_concat_default: True
44+
intersphinx_mapping:
45+
basix : ["https://docs.fenicsproject.org/basix/main/python/", null]
46+
ffcx : ["https://docs.fenicsproject.org/ffcx/main/", null]
47+
ufl : ["https://docs.fenicsproject.org/ufl/main/", null]
48+
dolfinx : ["https://docs.fenicsproject.org/dolfinx/main/python", null]
49+
petsc4py: ["https://petsc.org/release/petsc4py", null]
50+
mpi4py: ["https://mpi4py.readthedocs.io/en/stable", null]
51+
numpy: ["https://numpy.org/doc/stable/", null]
52+
matplotlib: ["https://matplotlib.org/stable/", null]
53+
pyvista: ["https://docs.pyvista.org/", null]
54+
packaging: ["https://packaging.pypa.io/en/stable/", null]
55+
gotranx: ["https://finsberg.github.io/gotranx/", null]
56+
cardiac_geometries: ["https://computationalphysiology.github.io/cardiac-geometriesx/", null]
57+
58+
4559
extra_extensions:
4660
- 'sphinx.ext.autodoc'
4761
- 'sphinx.ext.napoleon'
4862
- 'sphinx.ext.viewcode'
4963
- 'sphinxcontrib.bibtex'
64+
- 'sphinx_copybutton'
65+
- 'sphinx_codeautolink'
66+
- 'sphinx.ext.intersphinx'
5067

5168
exclude_patterns: [".pytest_cache/*", ".github/*", ".tox/*", "third_party/*"]

demo/benchmark/problem1.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ def dirichlet_bc(
125125
except ImportError:
126126
print("Pyvista is not installed")
127127
else:
128-
pyvista.start_xvfb()
129128
V = dolfinx.fem.functionspace(mesh, ("Lagrange", 1, (mesh.geometry.dim,)))
130129
uh = dolfinx.fem.Function(V)
131130
uh.interpolate(problem.u)

demo/benchmark/problem2.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@
155155
except ImportError:
156156
print("Pyvista is not installed")
157157
else:
158-
pyvista.start_xvfb()
159158
V = dolfinx.fem.functionspace(geometry.mesh, ("Lagrange", 1, (geometry.mesh.geometry.dim,)))
160159
uh = dolfinx.fem.Function(V)
161160
uh.interpolate(problem.u)

demo/benchmark/problem3.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@
129129
except ImportError:
130130
print("Pyvista is not installed")
131131
else:
132-
pyvista.start_xvfb()
133132
V = dolfinx.fem.functionspace(geometry.mesh, ("Lagrange", 1, (geometry.mesh.geometry.dim,)))
134133
uh = dolfinx.fem.Function(V)
135134
uh.interpolate(problem.u)

demo/biv_ellipsoid.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@
127127
except ImportError:
128128
print("Pyvista is not installed")
129129
else:
130-
pyvista.start_xvfb()
131130
V = dolfinx.fem.functionspace(geometry.mesh, ("Lagrange", 1, (geometry.mesh.geometry.dim,)))
132131
uh = dolfinx.fem.Function(V)
133132
uh.interpolate(problem.u)

demo/lv_ellipsoid.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@
9595
except ImportError:
9696
print("Pyvista is not installed")
9797
else:
98-
pyvista.start_xvfb()
9998
V = dolfinx.fem.functionspace(geometry.mesh, ("Lagrange", 1, (geometry.mesh.geometry.dim,)))
10099
uh = dolfinx.fem.Function(V)
101100
uh.interpolate(problem.u)

demo/time_dependent_land_circ_biv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
material=material,
7373
active=active_model,
7474
compressibility=comp_model,
75-
viscoelasticity=viscoeleastic_model,
75+
# viscoelasticity=viscoeleastic_model,
7676
)
7777

7878
alpha_epi = pulse.Variable(

demo/unit_cube.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,6 @@ def dirichlet_bc(
122122
except ImportError:
123123
print("Pyvista is not installed")
124124
else:
125-
126-
pyvista.start_xvfb()
127-
128125
# Create plotter and pyvista grid
129126
p = pyvista.Plotter()
130127

0 commit comments

Comments
 (0)