From 5f1b401c8e0ec9512d5c2f5331e33a6048c583df Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Fri, 17 Mar 2023 16:12:23 +0000 Subject: [PATCH 01/12] Docs: Don't hardcode version --- docs/conf.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 22a5480..5d23b1f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -19,6 +19,8 @@ import os import sys +from importlib.metadata import version as get_version + sys.path.insert(0, os.path.abspath("..")) from unittest.mock import MagicMock @@ -70,10 +72,10 @@ def __getattr__(cls, name): # |version| and |release|, also used in various other places throughout the # built documents. # -# The short X.Y version. -version = u"0.2" -# The full version, including alpha/beta/rc tags. -release = u"0.2.0" +# The full version, including alpha/beta/rc tags +release = get_version(project) +# Major.minor version +version = ".".join(release.split(".")[:2]) # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. From fa1b44ba75c8e60b84be93faf55276b61d6419bc Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Fri, 17 Mar 2023 16:12:41 +0000 Subject: [PATCH 02/12] Apply black formatting --- docs/conf.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 5d23b1f..bafca13 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -64,9 +64,9 @@ def __getattr__(cls, name): master_doc = "index" # General information about the project. -project = u"FreeGS" -copyright = u"2017-2019, Ben Dudson" -author = u"Ben Dudson" +project = "FreeGS" +copyright = "2017-2019, Ben Dudson" +author = "Ben Dudson" # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -142,7 +142,7 @@ def __getattr__(cls, name): # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, "FreeGS.tex", u"FreeGS Documentation", u"Ben Dudson", "manual"), + (master_doc, "FreeGS.tex", "FreeGS Documentation", "Ben Dudson", "manual"), ] @@ -150,7 +150,7 @@ def __getattr__(cls, name): # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). -man_pages = [(master_doc, "freegs", u"FreeGS Documentation", [author], 1)] +man_pages = [(master_doc, "freegs", "FreeGS Documentation", [author], 1)] # -- Options for Texinfo output ------------------------------------------- @@ -162,7 +162,7 @@ def __getattr__(cls, name): ( master_doc, "FreeGS", - u"FreeGS Documentation", + "FreeGS Documentation", author, "FreeGS", "One line description of project.", From 06cb7290c89ce10d7b81ff6743433b783e069f5f Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Fri, 17 Mar 2023 16:12:58 +0000 Subject: [PATCH 03/12] Docs: update copyright year --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index bafca13..e5177a6 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -65,7 +65,7 @@ def __getattr__(cls, name): # General information about the project. project = "FreeGS" -copyright = "2017-2019, Ben Dudson" +copyright = "2017-2023, Ben Dudson" author = "Ben Dudson" # The version info for the project you're documenting, acts as replacement for From 8114f2e758126cbbb7ddadf0741da5225621c0f7 Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Fri, 17 Mar 2023 16:18:55 +0000 Subject: [PATCH 04/12] Docs: Fix some malformed link targets --- docs/creating_equilibria.rst | 4 ++-- docs/diagnostics.rst | 4 ++-- docs/optimisation.rst | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/creating_equilibria.rst b/docs/creating_equilibria.rst index e3b97ed..32b1ec7 100644 --- a/docs/creating_equilibria.rst +++ b/docs/creating_equilibria.rst @@ -1,4 +1,4 @@ -.. _creating_equilibria +.. _creating_equilibria: Creating equilibria =================== @@ -433,7 +433,7 @@ The total toroidal plasma current is calculated by integrating the toroidal curr The integrals in these two constraints are done numerically, and then rearranged to get :math:`L` and :math:`\beta_0`. -.. _constrain_betap_ip +.. _constrain_betap_ip: Constrain poloidal beta and current ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/diagnostics.rst b/docs/diagnostics.rst index b92d5ae..fc040e3 100644 --- a/docs/diagnostics.rst +++ b/docs/diagnostics.rst @@ -1,7 +1,7 @@ Diagnostics =========== -Once an equilibrium has been generated (see creating_equilibria_) +Once an equilibrium has been generated (see :ref:`creating_equilibria`) there are routines for diagnosing and calculating derived quantities. Here the ``Equilibrium`` object is assumed to be called ``eq`` and the ``Tokamak`` object called ``tokamak``. @@ -54,7 +54,7 @@ This is calculated using the expression \beta_p = \frac{8\pi}{\mu_0} \frac{1}{I_p^2}\iint p\left(\psi\right) dRdZ -i.e. the same calculation as is done in the poloidal beta constraint constrain_betap_ip_. +i.e. the same calculation as is done in the poloidal beta constraint :ref:`constrain_betap_ip`. Plasma pressure --------------- diff --git a/docs/optimisation.rst b/docs/optimisation.rst index f305f4b..b29467a 100644 --- a/docs/optimisation.rst +++ b/docs/optimisation.rst @@ -1,4 +1,4 @@ -.. _optimisation +.. _optimisation: Optimisation ============ From bd44ff3d524044410b36e95c2f8a1326a8143576 Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Fri, 17 Mar 2023 16:19:06 +0000 Subject: [PATCH 05/12] Docs: Fix block indenting --- docs/creating_equilibria.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/creating_equilibria.rst b/docs/creating_equilibria.rst index 32b1ec7..478bd1a 100644 --- a/docs/creating_equilibria.rst +++ b/docs/creating_equilibria.rst @@ -240,7 +240,7 @@ it will take a measurement when ``takeMeasurement`` method of machine is called. A list of sensors can be specified when creating a machine:: -tokamak = freegs.machine.Machine(coils, wall, sensors) + tokamak = freegs.machine.Machine(coils, wall, sensors) Rogowski Sensors From e79c2a98616a0d5add71235a9da52eb831740e51 Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Fri, 17 Mar 2023 16:19:14 +0000 Subject: [PATCH 06/12] Docs: Remove some commented out text --- docs/index.rst | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 12fd989..bdcbef5 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -18,10 +18,6 @@ Welcome to FreeGS's documentation! .. automodule:: freegs -#.. automodule:: freegs.equilibrium -# :members: - - Indices and tables ------------------ From 80a7ca62fe62d9b955ace83320db41df19c9c2d4 Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Fri, 17 Mar 2023 16:23:58 +0000 Subject: [PATCH 07/12] Docs: Mock some more imports --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index e5177a6..8ca7bdc 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -32,7 +32,7 @@ def __getattr__(cls, name): return MagicMock() -MOCK_MODULES = ["_tkinter"] +MOCK_MODULES = ["_tkinter", "shapely", "shapely.geometry", "shapely.geometry.polygon"] sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES) # -- General configuration ------------------------------------------------ From f9d2ef154321a323480c742718ff70b60d2fd1a0 Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Fri, 17 Mar 2023 16:24:17 +0000 Subject: [PATCH 08/12] Docs: set language to English --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 8ca7bdc..6f182a9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -82,7 +82,7 @@ def __getattr__(cls, name): # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = None +language = "en" # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. From e1409843d142f558860866690d753861a3ec94ff Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Fri, 17 Mar 2023 16:29:45 +0000 Subject: [PATCH 09/12] Docs: Add API reference --- docs/api/freegs.boundary.rst | 7 ++++ docs/api/freegs.coil.rst | 7 ++++ docs/api/freegs.control.rst | 7 ++++ docs/api/freegs.critical.rst | 7 ++++ docs/api/freegs.divgeo.rst | 7 ++++ docs/api/freegs.dump.rst | 7 ++++ docs/api/freegs.equilibrium.rst | 7 ++++ docs/api/freegs.fieldtracer.rst | 7 ++++ docs/api/freegs.filament_coil.rst | 7 ++++ docs/api/freegs.geqdsk.rst | 7 ++++ docs/api/freegs.gradshafranov.rst | 7 ++++ docs/api/freegs.jtor.rst | 7 ++++ docs/api/freegs.machine.rst | 7 ++++ docs/api/freegs.multi_coil.rst | 7 ++++ docs/api/freegs.multigrid.rst | 7 ++++ docs/api/freegs.optimise.rst | 7 ++++ docs/api/freegs.optimiser.rst | 7 ++++ docs/api/freegs.picard.rst | 7 ++++ docs/api/freegs.plotting.rst | 7 ++++ docs/api/freegs.polygons.rst | 7 ++++ docs/api/freegs.pre_calc_coil.rst | 7 ++++ docs/api/freegs.quadrature.rst | 7 ++++ docs/api/freegs.rst | 50 ++++++++++++++++++++++++++ docs/api/freegs.shaped_coil.rst | 7 ++++ docs/api/freegs.test_critical.rst | 7 ++++ docs/api/freegs.test_equilibrium.rst | 7 ++++ docs/api/freegs.test_filament_coil.rst | 7 ++++ docs/api/freegs.test_jtor.rst | 7 ++++ docs/api/freegs.test_linearsolve.rst | 7 ++++ docs/api/freegs.test_machine.rst | 7 ++++ docs/api/freegs.test_optimise.rst | 7 ++++ docs/api/freegs.test_optimiser.rst | 7 ++++ docs/api/freegs.test_polygons.rst | 7 ++++ docs/api/freegs.test_quadrature.rst | 7 ++++ docs/api/freegs.test_readwrite.rst | 7 ++++ docs/api/freegs.test_sensors.rst | 7 ++++ docs/api/freegs.test_shaped_coil.rst | 7 ++++ docs/api/modules.rst | 7 ++++ docs/index.rst | 8 +++-- 39 files changed, 315 insertions(+), 2 deletions(-) create mode 100644 docs/api/freegs.boundary.rst create mode 100644 docs/api/freegs.coil.rst create mode 100644 docs/api/freegs.control.rst create mode 100644 docs/api/freegs.critical.rst create mode 100644 docs/api/freegs.divgeo.rst create mode 100644 docs/api/freegs.dump.rst create mode 100644 docs/api/freegs.equilibrium.rst create mode 100644 docs/api/freegs.fieldtracer.rst create mode 100644 docs/api/freegs.filament_coil.rst create mode 100644 docs/api/freegs.geqdsk.rst create mode 100644 docs/api/freegs.gradshafranov.rst create mode 100644 docs/api/freegs.jtor.rst create mode 100644 docs/api/freegs.machine.rst create mode 100644 docs/api/freegs.multi_coil.rst create mode 100644 docs/api/freegs.multigrid.rst create mode 100644 docs/api/freegs.optimise.rst create mode 100644 docs/api/freegs.optimiser.rst create mode 100644 docs/api/freegs.picard.rst create mode 100644 docs/api/freegs.plotting.rst create mode 100644 docs/api/freegs.polygons.rst create mode 100644 docs/api/freegs.pre_calc_coil.rst create mode 100644 docs/api/freegs.quadrature.rst create mode 100644 docs/api/freegs.rst create mode 100644 docs/api/freegs.shaped_coil.rst create mode 100644 docs/api/freegs.test_critical.rst create mode 100644 docs/api/freegs.test_equilibrium.rst create mode 100644 docs/api/freegs.test_filament_coil.rst create mode 100644 docs/api/freegs.test_jtor.rst create mode 100644 docs/api/freegs.test_linearsolve.rst create mode 100644 docs/api/freegs.test_machine.rst create mode 100644 docs/api/freegs.test_optimise.rst create mode 100644 docs/api/freegs.test_optimiser.rst create mode 100644 docs/api/freegs.test_polygons.rst create mode 100644 docs/api/freegs.test_quadrature.rst create mode 100644 docs/api/freegs.test_readwrite.rst create mode 100644 docs/api/freegs.test_sensors.rst create mode 100644 docs/api/freegs.test_shaped_coil.rst create mode 100644 docs/api/modules.rst diff --git a/docs/api/freegs.boundary.rst b/docs/api/freegs.boundary.rst new file mode 100644 index 0000000..0c01c13 --- /dev/null +++ b/docs/api/freegs.boundary.rst @@ -0,0 +1,7 @@ +freegs.boundary module +====================== + +.. automodule:: freegs.boundary + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/freegs.coil.rst b/docs/api/freegs.coil.rst new file mode 100644 index 0000000..eb6a478 --- /dev/null +++ b/docs/api/freegs.coil.rst @@ -0,0 +1,7 @@ +freegs.coil module +================== + +.. automodule:: freegs.coil + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/freegs.control.rst b/docs/api/freegs.control.rst new file mode 100644 index 0000000..ca3b2dc --- /dev/null +++ b/docs/api/freegs.control.rst @@ -0,0 +1,7 @@ +freegs.control module +===================== + +.. automodule:: freegs.control + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/freegs.critical.rst b/docs/api/freegs.critical.rst new file mode 100644 index 0000000..c7bd0eb --- /dev/null +++ b/docs/api/freegs.critical.rst @@ -0,0 +1,7 @@ +freegs.critical module +====================== + +.. automodule:: freegs.critical + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/freegs.divgeo.rst b/docs/api/freegs.divgeo.rst new file mode 100644 index 0000000..db3624b --- /dev/null +++ b/docs/api/freegs.divgeo.rst @@ -0,0 +1,7 @@ +freegs.divgeo module +==================== + +.. automodule:: freegs.divgeo + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/freegs.dump.rst b/docs/api/freegs.dump.rst new file mode 100644 index 0000000..2c75ac5 --- /dev/null +++ b/docs/api/freegs.dump.rst @@ -0,0 +1,7 @@ +freegs.dump module +================== + +.. automodule:: freegs.dump + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/freegs.equilibrium.rst b/docs/api/freegs.equilibrium.rst new file mode 100644 index 0000000..3974ae8 --- /dev/null +++ b/docs/api/freegs.equilibrium.rst @@ -0,0 +1,7 @@ +freegs.equilibrium module +========================= + +.. automodule:: freegs.equilibrium + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/freegs.fieldtracer.rst b/docs/api/freegs.fieldtracer.rst new file mode 100644 index 0000000..4af6444 --- /dev/null +++ b/docs/api/freegs.fieldtracer.rst @@ -0,0 +1,7 @@ +freegs.fieldtracer module +========================= + +.. automodule:: freegs.fieldtracer + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/freegs.filament_coil.rst b/docs/api/freegs.filament_coil.rst new file mode 100644 index 0000000..c34add8 --- /dev/null +++ b/docs/api/freegs.filament_coil.rst @@ -0,0 +1,7 @@ +freegs.filament\_coil module +============================ + +.. automodule:: freegs.filament_coil + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/freegs.geqdsk.rst b/docs/api/freegs.geqdsk.rst new file mode 100644 index 0000000..a8ddb1a --- /dev/null +++ b/docs/api/freegs.geqdsk.rst @@ -0,0 +1,7 @@ +freegs.geqdsk module +==================== + +.. automodule:: freegs.geqdsk + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/freegs.gradshafranov.rst b/docs/api/freegs.gradshafranov.rst new file mode 100644 index 0000000..cd1422f --- /dev/null +++ b/docs/api/freegs.gradshafranov.rst @@ -0,0 +1,7 @@ +freegs.gradshafranov module +=========================== + +.. automodule:: freegs.gradshafranov + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/freegs.jtor.rst b/docs/api/freegs.jtor.rst new file mode 100644 index 0000000..c5929c4 --- /dev/null +++ b/docs/api/freegs.jtor.rst @@ -0,0 +1,7 @@ +freegs.jtor module +================== + +.. automodule:: freegs.jtor + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/freegs.machine.rst b/docs/api/freegs.machine.rst new file mode 100644 index 0000000..d91d254 --- /dev/null +++ b/docs/api/freegs.machine.rst @@ -0,0 +1,7 @@ +freegs.machine module +===================== + +.. automodule:: freegs.machine + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/freegs.multi_coil.rst b/docs/api/freegs.multi_coil.rst new file mode 100644 index 0000000..2d9596c --- /dev/null +++ b/docs/api/freegs.multi_coil.rst @@ -0,0 +1,7 @@ +freegs.multi\_coil module +========================= + +.. automodule:: freegs.multi_coil + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/freegs.multigrid.rst b/docs/api/freegs.multigrid.rst new file mode 100644 index 0000000..2cd14df --- /dev/null +++ b/docs/api/freegs.multigrid.rst @@ -0,0 +1,7 @@ +freegs.multigrid module +======================= + +.. automodule:: freegs.multigrid + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/freegs.optimise.rst b/docs/api/freegs.optimise.rst new file mode 100644 index 0000000..c7e758e --- /dev/null +++ b/docs/api/freegs.optimise.rst @@ -0,0 +1,7 @@ +freegs.optimise module +====================== + +.. automodule:: freegs.optimise + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/freegs.optimiser.rst b/docs/api/freegs.optimiser.rst new file mode 100644 index 0000000..aee1d6c --- /dev/null +++ b/docs/api/freegs.optimiser.rst @@ -0,0 +1,7 @@ +freegs.optimiser module +======================= + +.. automodule:: freegs.optimiser + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/freegs.picard.rst b/docs/api/freegs.picard.rst new file mode 100644 index 0000000..976b0ab --- /dev/null +++ b/docs/api/freegs.picard.rst @@ -0,0 +1,7 @@ +freegs.picard module +==================== + +.. automodule:: freegs.picard + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/freegs.plotting.rst b/docs/api/freegs.plotting.rst new file mode 100644 index 0000000..e8240d0 --- /dev/null +++ b/docs/api/freegs.plotting.rst @@ -0,0 +1,7 @@ +freegs.plotting module +====================== + +.. automodule:: freegs.plotting + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/freegs.polygons.rst b/docs/api/freegs.polygons.rst new file mode 100644 index 0000000..df04f73 --- /dev/null +++ b/docs/api/freegs.polygons.rst @@ -0,0 +1,7 @@ +freegs.polygons module +====================== + +.. automodule:: freegs.polygons + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/freegs.pre_calc_coil.rst b/docs/api/freegs.pre_calc_coil.rst new file mode 100644 index 0000000..721242e --- /dev/null +++ b/docs/api/freegs.pre_calc_coil.rst @@ -0,0 +1,7 @@ +freegs.pre\_calc\_coil module +============================= + +.. automodule:: freegs.pre_calc_coil + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/freegs.quadrature.rst b/docs/api/freegs.quadrature.rst new file mode 100644 index 0000000..1181ab1 --- /dev/null +++ b/docs/api/freegs.quadrature.rst @@ -0,0 +1,7 @@ +freegs.quadrature module +======================== + +.. automodule:: freegs.quadrature + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/freegs.rst b/docs/api/freegs.rst new file mode 100644 index 0000000..24213c7 --- /dev/null +++ b/docs/api/freegs.rst @@ -0,0 +1,50 @@ +freegs package +============== + +.. automodule:: freegs + :members: + :undoc-members: + :show-inheritance: + +Submodules +---------- + +.. toctree:: + :maxdepth: 4 + + freegs.boundary + freegs.coil + freegs.control + freegs.critical + freegs.divgeo + freegs.dump + freegs.equilibrium + freegs.fieldtracer + freegs.filament_coil + freegs.geqdsk + freegs.gradshafranov + freegs.jtor + freegs.machine + freegs.multi_coil + freegs.multigrid + freegs.optimise + freegs.optimiser + freegs.picard + freegs.plotting + freegs.polygons + freegs.pre_calc_coil + freegs.quadrature + freegs.shaped_coil + freegs.test_critical + freegs.test_equilibrium + freegs.test_filament_coil + freegs.test_jtor + freegs.test_linearsolve + freegs.test_machine + freegs.test_optimise + freegs.test_optimiser + freegs.test_polygons + freegs.test_quadrature + freegs.test_readwrite + freegs.test_sensors + freegs.test_shaped_coil diff --git a/docs/api/freegs.shaped_coil.rst b/docs/api/freegs.shaped_coil.rst new file mode 100644 index 0000000..d1f0e45 --- /dev/null +++ b/docs/api/freegs.shaped_coil.rst @@ -0,0 +1,7 @@ +freegs.shaped\_coil module +========================== + +.. automodule:: freegs.shaped_coil + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/freegs.test_critical.rst b/docs/api/freegs.test_critical.rst new file mode 100644 index 0000000..f3e779a --- /dev/null +++ b/docs/api/freegs.test_critical.rst @@ -0,0 +1,7 @@ +freegs.test\_critical module +============================ + +.. automodule:: freegs.test_critical + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/freegs.test_equilibrium.rst b/docs/api/freegs.test_equilibrium.rst new file mode 100644 index 0000000..11ec666 --- /dev/null +++ b/docs/api/freegs.test_equilibrium.rst @@ -0,0 +1,7 @@ +freegs.test\_equilibrium module +=============================== + +.. automodule:: freegs.test_equilibrium + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/freegs.test_filament_coil.rst b/docs/api/freegs.test_filament_coil.rst new file mode 100644 index 0000000..3082075 --- /dev/null +++ b/docs/api/freegs.test_filament_coil.rst @@ -0,0 +1,7 @@ +freegs.test\_filament\_coil module +================================== + +.. automodule:: freegs.test_filament_coil + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/freegs.test_jtor.rst b/docs/api/freegs.test_jtor.rst new file mode 100644 index 0000000..c103f86 --- /dev/null +++ b/docs/api/freegs.test_jtor.rst @@ -0,0 +1,7 @@ +freegs.test\_jtor module +======================== + +.. automodule:: freegs.test_jtor + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/freegs.test_linearsolve.rst b/docs/api/freegs.test_linearsolve.rst new file mode 100644 index 0000000..1114446 --- /dev/null +++ b/docs/api/freegs.test_linearsolve.rst @@ -0,0 +1,7 @@ +freegs.test\_linearsolve module +=============================== + +.. automodule:: freegs.test_linearsolve + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/freegs.test_machine.rst b/docs/api/freegs.test_machine.rst new file mode 100644 index 0000000..30097e5 --- /dev/null +++ b/docs/api/freegs.test_machine.rst @@ -0,0 +1,7 @@ +freegs.test\_machine module +=========================== + +.. automodule:: freegs.test_machine + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/freegs.test_optimise.rst b/docs/api/freegs.test_optimise.rst new file mode 100644 index 0000000..b0190f5 --- /dev/null +++ b/docs/api/freegs.test_optimise.rst @@ -0,0 +1,7 @@ +freegs.test\_optimise module +============================ + +.. automodule:: freegs.test_optimise + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/freegs.test_optimiser.rst b/docs/api/freegs.test_optimiser.rst new file mode 100644 index 0000000..73f310b --- /dev/null +++ b/docs/api/freegs.test_optimiser.rst @@ -0,0 +1,7 @@ +freegs.test\_optimiser module +============================= + +.. automodule:: freegs.test_optimiser + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/freegs.test_polygons.rst b/docs/api/freegs.test_polygons.rst new file mode 100644 index 0000000..e8b5ce6 --- /dev/null +++ b/docs/api/freegs.test_polygons.rst @@ -0,0 +1,7 @@ +freegs.test\_polygons module +============================ + +.. automodule:: freegs.test_polygons + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/freegs.test_quadrature.rst b/docs/api/freegs.test_quadrature.rst new file mode 100644 index 0000000..fdba0e7 --- /dev/null +++ b/docs/api/freegs.test_quadrature.rst @@ -0,0 +1,7 @@ +freegs.test\_quadrature module +============================== + +.. automodule:: freegs.test_quadrature + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/freegs.test_readwrite.rst b/docs/api/freegs.test_readwrite.rst new file mode 100644 index 0000000..46642d4 --- /dev/null +++ b/docs/api/freegs.test_readwrite.rst @@ -0,0 +1,7 @@ +freegs.test\_readwrite module +============================= + +.. automodule:: freegs.test_readwrite + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/freegs.test_sensors.rst b/docs/api/freegs.test_sensors.rst new file mode 100644 index 0000000..7485feb --- /dev/null +++ b/docs/api/freegs.test_sensors.rst @@ -0,0 +1,7 @@ +freegs.test\_sensors module +=========================== + +.. automodule:: freegs.test_sensors + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/freegs.test_shaped_coil.rst b/docs/api/freegs.test_shaped_coil.rst new file mode 100644 index 0000000..0d5da40 --- /dev/null +++ b/docs/api/freegs.test_shaped_coil.rst @@ -0,0 +1,7 @@ +freegs.test\_shaped\_coil module +================================ + +.. automodule:: freegs.test_shaped_coil + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/modules.rst b/docs/api/modules.rst new file mode 100644 index 0000000..ec7cbea --- /dev/null +++ b/docs/api/modules.rst @@ -0,0 +1,7 @@ +freegs +====== + +.. toctree:: + :maxdepth: 4 + + freegs diff --git a/docs/index.rst b/docs/index.rst index bdcbef5..07c7fdd 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -15,8 +15,12 @@ Welcome to FreeGS's documentation! diagnostics tests optimisation - -.. automodule:: freegs + +.. toctree:: + :maxdepth: 2 + :caption: API reference: + + api/modules Indices and tables ------------------ From 9b4311978a8314e568195af2760156125367d0f2 Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Fri, 17 Mar 2023 16:30:02 +0000 Subject: [PATCH 10/12] Remove hardcoded calls to test functions --- freegs/test_sensors.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/freegs/test_sensors.py b/freegs/test_sensors.py index a9c0071..9f87be9 100644 --- a/freegs/test_sensors.py +++ b/freegs/test_sensors.py @@ -233,15 +233,3 @@ def test_rog_with_plasma(): tokamak.takeMeasurements(eq) print(tokamak.sensors[0].measurement) assert np.isclose(tokamak.sensors[0].measurement, plasmacurrent,atol=1000) - -test_flux() -test_iso_flux() -test_offaxis_Bfield() -test_xpoint_field() - -test_rog_around_coil() -test_rog_with_plasma() -test_rog_around_Shapedcoil() -test_rog_around_Filamentcoil() -test_rog_around_circuit() - From 71ba605614025694eab2e986f49c07da483cefcc Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Fri, 17 Mar 2023 16:31:04 +0000 Subject: [PATCH 11/12] Ignore docs build directory --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 463021a..e52d345 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ dist/ venv freegs/_version.py asv_bench/.asv/ +docs/_build From 6d57ae8e9fff32290711c5087c0739fd96750ab3 Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Fri, 17 Mar 2023 17:00:17 +0000 Subject: [PATCH 12/12] Docs: Change author Co-authored-by: Ben Dudson --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 6f182a9..09990a1 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -65,7 +65,7 @@ def __getattr__(cls, name): # General information about the project. project = "FreeGS" -copyright = "2017-2023, Ben Dudson" +copyright = "2017-2023, FreeGS authors" author = "Ben Dudson" # The version info for the project you're documenting, acts as replacement for