diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 274b77936..7fc3a85d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: shell: bash -l {0} run: | # conda upgrade --strict-channel-priority -c conda-forge --all - conda install -c conda-forge fenics numpy=1.24 "python>=3.10" + conda install -c conda-forge fenics numpy=1.24 "python>=3.10" "setuptools<82" - name: Install dependencies shell: bash -l {0} diff --git a/.github/workflows/doctest.yml b/.github/workflows/doctest.yml index bfc2b2d44..cb5de018c 100644 --- a/.github/workflows/doctest.yml +++ b/.github/workflows/doctest.yml @@ -16,6 +16,33 @@ jobs: activate-environment: festim-docs environment-file: docs/environment.yml + - name: urls-checker + uses: urlstechie/urlchecker-action@master + with: + # A subfolder or path to navigate to in the present or cloned repository + subfolder: docs + + # A comma-separated list of file types to cover in the URL checks + file_types: .md,.py,.rst + + # Choose whether to include file with no URLs in the prints. + print_all: false + + # The timeout seconds to provide to requests, defaults to 5 seconds + timeout: 5 + + # How many times to retry a failed request (each is logged, defaults to 1) + retry_count: 3 + + # A comma separated links to exclude during URL checks + exclude_urls: https://www.lspm.cnrs.fr/en/home/,https://www.theses.fr/2022PA131054 + + # A comma separated patterns to exclude during URL checks + exclude_patterns: + + # choose if the force pass or not + force_pass : false + - name: Doc Tests shell: bash -l {0} - run: sphinx-build -b doctest docs/source docs/_build/doctest \ No newline at end of file + run: sphinx-build -b doctest docs/source docs/_build/doctest diff --git a/docs/environment.yml b/docs/environment.yml index d0a4eb0fc..a1655b2eb 100644 --- a/docs/environment.yml +++ b/docs/environment.yml @@ -3,6 +3,8 @@ channels: - conda-forge - defaults dependencies: + - setuptools<82 + - wheel<0.45 - fenics - python>=3.10 - matplotlib==3.7.1 @@ -16,4 +18,3 @@ dependencies: - sphinxcontrib-bibtex - sphinx-copybutton - pillow - - sphinxcontrib-images diff --git a/docs/source/conf.py b/docs/source/conf.py index fe8374bf0..8d3f57f0d 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -59,7 +59,6 @@ "sphinx_design", "sphinxcontrib.bibtex", "matplotlib.sphinxext.plot_directive", - "sphinxcontrib.images", ] suppress_warnings = ["autosectionlabel.*"] diff --git a/docs/source/theory.rst b/docs/source/theory.rst index 0f3ac2f63..2b364b173 100644 --- a/docs/source/theory.rst +++ b/docs/source/theory.rst @@ -299,7 +299,7 @@ introducing hydrogen surface species :math:`c_\mathrm{s}\,[\mathrm{m}^{-2}]`. Evolution of hydrogen surface concentration is determined by the atomic flux balance at the surface, as sketched in the simplified energy diagram below. -.. thumbnail:: images/potential_diagram.png +.. figure:: images/potential_diagram.png :align: center :width: 800 diff --git a/docs/source/userguide/beginners_guide.rst b/docs/source/userguide/beginners_guide.rst index df459aa9a..21dddd010 100644 --- a/docs/source/userguide/beginners_guide.rst +++ b/docs/source/userguide/beginners_guide.rst @@ -31,7 +31,7 @@ Your first FESTIM script ------------------------ -Follow `this tutorial `_ to learn how +Follow `this tutorial `_ to learn how to run a simple 1D diffusion problem in steady state with an homogeneous temperature, a volumetric source of hydrogen, and the concentration fixed at zero at boundaries. diff --git a/docs/source/userguide/export_post_processing.rst b/docs/source/userguide/export_post_processing.rst index 6a4004507..c5446b6e7 100644 --- a/docs/source/userguide/export_post_processing.rst +++ b/docs/source/userguide/export_post_processing.rst @@ -70,13 +70,13 @@ The file can then be opened in Paraview or any other software that can read XDMF - Open the XDMF file then select the reader Xdmf3 Reader S -.. thumbnail:: ../images/paraview_guide_1.png +.. figure:: ../images/paraview_guide_1.png :width: 400 :align: center - Edit the colour map and rescale the colourbar to present the proper view of results -.. thumbnail:: ../images/paraview_guide_2.png +.. figure:: ../images/paraview_guide_2.png :width: 400 :align: center diff --git a/docs/source/userguide/mesh.rst b/docs/source/userguide/mesh.rst index 8d106a9ea..61f1eefd0 100644 --- a/docs/source/userguide/mesh.rst +++ b/docs/source/userguide/mesh.rst @@ -79,7 +79,7 @@ The following is a workflow using the python API to make a mesh that can be dire Here we will walk through GMSH's usage when creating a monoblock subsection consisting of tungsten surrounding a tube of CuCrZr -.. thumbnail:: ../images/gmsh_tut_1.png +.. figure:: ../images/gmsh_tut_1.png :width: 400 :align: center @@ -205,7 +205,7 @@ At any point, the GMSH GUI can be opened by running the line after synchronizing the model. Running this command at this stage will open the GUI, displaying something that looks like this: -.. thumbnail:: ../images/gmsh_tut_2.png +.. figure:: ../images/gmsh_tut_2.png :width: 400 :align: center @@ -226,13 +226,13 @@ GMSH assigns the surface labels cyclically when performing the extrusion, so the After opening the GUI, again after synchronising and using `gmsh.fltk.run()`, go into 'Tools' then 'Options', and ensure that 'Surfaces' is checked under 'Geometry'. This will make the surfaces are visible and selectable in the visualisation. -.. thumbnail:: ../images/gmsh_tut_3.png +.. figure:: ../images/gmsh_tut_3.png :width: 400 :align: center We can then hover our mouse over each surface to see its information. For example, we can see that the front tungsten surface is defined as Plane 7, and borders the volume 1. -.. thumbnail:: ../images/gmsh_tut_4.png +.. figure:: ../images/gmsh_tut_4.png :width: 400 :align: center @@ -379,7 +379,7 @@ A FESTIM simulation can then be run: This produces the following visualisation in Paraview: -.. thumbnail:: ../images/gmsh_tut_5.png +.. figure:: ../images/gmsh_tut_5.png :width: 400 :align: center @@ -395,13 +395,13 @@ Building the geometry in SALOME 1. Open SALOME and create a new study. 2. Activate the Geometry module -.. thumbnail:: ../images/salome_guide_1.png +.. figure:: ../images/salome_guide_1.png :width: 400 :align: center 3. Create a first square by clicking "Create rectangular face". Keep the default parameters. Click "Apply and Close" -.. thumbnail:: ../images/salome_guide_2.png +.. figure:: ../images/salome_guide_2.png :width: 400 :align: center @@ -409,26 +409,26 @@ Building the geometry in SALOME 5. Translate the second square by clicking "Operations/Transformation/Translation" -.. thumbnail:: ../images/salome_guide_3.png +.. figure:: ../images/salome_guide_3.png :width: 400 :align: center 6. Make sure Face 2 is selected. Enter 100 for the Dx value. Click "Apply and Close" -.. thumbnail:: ../images/salome_guide_4.png +.. figure:: ../images/salome_guide_4.png :width: 400 :align: center 7. Create a compound by clicking "New Entity/Build/Compound" make sure Face_1 and Translation_1 are selected then click "Apply and Close". -.. thumbnail:: ../images/salome_guide_5.png +.. figure:: ../images/salome_guide_5.png :width: 400 :align: center 8. Create a group "New Entity/Group/Create group". In Shape Type, select the 2D surface. Name the group "left_volume". Make sure Compound_1 is selected. Click on the left square and click "Add" (2 should appear in the white window). Click "Apply and Close". -.. thumbnail:: ../images/salome_guide_6.png +.. figure:: ../images/salome_guide_6.png :width: 400 :align: center @@ -436,19 +436,19 @@ Click on the left square and click "Add" (2 should appear in the white window). 10. Create another group "left_boundary" but this time in Shape Type select the 1D curve. Click on the left edge of the left square and click "Add". Click "Apply and Close". -.. thumbnail:: ../images/salome_guide_7.png +.. figure:: ../images/salome_guide_7.png :width: 400 :align: center 11. Repeat the operation to create a group "right_boundary" with the right edge of the right square. Your study should look like: -.. thumbnail:: ../images/salome_guide_8.png +.. figure:: ../images/salome_guide_8.png :width: 400 :align: center 12. Click on "Mesh" to activate the mesh module. -.. thumbnail:: ../images/salome_guide_9.png +.. figure:: ../images/salome_guide_9.png :width: 400 :align: center @@ -456,13 +456,13 @@ Click on the left square and click "Add" (2 should appear in the white window). 14. Make sure Compound_1 is selected in "Geometry". Under the 2D tab, select "NETGEN 1D-2D" as algorithm. -.. thumbnail:: ../images/salome_guide_10.png +.. figure:: ../images/salome_guide_10.png :width: 400 :align: center 15. Next to "Hypothesis" click on the gear symbol. Select "NETGEN 2D Simple Parameters". Click Ok. Click "Apply and Close". -.. thumbnail:: ../images/salome_guide_11.png +.. figure:: ../images/salome_guide_11.png :width: 400 :align: center @@ -470,7 +470,7 @@ Click on the left square and click "Add" (2 should appear in the white window). 16. Export the mesh to MED by right clicking on Mesh_1 in the Object Browser, then Export/MED file. Choose a location where you want to write your MED file and click Save. -.. thumbnail:: ../images/salome_guide_12.png +.. figure:: ../images/salome_guide_12.png :width: 400 :align: center @@ -548,7 +548,7 @@ Here, the left volume is tagged with ID 6, the right boundary is tagged with ID 18. Inspect the produced XDMF files with Paraview using the XDMF3 S reader. The file mesh_domains.xdmf should look like: -.. thumbnail:: ../images/salome_guide_13.png +.. figure:: ../images/salome_guide_13.png :width: 400 :align: center @@ -587,7 +587,7 @@ Here, the left volume is tagged with ID 6, the right boundary is tagged with ID 20. The simulation should run without errors. The solute field can be visualised with Paraview. -.. thumbnail:: ../images/salome_guide_14.png +.. figure:: ../images/salome_guide_14.png :width: 400 :align: center @@ -600,13 +600,13 @@ If you have a CAD model, you can export it to a mesh with SALOME. 2. Activate the Geometry module 3. Import STEP file by clicking "File/Import/STEP" -.. thumbnail:: ../images/salome_guide_cad_1.png +.. figure:: ../images/salome_guide_cad_1.png :width: 400 :align: center 4. By clicking "Fit to selection" you can see the imported geometry: -.. thumbnail:: ../images/salome_guide_cad_2.png +.. figure:: ../images/salome_guide_cad_2.png :width: 400 :align: center @@ -620,6 +620,6 @@ If you have a CAD model, you can export it to a mesh with SALOME. Meshes from FEniCS ------------------ -See the `FEniCS documentation `_ for more built-in meshes. +See the `FEniCS documentation `_ for more built-in meshes. diff --git a/docs/source/userguide/sources.rst b/docs/source/userguide/sources.rst index be91970dc..068ce399d 100644 --- a/docs/source/userguide/sources.rst +++ b/docs/source/userguide/sources.rst @@ -43,7 +43,7 @@ Hydrogen implanted in a material can be simulated by a Gaussian-shaped volumetri ), ] -This class is used in `this tutorial `_. +This class is used in `this tutorial `_. Radioactive decay