From a98e4724f7a2eab2476e1b5fc2ddde92465f5a1b Mon Sep 17 00:00:00 2001 From: PONS Date: Tue, 10 Feb 2026 12:23:47 +0100 Subject: [PATCH 01/10] Updated code snippets --- pyaml/arrays/bpm.py | 23 ++++++++++++++++------- pyaml/arrays/bpm_array.py | 10 +++++++--- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/pyaml/arrays/bpm.py b/pyaml/arrays/bpm.py index a727ab37..1e5b25e1 100644 --- a/pyaml/arrays/bpm.py +++ b/pyaml/arrays/bpm.py @@ -8,8 +8,6 @@ class ConfigModel(ArrayConfigModel): """Configuration model for BPM array.""" - ... - class BPM(ArrayConfig): """ @@ -28,16 +26,16 @@ class BPM(ArrayConfig): - BPM_C04-01 - BPM_C04-02 - BPM_C04-03 - - BPM_C04-04 - - BPM_C04-05 A BPM array configuration can also be created by code using the following example: .. code-block:: python >>> from pyaml.arrays.bpm import BPM,ConfigModel as BPMArrayConfigModel - >>> bpmArray = BPM(BPMArrayConfigModel(name="MyBPMs", elements=["bpm1","bpm2"]) - + >>> bpm_cfg = BPM(BPMArrayConfigModel( + name="BPM", + elements=["BPM_C04-01","BPM_C04-02","BPM_C04-03"] + )) """ @@ -46,7 +44,18 @@ def __init__(self, cfg: ArrayConfigModel): def fill_array(self, holder: ElementHolder): """ - Fill the :py:class:`.BPMArray` using element holder. + Fill the :py:class:`.BPMArray` using element holder. This method is called + when an :py:class:`~pyaml.accelerator.Accelerator` is loaded but can be + used to create arrays by code as shown bellow: + + .. code-block:: python + + >>> bpm_cfg.fill_array(sr.design) # For arrays created on the fly + >>> orbit = sr.design.get_bpms("BPM").positions.get() + >>> print(orbit) + [[ 6.02736506e-10 0.00000000e+00] + [-3.06292158e-08 0.00000000e+00] + [-2.80366116e-08 0.00000000e+00]] Parameters ---------- diff --git a/pyaml/arrays/bpm_array.py b/pyaml/arrays/bpm_array.py index 36d50a3c..48c7866c 100644 --- a/pyaml/arrays/bpm_array.py +++ b/pyaml/arrays/bpm_array.py @@ -150,11 +150,15 @@ class BPMArray(ElementArray): Example ------- - An array can be retrieved from the configuration as in the following example:: + An array can be retrieved from the configuration as in the following example: - sr = Accelerator.load("acc.yaml") - bpms = sr.design.get_bpms("BPMs") + .. code-block:: python + >>> sr = Accelerator.load("acc.yaml") # Load the accelerator + >>> bpms = sr.design.get_bpms("BPM") # Retrieve BPM array + >>> orbit = bpms.positions.get() # Get the orbit + + or can be created by code using :py:class:`pyaml.arrays.bpm.BPM`. """ From 81dfaf7b025882f703175f29b520d8e8c6335999 Mon Sep 17 00:00:00 2001 From: PONS Date: Tue, 10 Feb 2026 16:04:27 +0100 Subject: [PATCH 02/10] Delete api --- docs/api/pyaml.accelerator.rst | 12 ------- docs/api/pyaml.arrays.array.rst | 12 ------- docs/api/pyaml.arrays.bpm.rst | 12 ------- docs/api/pyaml.arrays.bpm_array.rst | 13 -------- docs/api/pyaml.arrays.cfm_magnet.rst | 12 ------- docs/api/pyaml.arrays.cfm_magnet_array.rst | 13 -------- docs/api/pyaml.arrays.element.rst | 12 ------- docs/api/pyaml.arrays.element_array.rst | 11 ------- docs/api/pyaml.arrays.magnet.rst | 12 ------- docs/api/pyaml.arrays.magnet_array.rst | 13 -------- docs/api/pyaml.arrays.rst | 23 ------------- docs/api/pyaml.arrays.serialized_magnet.rst | 12 ------- .../pyaml.arrays.serialized_magnet_array.rst | 13 -------- docs/api/pyaml.bpm.bpm.rst | 12 ------- docs/api/pyaml.bpm.bpm_model.rst | 11 ------- docs/api/pyaml.bpm.bpm_simple_model.rst | 12 ------- docs/api/pyaml.bpm.bpm_tiltoffset_model.rst | 12 ------- docs/api/pyaml.bpm.rst | 16 ---------- docs/api/pyaml.common.abstract.rst | 15 --------- docs/api/pyaml.common.abstract_aggregator.rst | 11 ------- docs/api/pyaml.common.constants.rst | 4 --- docs/api/pyaml.common.element.rst | 12 ------- docs/api/pyaml.common.element_holder.rst | 11 ------- docs/api/pyaml.common.exception.rst | 12 ------- docs/api/pyaml.common.rst | 18 ----------- docs/api/pyaml.configuration.csvcurve.rst | 12 ------- docs/api/pyaml.configuration.csvmatrix.rst | 12 ------- docs/api/pyaml.configuration.curve.rst | 11 ------- docs/api/pyaml.configuration.factory.rst | 12 ------- docs/api/pyaml.configuration.fileloader.rst | 30 ----------------- docs/api/pyaml.configuration.inline_curve.rst | 12 ------- .../api/pyaml.configuration.inline_matrix.rst | 12 ------- docs/api/pyaml.configuration.matrix.rst | 11 ------- docs/api/pyaml.configuration.rst | 20 ------------ docs/api/pyaml.control.abstract_impl.rst | 32 ------------------- docs/api/pyaml.control.controlsystem.rst | 11 ------- docs/api/pyaml.control.deviceaccess.rst | 11 ------- docs/api/pyaml.control.deviceaccesslist.rst | 11 ------- docs/api/pyaml.control.readback_value.rst | 12 ------- docs/api/pyaml.control.rst | 17 ---------- ...pyaml.diagnostics.chromaticity_monitor.rst | 12 ------- docs/api/pyaml.diagnostics.rst | 14 -------- docs/api/pyaml.diagnostics.tune_monitor.rst | 12 ------- docs/api/pyaml.external.pySC_interface.rst | 11 ------- docs/api/pyaml.external.rst | 13 -------- docs/api/pyaml.lattice.abstract_impl.rst | 29 ----------------- docs/api/pyaml.lattice.attribute_linker.rst | 13 -------- docs/api/pyaml.lattice.element.rst | 4 --- .../pyaml.lattice.lattice_elements_linker.rst | 13 -------- docs/api/pyaml.lattice.polynom_info.rst | 11 ------- docs/api/pyaml.lattice.rst | 18 ----------- docs/api/pyaml.lattice.simulator.rst | 12 ------- docs/api/pyaml.magnet.cfm_magnet.rst | 12 ------- docs/api/pyaml.magnet.corrector.rst | 11 ------- docs/api/pyaml.magnet.function_mapping.rst | 4 --- docs/api/pyaml.magnet.hcorrector.rst | 12 ------- docs/api/pyaml.magnet.identity_cfm_model.rst | 12 ------- docs/api/pyaml.magnet.identity_model.rst | 12 ------- docs/api/pyaml.magnet.linear_cfm_model.rst | 12 ------- docs/api/pyaml.magnet.linear_model.rst | 12 ------- .../pyaml.magnet.linear_serialized_model.rst | 12 ------- docs/api/pyaml.magnet.magnet.rst | 12 ------- docs/api/pyaml.magnet.model.rst | 11 ------- docs/api/pyaml.magnet.octupole.rst | 12 ------- docs/api/pyaml.magnet.quadrupole.rst | 12 ------- docs/api/pyaml.magnet.rst | 32 ------------------- docs/api/pyaml.magnet.serialized_magnet.rst | 14 -------- docs/api/pyaml.magnet.sextupole.rst | 12 ------- docs/api/pyaml.magnet.skewoctu.rst | 12 ------- docs/api/pyaml.magnet.skewquad.rst | 12 ------- docs/api/pyaml.magnet.skewsext.rst | 12 ------- docs/api/pyaml.magnet.spline_model.rst | 12 ------- docs/api/pyaml.magnet.vcorrector.rst | 12 ------- docs/api/pyaml.rf.rf_plant.rst | 13 -------- docs/api/pyaml.rf.rf_transmitter.rst | 12 ------- docs/api/pyaml.rf.rst | 14 -------- docs/api/pyaml.tuning_tools.rst | 4 --- 77 files changed, 1011 deletions(-) delete mode 100644 docs/api/pyaml.accelerator.rst delete mode 100644 docs/api/pyaml.arrays.array.rst delete mode 100644 docs/api/pyaml.arrays.bpm.rst delete mode 100644 docs/api/pyaml.arrays.bpm_array.rst delete mode 100644 docs/api/pyaml.arrays.cfm_magnet.rst delete mode 100644 docs/api/pyaml.arrays.cfm_magnet_array.rst delete mode 100644 docs/api/pyaml.arrays.element.rst delete mode 100644 docs/api/pyaml.arrays.element_array.rst delete mode 100644 docs/api/pyaml.arrays.magnet.rst delete mode 100644 docs/api/pyaml.arrays.magnet_array.rst delete mode 100644 docs/api/pyaml.arrays.rst delete mode 100644 docs/api/pyaml.arrays.serialized_magnet.rst delete mode 100644 docs/api/pyaml.arrays.serialized_magnet_array.rst delete mode 100644 docs/api/pyaml.bpm.bpm.rst delete mode 100644 docs/api/pyaml.bpm.bpm_model.rst delete mode 100644 docs/api/pyaml.bpm.bpm_simple_model.rst delete mode 100644 docs/api/pyaml.bpm.bpm_tiltoffset_model.rst delete mode 100644 docs/api/pyaml.bpm.rst delete mode 100644 docs/api/pyaml.common.abstract.rst delete mode 100644 docs/api/pyaml.common.abstract_aggregator.rst delete mode 100644 docs/api/pyaml.common.constants.rst delete mode 100644 docs/api/pyaml.common.element.rst delete mode 100644 docs/api/pyaml.common.element_holder.rst delete mode 100644 docs/api/pyaml.common.exception.rst delete mode 100644 docs/api/pyaml.common.rst delete mode 100644 docs/api/pyaml.configuration.csvcurve.rst delete mode 100644 docs/api/pyaml.configuration.csvmatrix.rst delete mode 100644 docs/api/pyaml.configuration.curve.rst delete mode 100644 docs/api/pyaml.configuration.factory.rst delete mode 100644 docs/api/pyaml.configuration.fileloader.rst delete mode 100644 docs/api/pyaml.configuration.inline_curve.rst delete mode 100644 docs/api/pyaml.configuration.inline_matrix.rst delete mode 100644 docs/api/pyaml.configuration.matrix.rst delete mode 100644 docs/api/pyaml.configuration.rst delete mode 100644 docs/api/pyaml.control.abstract_impl.rst delete mode 100644 docs/api/pyaml.control.controlsystem.rst delete mode 100644 docs/api/pyaml.control.deviceaccess.rst delete mode 100644 docs/api/pyaml.control.deviceaccesslist.rst delete mode 100644 docs/api/pyaml.control.readback_value.rst delete mode 100644 docs/api/pyaml.control.rst delete mode 100644 docs/api/pyaml.diagnostics.chromaticity_monitor.rst delete mode 100644 docs/api/pyaml.diagnostics.rst delete mode 100644 docs/api/pyaml.diagnostics.tune_monitor.rst delete mode 100644 docs/api/pyaml.external.pySC_interface.rst delete mode 100644 docs/api/pyaml.external.rst delete mode 100644 docs/api/pyaml.lattice.abstract_impl.rst delete mode 100644 docs/api/pyaml.lattice.attribute_linker.rst delete mode 100644 docs/api/pyaml.lattice.element.rst delete mode 100644 docs/api/pyaml.lattice.lattice_elements_linker.rst delete mode 100644 docs/api/pyaml.lattice.polynom_info.rst delete mode 100644 docs/api/pyaml.lattice.rst delete mode 100644 docs/api/pyaml.lattice.simulator.rst delete mode 100644 docs/api/pyaml.magnet.cfm_magnet.rst delete mode 100644 docs/api/pyaml.magnet.corrector.rst delete mode 100644 docs/api/pyaml.magnet.function_mapping.rst delete mode 100644 docs/api/pyaml.magnet.hcorrector.rst delete mode 100644 docs/api/pyaml.magnet.identity_cfm_model.rst delete mode 100644 docs/api/pyaml.magnet.identity_model.rst delete mode 100644 docs/api/pyaml.magnet.linear_cfm_model.rst delete mode 100644 docs/api/pyaml.magnet.linear_model.rst delete mode 100644 docs/api/pyaml.magnet.linear_serialized_model.rst delete mode 100644 docs/api/pyaml.magnet.magnet.rst delete mode 100644 docs/api/pyaml.magnet.model.rst delete mode 100644 docs/api/pyaml.magnet.octupole.rst delete mode 100644 docs/api/pyaml.magnet.quadrupole.rst delete mode 100644 docs/api/pyaml.magnet.rst delete mode 100644 docs/api/pyaml.magnet.serialized_magnet.rst delete mode 100644 docs/api/pyaml.magnet.sextupole.rst delete mode 100644 docs/api/pyaml.magnet.skewoctu.rst delete mode 100644 docs/api/pyaml.magnet.skewquad.rst delete mode 100644 docs/api/pyaml.magnet.skewsext.rst delete mode 100644 docs/api/pyaml.magnet.spline_model.rst delete mode 100644 docs/api/pyaml.magnet.vcorrector.rst delete mode 100644 docs/api/pyaml.rf.rf_plant.rst delete mode 100644 docs/api/pyaml.rf.rf_transmitter.rst delete mode 100644 docs/api/pyaml.rf.rst delete mode 100644 docs/api/pyaml.tuning_tools.rst diff --git a/docs/api/pyaml.accelerator.rst b/docs/api/pyaml.accelerator.rst deleted file mode 100644 index cad94624..00000000 --- a/docs/api/pyaml.accelerator.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.accelerator -================= - -.. automodule:: pyaml.accelerator - - - .. rubric:: Classes - - .. autosummary:: - - Accelerator - ConfigModel diff --git a/docs/api/pyaml.arrays.array.rst b/docs/api/pyaml.arrays.array.rst deleted file mode 100644 index 58ff1334..00000000 --- a/docs/api/pyaml.arrays.array.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.arrays.array -================== - -.. automodule:: pyaml.arrays.array - - - .. rubric:: Classes - - .. autosummary:: - - ArrayConfig - ArrayConfigModel diff --git a/docs/api/pyaml.arrays.bpm.rst b/docs/api/pyaml.arrays.bpm.rst deleted file mode 100644 index d3b49d5c..00000000 --- a/docs/api/pyaml.arrays.bpm.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.arrays.bpm -================ - -.. automodule:: pyaml.arrays.bpm - - - .. rubric:: Classes - - .. autosummary:: - - BPM - ConfigModel diff --git a/docs/api/pyaml.arrays.bpm_array.rst b/docs/api/pyaml.arrays.bpm_array.rst deleted file mode 100644 index 2c47e37a..00000000 --- a/docs/api/pyaml.arrays.bpm_array.rst +++ /dev/null @@ -1,13 +0,0 @@ -pyaml.arrays.bpm\_array -======================= - -.. automodule:: pyaml.arrays.bpm_array - - - .. rubric:: Classes - - .. autosummary:: - - BPMArray - RWBPMPosition - RWBPMSinglePosition diff --git a/docs/api/pyaml.arrays.cfm_magnet.rst b/docs/api/pyaml.arrays.cfm_magnet.rst deleted file mode 100644 index 13d0bea7..00000000 --- a/docs/api/pyaml.arrays.cfm_magnet.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.arrays.cfm\_magnet -======================== - -.. automodule:: pyaml.arrays.cfm_magnet - - - .. rubric:: Classes - - .. autosummary:: - - CombinedFunctionMagnet - ConfigModel diff --git a/docs/api/pyaml.arrays.cfm_magnet_array.rst b/docs/api/pyaml.arrays.cfm_magnet_array.rst deleted file mode 100644 index 53993ac6..00000000 --- a/docs/api/pyaml.arrays.cfm_magnet_array.rst +++ /dev/null @@ -1,13 +0,0 @@ -pyaml.arrays.cfm\_magnet\_array -=============================== - -.. automodule:: pyaml.arrays.cfm_magnet_array - - - .. rubric:: Classes - - .. autosummary:: - - CombinedFunctionMagnetArray - RWMagnetHardwares - RWMagnetStrengths diff --git a/docs/api/pyaml.arrays.element.rst b/docs/api/pyaml.arrays.element.rst deleted file mode 100644 index 9da6de06..00000000 --- a/docs/api/pyaml.arrays.element.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.arrays.element -==================== - -.. automodule:: pyaml.arrays.element - - - .. rubric:: Classes - - .. autosummary:: - - ConfigModel - Element diff --git a/docs/api/pyaml.arrays.element_array.rst b/docs/api/pyaml.arrays.element_array.rst deleted file mode 100644 index c1e248f8..00000000 --- a/docs/api/pyaml.arrays.element_array.rst +++ /dev/null @@ -1,11 +0,0 @@ -pyaml.arrays.element\_array -=========================== - -.. automodule:: pyaml.arrays.element_array - - - .. rubric:: Classes - - .. autosummary:: - - ElementArray diff --git a/docs/api/pyaml.arrays.magnet.rst b/docs/api/pyaml.arrays.magnet.rst deleted file mode 100644 index 4df9a608..00000000 --- a/docs/api/pyaml.arrays.magnet.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.arrays.magnet -=================== - -.. automodule:: pyaml.arrays.magnet - - - .. rubric:: Classes - - .. autosummary:: - - ConfigModel - Magnet diff --git a/docs/api/pyaml.arrays.magnet_array.rst b/docs/api/pyaml.arrays.magnet_array.rst deleted file mode 100644 index d8c07636..00000000 --- a/docs/api/pyaml.arrays.magnet_array.rst +++ /dev/null @@ -1,13 +0,0 @@ -pyaml.arrays.magnet\_array -========================== - -.. automodule:: pyaml.arrays.magnet_array - - - .. rubric:: Classes - - .. autosummary:: - - MagnetArray - RWMagnetHardware - RWMagnetStrength diff --git a/docs/api/pyaml.arrays.rst b/docs/api/pyaml.arrays.rst deleted file mode 100644 index 98b9176b..00000000 --- a/docs/api/pyaml.arrays.rst +++ /dev/null @@ -1,23 +0,0 @@ -pyaml.arrays -============ - -.. automodule:: pyaml.arrays - - -.. rubric:: Modules - -.. autosummary:: - :toctree: - :recursive: - - array - bpm - bpm_array - cfm_magnet - cfm_magnet_array - element - element_array - magnet - magnet_array - serialized_magnet - serialized_magnet_array diff --git a/docs/api/pyaml.arrays.serialized_magnet.rst b/docs/api/pyaml.arrays.serialized_magnet.rst deleted file mode 100644 index f209116a..00000000 --- a/docs/api/pyaml.arrays.serialized_magnet.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.arrays.serialized\_magnet -=============================== - -.. automodule:: pyaml.arrays.serialized_magnet - - - .. rubric:: Classes - - .. autosummary:: - - ConfigModel - SerializedMagnets diff --git a/docs/api/pyaml.arrays.serialized_magnet_array.rst b/docs/api/pyaml.arrays.serialized_magnet_array.rst deleted file mode 100644 index c401c2b8..00000000 --- a/docs/api/pyaml.arrays.serialized_magnet_array.rst +++ /dev/null @@ -1,13 +0,0 @@ -pyaml.arrays.serialized\_magnet\_array -====================================== - -.. automodule:: pyaml.arrays.serialized_magnet_array - - - .. rubric:: Classes - - .. autosummary:: - - RWMagnetHardwares - RWMagnetStrengths - SerializedMagnetsArray diff --git a/docs/api/pyaml.bpm.bpm.rst b/docs/api/pyaml.bpm.bpm.rst deleted file mode 100644 index 4d2532d6..00000000 --- a/docs/api/pyaml.bpm.bpm.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.bpm.bpm -============= - -.. automodule:: pyaml.bpm.bpm - - - .. rubric:: Classes - - .. autosummary:: - - BPM - ConfigModel diff --git a/docs/api/pyaml.bpm.bpm_model.rst b/docs/api/pyaml.bpm.bpm_model.rst deleted file mode 100644 index 04e5d330..00000000 --- a/docs/api/pyaml.bpm.bpm_model.rst +++ /dev/null @@ -1,11 +0,0 @@ -pyaml.bpm.bpm\_model -==================== - -.. automodule:: pyaml.bpm.bpm_model - - - .. rubric:: Classes - - .. autosummary:: - - BPMModel diff --git a/docs/api/pyaml.bpm.bpm_simple_model.rst b/docs/api/pyaml.bpm.bpm_simple_model.rst deleted file mode 100644 index 049c65d6..00000000 --- a/docs/api/pyaml.bpm.bpm_simple_model.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.bpm.bpm\_simple\_model -============================ - -.. automodule:: pyaml.bpm.bpm_simple_model - - - .. rubric:: Classes - - .. autosummary:: - - BPMSimpleModel - ConfigModel diff --git a/docs/api/pyaml.bpm.bpm_tiltoffset_model.rst b/docs/api/pyaml.bpm.bpm_tiltoffset_model.rst deleted file mode 100644 index 9e387af0..00000000 --- a/docs/api/pyaml.bpm.bpm_tiltoffset_model.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.bpm.bpm\_tiltoffset\_model -================================ - -.. automodule:: pyaml.bpm.bpm_tiltoffset_model - - - .. rubric:: Classes - - .. autosummary:: - - BPMTiltOffsetModel - ConfigModel diff --git a/docs/api/pyaml.bpm.rst b/docs/api/pyaml.bpm.rst deleted file mode 100644 index 6e51f37c..00000000 --- a/docs/api/pyaml.bpm.rst +++ /dev/null @@ -1,16 +0,0 @@ -pyaml.bpm -========= - -.. automodule:: pyaml.bpm - - -.. rubric:: Modules - -.. autosummary:: - :toctree: - :recursive: - - bpm - bpm_model - bpm_simple_model - bpm_tiltoffset_model diff --git a/docs/api/pyaml.common.abstract.rst b/docs/api/pyaml.common.abstract.rst deleted file mode 100644 index 23ced82f..00000000 --- a/docs/api/pyaml.common.abstract.rst +++ /dev/null @@ -1,15 +0,0 @@ -pyaml.common.abstract -===================== - -.. automodule:: pyaml.common.abstract - - - .. rubric:: Classes - - .. autosummary:: - - RWMapper - ReadFloatArray - ReadFloatScalar - ReadWriteFloatArray - ReadWriteFloatScalar diff --git a/docs/api/pyaml.common.abstract_aggregator.rst b/docs/api/pyaml.common.abstract_aggregator.rst deleted file mode 100644 index 66203901..00000000 --- a/docs/api/pyaml.common.abstract_aggregator.rst +++ /dev/null @@ -1,11 +0,0 @@ -pyaml.common.abstract\_aggregator -================================= - -.. automodule:: pyaml.common.abstract_aggregator - - - .. rubric:: Classes - - .. autosummary:: - - ScalarAggregator diff --git a/docs/api/pyaml.common.constants.rst b/docs/api/pyaml.common.constants.rst deleted file mode 100644 index a3ac42de..00000000 --- a/docs/api/pyaml.common.constants.rst +++ /dev/null @@ -1,4 +0,0 @@ -pyaml.common.constants -====================== - -.. automodule:: pyaml.common.constants diff --git a/docs/api/pyaml.common.element.rst b/docs/api/pyaml.common.element.rst deleted file mode 100644 index 5966df4b..00000000 --- a/docs/api/pyaml.common.element.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.common.element -==================== - -.. automodule:: pyaml.common.element - - - .. rubric:: Classes - - .. autosummary:: - - Element - ElementConfigModel diff --git a/docs/api/pyaml.common.element_holder.rst b/docs/api/pyaml.common.element_holder.rst deleted file mode 100644 index f5c01fbd..00000000 --- a/docs/api/pyaml.common.element_holder.rst +++ /dev/null @@ -1,11 +0,0 @@ -pyaml.common.element\_holder -============================ - -.. automodule:: pyaml.common.element_holder - - - .. rubric:: Classes - - .. autosummary:: - - ElementHolder diff --git a/docs/api/pyaml.common.exception.rst b/docs/api/pyaml.common.exception.rst deleted file mode 100644 index b21c3f4d..00000000 --- a/docs/api/pyaml.common.exception.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.common.exception -====================== - -.. automodule:: pyaml.common.exception - - - .. rubric:: Exceptions - - .. autosummary:: - - PyAMLConfigException - PyAMLException diff --git a/docs/api/pyaml.common.rst b/docs/api/pyaml.common.rst deleted file mode 100644 index bc3c389d..00000000 --- a/docs/api/pyaml.common.rst +++ /dev/null @@ -1,18 +0,0 @@ -pyaml.common -============ - -.. automodule:: pyaml.common - - -.. rubric:: Modules - -.. autosummary:: - :toctree: - :recursive: - - abstract - abstract_aggregator - constants - element - element_holder - exception diff --git a/docs/api/pyaml.configuration.csvcurve.rst b/docs/api/pyaml.configuration.csvcurve.rst deleted file mode 100644 index 9e3a54fa..00000000 --- a/docs/api/pyaml.configuration.csvcurve.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.configuration.csvcurve -============================ - -.. automodule:: pyaml.configuration.csvcurve - - - .. rubric:: Classes - - .. autosummary:: - - CSVCurve - ConfigModel diff --git a/docs/api/pyaml.configuration.csvmatrix.rst b/docs/api/pyaml.configuration.csvmatrix.rst deleted file mode 100644 index 2fc4e8ff..00000000 --- a/docs/api/pyaml.configuration.csvmatrix.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.configuration.csvmatrix -============================= - -.. automodule:: pyaml.configuration.csvmatrix - - - .. rubric:: Classes - - .. autosummary:: - - CSVMatrix - ConfigModel diff --git a/docs/api/pyaml.configuration.curve.rst b/docs/api/pyaml.configuration.curve.rst deleted file mode 100644 index 5880c605..00000000 --- a/docs/api/pyaml.configuration.curve.rst +++ /dev/null @@ -1,11 +0,0 @@ -pyaml.configuration.curve -========================= - -.. automodule:: pyaml.configuration.curve - - - .. rubric:: Classes - - .. autosummary:: - - Curve diff --git a/docs/api/pyaml.configuration.factory.rst b/docs/api/pyaml.configuration.factory.rst deleted file mode 100644 index ccefc19b..00000000 --- a/docs/api/pyaml.configuration.factory.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.configuration.factory -=========================== - -.. automodule:: pyaml.configuration.factory - - - .. rubric:: Classes - - .. autosummary:: - - BuildStrategy - PyAMLFactory diff --git a/docs/api/pyaml.configuration.fileloader.rst b/docs/api/pyaml.configuration.fileloader.rst deleted file mode 100644 index f547c706..00000000 --- a/docs/api/pyaml.configuration.fileloader.rst +++ /dev/null @@ -1,30 +0,0 @@ -pyaml.configuration.fileloader -============================== - -.. automodule:: pyaml.configuration.fileloader - - - .. rubric:: Functions - - .. autosummary:: - - get_path - get_root_folder - hasToLoad - load - set_root_folder - - .. rubric:: Classes - - .. autosummary:: - - JSONLoader - Loader - SafeLineLoader - YAMLLoader - - .. rubric:: Exceptions - - .. autosummary:: - - PyAMLConfigCyclingException diff --git a/docs/api/pyaml.configuration.inline_curve.rst b/docs/api/pyaml.configuration.inline_curve.rst deleted file mode 100644 index 94e8f68e..00000000 --- a/docs/api/pyaml.configuration.inline_curve.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.configuration.inline\_curve -================================= - -.. automodule:: pyaml.configuration.inline_curve - - - .. rubric:: Classes - - .. autosummary:: - - ConfigModel - InlineCurve diff --git a/docs/api/pyaml.configuration.inline_matrix.rst b/docs/api/pyaml.configuration.inline_matrix.rst deleted file mode 100644 index a3f01ea6..00000000 --- a/docs/api/pyaml.configuration.inline_matrix.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.configuration.inline\_matrix -================================== - -.. automodule:: pyaml.configuration.inline_matrix - - - .. rubric:: Classes - - .. autosummary:: - - ConfigModel - InlineMatrix diff --git a/docs/api/pyaml.configuration.matrix.rst b/docs/api/pyaml.configuration.matrix.rst deleted file mode 100644 index 93164ad8..00000000 --- a/docs/api/pyaml.configuration.matrix.rst +++ /dev/null @@ -1,11 +0,0 @@ -pyaml.configuration.matrix -========================== - -.. automodule:: pyaml.configuration.matrix - - - .. rubric:: Classes - - .. autosummary:: - - Matrix diff --git a/docs/api/pyaml.configuration.rst b/docs/api/pyaml.configuration.rst deleted file mode 100644 index c93d4a55..00000000 --- a/docs/api/pyaml.configuration.rst +++ /dev/null @@ -1,20 +0,0 @@ -pyaml.configuration -=================== - -.. automodule:: pyaml.configuration - - -.. rubric:: Modules - -.. autosummary:: - :toctree: - :recursive: - - csvcurve - csvmatrix - curve - factory - fileloader - inline_curve - inline_matrix - matrix diff --git a/docs/api/pyaml.control.abstract_impl.rst b/docs/api/pyaml.control.abstract_impl.rst deleted file mode 100644 index b71ff6c3..00000000 --- a/docs/api/pyaml.control.abstract_impl.rst +++ /dev/null @@ -1,32 +0,0 @@ -pyaml.control.abstract\_impl -============================ - -.. automodule:: pyaml.control.abstract_impl - - - .. rubric:: Functions - - .. autosummary:: - - check_range - format_out_of_range_message - - .. rubric:: Classes - - .. autosummary:: - - CSBPMArrayMapper - CSScalarAggregator - CSStrengthScalarAggregator - RBetatronTuneArray - RBpmArray - RChromaticityArray - RWBpmOffsetArray - RWBpmTiltScalar - RWHardwareArray - RWHardwareScalar - RWRFFrequencyScalar - RWRFPhaseScalar - RWRFVoltageScalar - RWStrengthArray - RWStrengthScalar diff --git a/docs/api/pyaml.control.controlsystem.rst b/docs/api/pyaml.control.controlsystem.rst deleted file mode 100644 index eaf652ff..00000000 --- a/docs/api/pyaml.control.controlsystem.rst +++ /dev/null @@ -1,11 +0,0 @@ -pyaml.control.controlsystem -=========================== - -.. automodule:: pyaml.control.controlsystem - - - .. rubric:: Classes - - .. autosummary:: - - ControlSystem diff --git a/docs/api/pyaml.control.deviceaccess.rst b/docs/api/pyaml.control.deviceaccess.rst deleted file mode 100644 index 0f55cf7a..00000000 --- a/docs/api/pyaml.control.deviceaccess.rst +++ /dev/null @@ -1,11 +0,0 @@ -pyaml.control.deviceaccess -========================== - -.. automodule:: pyaml.control.deviceaccess - - - .. rubric:: Classes - - .. autosummary:: - - DeviceAccess diff --git a/docs/api/pyaml.control.deviceaccesslist.rst b/docs/api/pyaml.control.deviceaccesslist.rst deleted file mode 100644 index 317a7911..00000000 --- a/docs/api/pyaml.control.deviceaccesslist.rst +++ /dev/null @@ -1,11 +0,0 @@ -pyaml.control.deviceaccesslist -============================== - -.. automodule:: pyaml.control.deviceaccesslist - - - .. rubric:: Classes - - .. autosummary:: - - DeviceAccessList diff --git a/docs/api/pyaml.control.readback_value.rst b/docs/api/pyaml.control.readback_value.rst deleted file mode 100644 index a68bf178..00000000 --- a/docs/api/pyaml.control.readback_value.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.control.readback\_value -============================= - -.. automodule:: pyaml.control.readback_value - - - .. rubric:: Classes - - .. autosummary:: - - Quality - Value diff --git a/docs/api/pyaml.control.rst b/docs/api/pyaml.control.rst deleted file mode 100644 index fd0c42be..00000000 --- a/docs/api/pyaml.control.rst +++ /dev/null @@ -1,17 +0,0 @@ -pyaml.control -============= - -.. automodule:: pyaml.control - - -.. rubric:: Modules - -.. autosummary:: - :toctree: - :recursive: - - abstract_impl - controlsystem - deviceaccess - deviceaccesslist - readback_value diff --git a/docs/api/pyaml.diagnostics.chromaticity_monitor.rst b/docs/api/pyaml.diagnostics.chromaticity_monitor.rst deleted file mode 100644 index 1e807fee..00000000 --- a/docs/api/pyaml.diagnostics.chromaticity_monitor.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.diagnostics.chromaticity\_monitor -======================================= - -.. automodule:: pyaml.diagnostics.chromaticity_monitor - - - .. rubric:: Classes - - .. autosummary:: - - ChomaticityMonitor - ConfigModel diff --git a/docs/api/pyaml.diagnostics.rst b/docs/api/pyaml.diagnostics.rst deleted file mode 100644 index 61665d34..00000000 --- a/docs/api/pyaml.diagnostics.rst +++ /dev/null @@ -1,14 +0,0 @@ -pyaml.diagnostics -================= - -.. automodule:: pyaml.diagnostics - - -.. rubric:: Modules - -.. autosummary:: - :toctree: - :recursive: - - chromaticity_monitor - tune_monitor diff --git a/docs/api/pyaml.diagnostics.tune_monitor.rst b/docs/api/pyaml.diagnostics.tune_monitor.rst deleted file mode 100644 index 6cf280b6..00000000 --- a/docs/api/pyaml.diagnostics.tune_monitor.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.diagnostics.tune\_monitor -=============================== - -.. automodule:: pyaml.diagnostics.tune_monitor - - - .. rubric:: Classes - - .. autosummary:: - - BetatronTuneMonitor - ConfigModel diff --git a/docs/api/pyaml.external.pySC_interface.rst b/docs/api/pyaml.external.pySC_interface.rst deleted file mode 100644 index 71fa2f4a..00000000 --- a/docs/api/pyaml.external.pySC_interface.rst +++ /dev/null @@ -1,11 +0,0 @@ -pyaml.external.pySC\_interface -============================== - -.. automodule:: pyaml.external.pySC_interface - - - .. rubric:: Classes - - .. autosummary:: - - pySCInterface diff --git a/docs/api/pyaml.external.rst b/docs/api/pyaml.external.rst deleted file mode 100644 index b1f613d1..00000000 --- a/docs/api/pyaml.external.rst +++ /dev/null @@ -1,13 +0,0 @@ -pyaml.external -============== - -.. automodule:: pyaml.external - - -.. rubric:: Modules - -.. autosummary:: - :toctree: - :recursive: - - pySC_interface diff --git a/docs/api/pyaml.lattice.abstract_impl.rst b/docs/api/pyaml.lattice.abstract_impl.rst deleted file mode 100644 index b3185878..00000000 --- a/docs/api/pyaml.lattice.abstract_impl.rst +++ /dev/null @@ -1,29 +0,0 @@ -pyaml.lattice.abstract\_impl -============================ - -.. automodule:: pyaml.lattice.abstract_impl - - - .. rubric:: Classes - - .. autosummary:: - - BPMHScalarAggregator - BPMScalarAggregator - BPMVScalarAggregator - RBetatronTuneArray - RBpmArray - RChromaticityArray - RWBpmOffsetArray - RWBpmTiltScalar - RWHardwareArray - RWHardwareScalar - RWRFATFrequencyScalar - RWRFATotalVoltageScalar - RWRFFrequencyScalar - RWRFPhaseScalar - RWRFVoltageScalar - RWSerializedHardware - RWSerializedStrength - RWStrengthArray - RWStrengthScalar diff --git a/docs/api/pyaml.lattice.attribute_linker.rst b/docs/api/pyaml.lattice.attribute_linker.rst deleted file mode 100644 index d6ef8226..00000000 --- a/docs/api/pyaml.lattice.attribute_linker.rst +++ /dev/null @@ -1,13 +0,0 @@ -pyaml.lattice.attribute\_linker -=============================== - -.. automodule:: pyaml.lattice.attribute_linker - - - .. rubric:: Classes - - .. autosummary:: - - ConfigModel - PyAtAttributeElementsLinker - PyAtAttributeIdentifier diff --git a/docs/api/pyaml.lattice.element.rst b/docs/api/pyaml.lattice.element.rst deleted file mode 100644 index 2e39f371..00000000 --- a/docs/api/pyaml.lattice.element.rst +++ /dev/null @@ -1,4 +0,0 @@ -pyaml.lattice.element -===================== - -.. automodule:: pyaml.lattice.element diff --git a/docs/api/pyaml.lattice.lattice_elements_linker.rst b/docs/api/pyaml.lattice.lattice_elements_linker.rst deleted file mode 100644 index df03d99c..00000000 --- a/docs/api/pyaml.lattice.lattice_elements_linker.rst +++ /dev/null @@ -1,13 +0,0 @@ -pyaml.lattice.lattice\_elements\_linker -======================================= - -.. automodule:: pyaml.lattice.lattice_elements_linker - - - .. rubric:: Classes - - .. autosummary:: - - LatticeElementsLinker - LinkerConfigModel - LinkerIdentifier diff --git a/docs/api/pyaml.lattice.polynom_info.rst b/docs/api/pyaml.lattice.polynom_info.rst deleted file mode 100644 index c5b3d4d8..00000000 --- a/docs/api/pyaml.lattice.polynom_info.rst +++ /dev/null @@ -1,11 +0,0 @@ -pyaml.lattice.polynom\_info -=========================== - -.. automodule:: pyaml.lattice.polynom_info - - - .. rubric:: Classes - - .. autosummary:: - - PolynomInfo diff --git a/docs/api/pyaml.lattice.rst b/docs/api/pyaml.lattice.rst deleted file mode 100644 index 55a22a6c..00000000 --- a/docs/api/pyaml.lattice.rst +++ /dev/null @@ -1,18 +0,0 @@ -pyaml.lattice -============= - -.. automodule:: pyaml.lattice - - -.. rubric:: Modules - -.. autosummary:: - :toctree: - :recursive: - - abstract_impl - attribute_linker - element - lattice_elements_linker - polynom_info - simulator diff --git a/docs/api/pyaml.lattice.simulator.rst b/docs/api/pyaml.lattice.simulator.rst deleted file mode 100644 index 8f5b5d40..00000000 --- a/docs/api/pyaml.lattice.simulator.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.lattice.simulator -======================= - -.. automodule:: pyaml.lattice.simulator - - - .. rubric:: Classes - - .. autosummary:: - - ConfigModel - Simulator diff --git a/docs/api/pyaml.magnet.cfm_magnet.rst b/docs/api/pyaml.magnet.cfm_magnet.rst deleted file mode 100644 index ca04bdbd..00000000 --- a/docs/api/pyaml.magnet.cfm_magnet.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.magnet.cfm\_magnet -======================== - -.. automodule:: pyaml.magnet.cfm_magnet - - - .. rubric:: Classes - - .. autosummary:: - - CombinedFunctionMagnet - ConfigModel diff --git a/docs/api/pyaml.magnet.corrector.rst b/docs/api/pyaml.magnet.corrector.rst deleted file mode 100644 index 7e628ef1..00000000 --- a/docs/api/pyaml.magnet.corrector.rst +++ /dev/null @@ -1,11 +0,0 @@ -pyaml.magnet.corrector -====================== - -.. automodule:: pyaml.magnet.corrector - - - .. rubric:: Classes - - .. autosummary:: - - RWCorrectorAngle diff --git a/docs/api/pyaml.magnet.function_mapping.rst b/docs/api/pyaml.magnet.function_mapping.rst deleted file mode 100644 index 0a6a11c8..00000000 --- a/docs/api/pyaml.magnet.function_mapping.rst +++ /dev/null @@ -1,4 +0,0 @@ -pyaml.magnet.function\_mapping -============================== - -.. automodule:: pyaml.magnet.function_mapping diff --git a/docs/api/pyaml.magnet.hcorrector.rst b/docs/api/pyaml.magnet.hcorrector.rst deleted file mode 100644 index bcf7a7e2..00000000 --- a/docs/api/pyaml.magnet.hcorrector.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.magnet.hcorrector -======================= - -.. automodule:: pyaml.magnet.hcorrector - - - .. rubric:: Classes - - .. autosummary:: - - ConfigModel - HCorrector diff --git a/docs/api/pyaml.magnet.identity_cfm_model.rst b/docs/api/pyaml.magnet.identity_cfm_model.rst deleted file mode 100644 index 3f67f243..00000000 --- a/docs/api/pyaml.magnet.identity_cfm_model.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.magnet.identity\_cfm\_model -================================= - -.. automodule:: pyaml.magnet.identity_cfm_model - - - .. rubric:: Classes - - .. autosummary:: - - ConfigModel - IdentityCFMagnetModel diff --git a/docs/api/pyaml.magnet.identity_model.rst b/docs/api/pyaml.magnet.identity_model.rst deleted file mode 100644 index 4c926459..00000000 --- a/docs/api/pyaml.magnet.identity_model.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.magnet.identity\_model -============================ - -.. automodule:: pyaml.magnet.identity_model - - - .. rubric:: Classes - - .. autosummary:: - - ConfigModel - IdentityMagnetModel diff --git a/docs/api/pyaml.magnet.linear_cfm_model.rst b/docs/api/pyaml.magnet.linear_cfm_model.rst deleted file mode 100644 index 05b1cfbc..00000000 --- a/docs/api/pyaml.magnet.linear_cfm_model.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.magnet.linear\_cfm\_model -=============================== - -.. automodule:: pyaml.magnet.linear_cfm_model - - - .. rubric:: Classes - - .. autosummary:: - - ConfigModel - LinearCFMagnetModel diff --git a/docs/api/pyaml.magnet.linear_model.rst b/docs/api/pyaml.magnet.linear_model.rst deleted file mode 100644 index 778a3c19..00000000 --- a/docs/api/pyaml.magnet.linear_model.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.magnet.linear\_model -========================== - -.. automodule:: pyaml.magnet.linear_model - - - .. rubric:: Classes - - .. autosummary:: - - ConfigModel - LinearMagnetModel diff --git a/docs/api/pyaml.magnet.linear_serialized_model.rst b/docs/api/pyaml.magnet.linear_serialized_model.rst deleted file mode 100644 index 04caa569..00000000 --- a/docs/api/pyaml.magnet.linear_serialized_model.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.magnet.linear\_serialized\_model -====================================== - -.. automodule:: pyaml.magnet.linear_serialized_model - - - .. rubric:: Classes - - .. autosummary:: - - ConfigModel - LinearSerializedMagnetModel diff --git a/docs/api/pyaml.magnet.magnet.rst b/docs/api/pyaml.magnet.magnet.rst deleted file mode 100644 index b4cbe76c..00000000 --- a/docs/api/pyaml.magnet.magnet.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.magnet.magnet -=================== - -.. automodule:: pyaml.magnet.magnet - - - .. rubric:: Classes - - .. autosummary:: - - Magnet - MagnetConfigModel diff --git a/docs/api/pyaml.magnet.model.rst b/docs/api/pyaml.magnet.model.rst deleted file mode 100644 index 8f26a4fc..00000000 --- a/docs/api/pyaml.magnet.model.rst +++ /dev/null @@ -1,11 +0,0 @@ -pyaml.magnet.model -================== - -.. automodule:: pyaml.magnet.model - - - .. rubric:: Classes - - .. autosummary:: - - MagnetModel diff --git a/docs/api/pyaml.magnet.octupole.rst b/docs/api/pyaml.magnet.octupole.rst deleted file mode 100644 index 2a12c2db..00000000 --- a/docs/api/pyaml.magnet.octupole.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.magnet.octupole -===================== - -.. automodule:: pyaml.magnet.octupole - - - .. rubric:: Classes - - .. autosummary:: - - ConfigModel - Octupole diff --git a/docs/api/pyaml.magnet.quadrupole.rst b/docs/api/pyaml.magnet.quadrupole.rst deleted file mode 100644 index 6b7f8274..00000000 --- a/docs/api/pyaml.magnet.quadrupole.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.magnet.quadrupole -======================= - -.. automodule:: pyaml.magnet.quadrupole - - - .. rubric:: Classes - - .. autosummary:: - - ConfigModel - Quadrupole diff --git a/docs/api/pyaml.magnet.rst b/docs/api/pyaml.magnet.rst deleted file mode 100644 index 615f17d9..00000000 --- a/docs/api/pyaml.magnet.rst +++ /dev/null @@ -1,32 +0,0 @@ -pyaml.magnet -============ - -.. automodule:: pyaml.magnet - - -.. rubric:: Modules - -.. autosummary:: - :toctree: - :recursive: - - cfm_magnet - corrector - function_mapping - hcorrector - identity_cfm_model - identity_model - linear_cfm_model - linear_model - linear_serialized_model - magnet - model - octupole - quadrupole - serialized_magnet - sextupole - skewoctu - skewquad - skewsext - spline_model - vcorrector diff --git a/docs/api/pyaml.magnet.serialized_magnet.rst b/docs/api/pyaml.magnet.serialized_magnet.rst deleted file mode 100644 index 462729cf..00000000 --- a/docs/api/pyaml.magnet.serialized_magnet.rst +++ /dev/null @@ -1,14 +0,0 @@ -pyaml.magnet.serialized\_magnet -=============================== - -.. automodule:: pyaml.magnet.serialized_magnet - - - .. rubric:: Classes - - .. autosummary:: - - ConfigModel - ReadWriteSerializedHardwares - ReadWriteSerializedStrengths - SerializedMagnets diff --git a/docs/api/pyaml.magnet.sextupole.rst b/docs/api/pyaml.magnet.sextupole.rst deleted file mode 100644 index 41036f36..00000000 --- a/docs/api/pyaml.magnet.sextupole.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.magnet.sextupole -====================== - -.. automodule:: pyaml.magnet.sextupole - - - .. rubric:: Classes - - .. autosummary:: - - ConfigModel - Sextupole diff --git a/docs/api/pyaml.magnet.skewoctu.rst b/docs/api/pyaml.magnet.skewoctu.rst deleted file mode 100644 index 52738911..00000000 --- a/docs/api/pyaml.magnet.skewoctu.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.magnet.skewoctu -===================== - -.. automodule:: pyaml.magnet.skewoctu - - - .. rubric:: Classes - - .. autosummary:: - - ConfigModel - SkewOctu diff --git a/docs/api/pyaml.magnet.skewquad.rst b/docs/api/pyaml.magnet.skewquad.rst deleted file mode 100644 index f7c303bd..00000000 --- a/docs/api/pyaml.magnet.skewquad.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.magnet.skewquad -===================== - -.. automodule:: pyaml.magnet.skewquad - - - .. rubric:: Classes - - .. autosummary:: - - ConfigModel - SkewQuad diff --git a/docs/api/pyaml.magnet.skewsext.rst b/docs/api/pyaml.magnet.skewsext.rst deleted file mode 100644 index ad25ced8..00000000 --- a/docs/api/pyaml.magnet.skewsext.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.magnet.skewsext -===================== - -.. automodule:: pyaml.magnet.skewsext - - - .. rubric:: Classes - - .. autosummary:: - - ConfigModel - SkewSext diff --git a/docs/api/pyaml.magnet.spline_model.rst b/docs/api/pyaml.magnet.spline_model.rst deleted file mode 100644 index 10d9a277..00000000 --- a/docs/api/pyaml.magnet.spline_model.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.magnet.spline\_model -========================== - -.. automodule:: pyaml.magnet.spline_model - - - .. rubric:: Classes - - .. autosummary:: - - ConfigModel - SplineMagnetModel diff --git a/docs/api/pyaml.magnet.vcorrector.rst b/docs/api/pyaml.magnet.vcorrector.rst deleted file mode 100644 index 4a14c897..00000000 --- a/docs/api/pyaml.magnet.vcorrector.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.magnet.vcorrector -======================= - -.. automodule:: pyaml.magnet.vcorrector - - - .. rubric:: Classes - - .. autosummary:: - - ConfigModel - VCorrector diff --git a/docs/api/pyaml.rf.rf_plant.rst b/docs/api/pyaml.rf.rf_plant.rst deleted file mode 100644 index 62e155b6..00000000 --- a/docs/api/pyaml.rf.rf_plant.rst +++ /dev/null @@ -1,13 +0,0 @@ -pyaml.rf.rf\_plant -================== - -.. automodule:: pyaml.rf.rf_plant - - - .. rubric:: Classes - - .. autosummary:: - - ConfigModel - RFPlant - RWTotalVoltage diff --git a/docs/api/pyaml.rf.rf_transmitter.rst b/docs/api/pyaml.rf.rf_transmitter.rst deleted file mode 100644 index 36f1893a..00000000 --- a/docs/api/pyaml.rf.rf_transmitter.rst +++ /dev/null @@ -1,12 +0,0 @@ -pyaml.rf.rf\_transmitter -======================== - -.. automodule:: pyaml.rf.rf_transmitter - - - .. rubric:: Classes - - .. autosummary:: - - ConfigModel - RFTransmitter diff --git a/docs/api/pyaml.rf.rst b/docs/api/pyaml.rf.rst deleted file mode 100644 index e1c74825..00000000 --- a/docs/api/pyaml.rf.rst +++ /dev/null @@ -1,14 +0,0 @@ -pyaml.rf -======== - -.. automodule:: pyaml.rf - - -.. rubric:: Modules - -.. autosummary:: - :toctree: - :recursive: - - rf_plant - rf_transmitter diff --git a/docs/api/pyaml.tuning_tools.rst b/docs/api/pyaml.tuning_tools.rst deleted file mode 100644 index 03d45e2a..00000000 --- a/docs/api/pyaml.tuning_tools.rst +++ /dev/null @@ -1,4 +0,0 @@ -pyaml.tuning\_tools -=================== - -.. automodule:: pyaml.tuning_tools From f626bd33cab69ef10ca6476dd1e29a28b17f3b6f Mon Sep 17 00:00:00 2001 From: PONS Date: Thu, 12 Feb 2026 06:48:18 +0100 Subject: [PATCH 03/10] Delete api.rst --- docs/api.rst | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 docs/api.rst diff --git a/docs/api.rst b/docs/api.rst deleted file mode 100644 index 104a906a..00000000 --- a/docs/api.rst +++ /dev/null @@ -1,22 +0,0 @@ -API Reference -============= - -API reference for pyAML. - -.. autosummary:: - :toctree: api - :caption: Packages: - :recursive: - - pyaml.accelerator - pyaml.arrays - pyaml.bpm - pyaml.common - pyaml.configuration - pyaml.control - pyaml.diagnostics - pyaml.external - pyaml.lattice - pyaml.magnet - pyaml.rf - pyaml.tuning_tools From 8fdb1ad9dec75174fb5e919f52a7b850a08bb92b Mon Sep 17 00:00:00 2001 From: PONS Date: Thu, 12 Feb 2026 07:53:17 +0100 Subject: [PATCH 04/10] Added gen_api.py and setup gitignore --- docs/.gitignore | 2 + docs/Makefile | 6 ++ docs/gen_api.py | 153 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 161 insertions(+) create mode 100644 docs/.gitignore create mode 100644 docs/gen_api.py diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 00000000..47c684ae --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,2 @@ +api.rst +api/* diff --git a/docs/Makefile b/docs/Makefile index 13882759..3f3487b2 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -21,7 +21,13 @@ show: test: Makefile @$(SPHINXBUILD) -M $@ -d "$(BUILDDIR)/doctrees" "$(SOURCEDIR)" "$(HTMLDIR)" $(SPHINXOPTS) $(O) +clean: Makefile + rm api.rst + rm -rf api/* + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile + python gen_api.py @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/gen_api.py b/docs/gen_api.py new file mode 100644 index 00000000..823776db --- /dev/null +++ b/docs/gen_api.py @@ -0,0 +1,153 @@ +import importlib +import inspect +import os +from pathlib import Path + +# List of PyAML modules to include in the API reference +# for i in `find . | grep ".py" | grep -v "cache" | grep -v "__init__"`; +# do echo "\"pyaml.${i:2:-3}\"," | tr '/' '.'; +# done + +modules = [ + "pyaml.accelerator", + "pyaml.arrays.array", + "pyaml.arrays.bpm", + "pyaml.arrays.bpm_array", + "pyaml.arrays.cfm_magnet", + "pyaml.arrays.cfm_magnet_array", + "pyaml.arrays.element", + "pyaml.arrays.element_array", + "pyaml.arrays.magnet", + "pyaml.arrays.magnet_array", + "pyaml.arrays.serialized_magnet", + "pyaml.arrays.serialized_magnet_array", + "pyaml.bpm.bpm", + "pyaml.bpm.bpm_model", + "pyaml.bpm.bpm_simple_model", + "pyaml.bpm.bpm_tiltoffset_model", + "pyaml.common.abstract", + "pyaml.common.abstract_aggregator", + "pyaml.common.constants", + "pyaml.common.element", + "pyaml.common.element_holder", + "pyaml.common.exception", + "pyaml.configuration.csvcurve", + "pyaml.configuration.csvmatrix", + "pyaml.configuration.curve", + "pyaml.configuration.factory", + "pyaml.configuration.fileloader", + "pyaml.configuration.inline_curve", + "pyaml.configuration.inline_matrix", + "pyaml.configuration.matrix", + "pyaml.control.abstract_impl", + "pyaml.control.controlsystem", + "pyaml.control.deviceaccess", + "pyaml.control.deviceaccesslist", + "pyaml.control.readback_value", + "pyaml.diagnostics.chromaticity_monitor", + "pyaml.diagnostics.tune_monitor", + "pyaml.external.pySC_interface", + "pyaml.lattice.abstract_impl", + "pyaml.lattice.attribute_linker", + "pyaml.lattice.element", + "pyaml.lattice.lattice_elements_linker", + "pyaml.lattice.polynom_info", + "pyaml.lattice.simulator", + "pyaml.magnet.cfm_magnet", + "pyaml.magnet.corrector", + "pyaml.magnet.function_mapping", + "pyaml.magnet.hcorrector", + "pyaml.magnet.identity_cfm_model", + "pyaml.magnet.identity_model", + "pyaml.magnet.linear_cfm_model", + "pyaml.magnet.linear_model", + "pyaml.magnet.linear_serialized_model", + "pyaml.magnet.magnet", + "pyaml.magnet.model", + "pyaml.magnet.octupole", + "pyaml.magnet.quadrupole", + "pyaml.magnet.serialized_magnet", + "pyaml.magnet.sextupole", + "pyaml.magnet.skewoctu", + "pyaml.magnet.skewquad", + "pyaml.magnet.skewsext", + "pyaml.magnet.spline_model", + "pyaml.magnet.vcorrector", + "pyaml.rf.rf_plant", + "pyaml.rf.rf_transmitter", + # "pyaml.tuning_tools.LOCO.loco", + # "pyaml.tuning_tools.SOFB.sofb", + "pyaml.tuning_tools.dispersion", + "pyaml.tuning_tools.orbit", + "pyaml.tuning_tools.orbit_response_matrix", + "pyaml.tuning_tools.response_matrix", + "pyaml.tuning_tools.tune", +] + + +def generate_selective_module(m): + # Module introspection + p = importlib.import_module(m) + classes = inspect.getmembers(p, inspect.isclass) + all_cls = [] + for clsname, c in classes: + if c.__module__ == p.__name__: + # ConfigModel at the beginning if present + if "ConfigModel" in clsname: + all_cls.insert(0, c) + else: + all_cls.append(c) + + # Generate mddule + if len(all_cls) > 0: + with open(f"api/{p.__name__}.rst", "w") as file: + title = p.__name__.split(".")[-1:][0] + file.write(f"{title}\n") + file.write("-" * len(title) + "\n\n") + # file.write(" .. rubric:: Classes\n\n") + file.write(f".. automodule:: {p.__name__}\n") + file.write( + f" :exclude-members: {','.join([c.__name__ for c in all_cls])}\n\n" + ) + for c in all_cls: + file.write(f" .. autoclass:: {c.__name__}\n") + file.write(" :members:\n") + file.write(" :exclude-members: model_config\n") + file.write(" :undoc-members:\n") + file.write(" :show-inheritance:\n\n") + + +def generate_toctree(filename: str, title: str, level: int, module: str): + sub_modules = [m for m in modules if m.startswith(module)] + level_path = set([m.split(".")[level + 1 : level + 2][0] for m in sub_modules]) + paths = [] + + with open(f"{filename}", "w") as file: + file.write(f"{title}\n") + file.write("=" * len(title) + "\n\n") + file.write(".. toctree::\n") + + file.write(" :maxdepth: 1\n") + file.write(" :caption: PyAML packages:\n\n") + + for p in level_path: + module_name = module + "." + p + if level == 0: + file.write(f" api/{module_name}\n") + else: + file.write(f" {module_name}\n") + if module_name not in modules: + paths.append(p) + else: + generate_selective_module(module_name) + + return paths + + +# Generate toctrees +paths = generate_toctree("api.rst", "API Reference", 0, "pyaml") +level = 1 +while len(paths) > 0: + for p in paths: + paths = generate_toctree(f"api/{'pyaml.' + p}.rst", f"{p}", level, "pyaml." + p) + level += 1 From 9a20803f846100103031e764d6fba2a2a5934d95 Mon Sep 17 00:00:00 2001 From: PONS Date: Thu, 12 Feb 2026 07:59:54 +0100 Subject: [PATCH 05/10] Fix for empty api dir --- docs/.gitignore | 1 - docs/api/.gitignore | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 docs/api/.gitignore diff --git a/docs/.gitignore b/docs/.gitignore index 47c684ae..8edc9a63 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1,2 +1 @@ api.rst -api/* diff --git a/docs/api/.gitignore b/docs/api/.gitignore new file mode 100644 index 00000000..7fef5d52 --- /dev/null +++ b/docs/api/.gitignore @@ -0,0 +1,2 @@ +# Ignore all files except gitignore +!.gitignore From 763c870fe77ba4aa3d9e4d845de66e62f105583e Mon Sep 17 00:00:00 2001 From: PONS Date: Thu, 12 Feb 2026 08:29:19 +0100 Subject: [PATCH 06/10] Fix for module without classes and docs/make clean --- docs/Makefile | 2 +- docs/api/.gitignore | 3 +-- docs/gen_api.py | 32 ++++++++++++++++++-------------- pyaml/common/constants.py | 22 ++++++++++++++++++++-- 4 files changed, 40 insertions(+), 19 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index 3f3487b2..0ea910a1 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -22,7 +22,7 @@ test: Makefile @$(SPHINXBUILD) -M $@ -d "$(BUILDDIR)/doctrees" "$(SOURCEDIR)" "$(HTMLDIR)" $(SPHINXOPTS) $(O) clean: Makefile - rm api.rst + rm -f api.rst rm -rf api/* @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/api/.gitignore b/docs/api/.gitignore index 7fef5d52..30d85567 100644 --- a/docs/api/.gitignore +++ b/docs/api/.gitignore @@ -1,2 +1 @@ -# Ignore all files except gitignore -!.gitignore +*.rst diff --git a/docs/gen_api.py b/docs/gen_api.py index 823776db..c5c80fdf 100644 --- a/docs/gen_api.py +++ b/docs/gen_api.py @@ -99,27 +99,31 @@ def generate_selective_module(m): all_cls.append(c) # Generate mddule - if len(all_cls) > 0: - with open(f"api/{p.__name__}.rst", "w") as file: - title = p.__name__.split(".")[-1:][0] - file.write(f"{title}\n") - file.write("-" * len(title) + "\n\n") - # file.write(" .. rubric:: Classes\n\n") - file.write(f".. automodule:: {p.__name__}\n") + with open(f"api/{p.__name__}.rst", "w") as file: + title = p.__name__.split(".")[-1:][0] + file.write(f"{title}\n") + file.write("-" * len(title) + "\n\n") + # file.write(" .. rubric:: Classes\n\n") + file.write(f".. automodule:: {p.__name__}\n") + if len(all_cls) > 0: + # Exclude class that will ne treadted by autoclass file.write( f" :exclude-members: {','.join([c.__name__ for c in all_cls])}\n\n" ) - for c in all_cls: - file.write(f" .. autoclass:: {c.__name__}\n") - file.write(" :members:\n") - file.write(" :exclude-members: model_config\n") - file.write(" :undoc-members:\n") - file.write(" :show-inheritance:\n\n") + for c in all_cls: + file.write(f" .. autoclass:: {c.__name__}\n") + file.write(" :members:\n") + file.write(" :exclude-members: model_config\n") + file.write(" :undoc-members:\n") + file.write(" :show-inheritance:\n\n") def generate_toctree(filename: str, title: str, level: int, module: str): sub_modules = [m for m in modules if m.startswith(module)] - level_path = set([m.split(".")[level + 1 : level + 2][0] for m in sub_modules]) + level_path = sorted( + set([m.split(".")[level + 1 : level + 2][0] for m in sub_modules]) + ) + paths = [] with open(f"{filename}", "w") as file: diff --git a/pyaml/common/constants.py b/pyaml/common/constants.py index f6525818..e3bc9ede 100644 --- a/pyaml/common/constants.py +++ b/pyaml/common/constants.py @@ -1,11 +1,29 @@ """ PyAML global constants + +.. data:: HORIZONTAL_KICK_SIGN + + Horizontal kick sign convention for both kick an kick angle (default: -1). + +.. data:: ACTION_APPLY + + Action identifier for callback in measurement tools + Triggered just after exitation has been sent + +.. data:: ACTION_RESTORE + + Action identifier for callback in measurement tools + Triggered just after exitation has been restored + +.. data:: ACTION_MEASURE + + Action identifier for callback in measurement tools + Triggered just after measurement + """ -# Horizontal kick sign convention for both kick an kick angle HORIZONTAL_KICK_SIGN: float = -1.0 -# Action identifier for callback in response matrix measurement ACTION_APPLY: int = 0 ACTION_RESTORE: int = 1 ACTION_MEASURE: int = 2 From 331c4394a03b0043fcd864eaa9cbcbe0d1f90796 Mon Sep 17 00:00:00 2001 From: PONS Date: Thu, 12 Feb 2026 08:36:41 +0100 Subject: [PATCH 07/10] Typo --- docs/gen_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/gen_api.py b/docs/gen_api.py index c5c80fdf..55127f20 100644 --- a/docs/gen_api.py +++ b/docs/gen_api.py @@ -106,7 +106,7 @@ def generate_selective_module(m): # file.write(" .. rubric:: Classes\n\n") file.write(f".. automodule:: {p.__name__}\n") if len(all_cls) > 0: - # Exclude class that will ne treadted by autoclass + # Exclude classes that will be treated by autoclass file.write( f" :exclude-members: {','.join([c.__name__ for c in all_cls])}\n\n" ) From e3ae2fdaa1125240b04aba7f9d7b71b80e77504c Mon Sep 17 00:00:00 2001 From: PONS Date: Thu, 12 Feb 2026 09:07:12 +0100 Subject: [PATCH 08/10] Typo --- docs/gen_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/gen_api.py b/docs/gen_api.py index 55127f20..33275de4 100644 --- a/docs/gen_api.py +++ b/docs/gen_api.py @@ -98,7 +98,7 @@ def generate_selective_module(m): else: all_cls.append(c) - # Generate mddule + # Generate module with open(f"api/{p.__name__}.rst", "w") as file: title = p.__name__.split(".")[-1:][0] file.write(f"{title}\n") From bc70d0013d355c0a162a0730745e503257cbb0f2 Mon Sep 17 00:00:00 2001 From: PONS Date: Thu, 12 Feb 2026 09:48:16 +0100 Subject: [PATCH 09/10] Fixed docstring to avoid duplicate warning in BPM --- docs/gen_api.py | 2 +- pyaml/accelerator.py | 2 +- pyaml/arrays/array.py | 13 +++++++++---- pyaml/arrays/bpm.py | 16 ++++++++++------ pyaml/arrays/bpm_array.py | 14 ++++++++------ 5 files changed, 29 insertions(+), 18 deletions(-) diff --git a/docs/gen_api.py b/docs/gen_api.py index 33275de4..a686f14e 100644 --- a/docs/gen_api.py +++ b/docs/gen_api.py @@ -132,7 +132,7 @@ def generate_toctree(filename: str, title: str, level: int, module: str): file.write(".. toctree::\n") file.write(" :maxdepth: 1\n") - file.write(" :caption: PyAML packages:\n\n") + file.write(f" :caption: {title}:\n\n") for p in level_path: module_name = module + "." + p diff --git a/pyaml/accelerator.py b/pyaml/accelerator.py index 34ecc575..09bf35f9 100644 --- a/pyaml/accelerator.py +++ b/pyaml/accelerator.py @@ -42,7 +42,7 @@ class ConfigModel(BaseModel): Element family description : str , optional Acceleration description - devices : list[Element] + devices : list[.common.element.Element] Element list """ diff --git a/pyaml/arrays/array.py b/pyaml/arrays/array.py index 6f0b0c2b..e3b59b73 100644 --- a/pyaml/arrays/array.py +++ b/pyaml/arrays/array.py @@ -11,12 +11,14 @@ class ArrayConfigModel(BaseModel): """ - Base class for array configuration + Base class for configuration of array of :py:class:`~pyaml.arrays.element.Element`, + :py:class:`~pyaml.arrays.bpm.BPM`, :py:class:`~pyaml.arrays.magnet.Magnet` or + :py:class:`~pyaml.arrays.cfm_magnet.CombinedFunctionMagnet`. Parameters ---------- name : str - Family name + Name of the array elements : list[str] List of pyaml element names """ @@ -37,12 +39,15 @@ def __init__(self, cfg: ArrayConfigModel): def fill_array(self, holder: ElementHolder): """ - Fill array with elements from the holder. + Fill array with elements from the holder and add the array to + the holder. Parameters ---------- holder : ElementHolder - The element holder to populate + The element holder (:py:class:`~pyaml.lattice.simulator.Simulator` + or :py:class:`~pyaml.control.controlsystem.ControlSystem`) to + populate with the array. Raises ------ diff --git a/pyaml/arrays/bpm.py b/pyaml/arrays/bpm.py index 1e5b25e1..0883a378 100644 --- a/pyaml/arrays/bpm.py +++ b/pyaml/arrays/bpm.py @@ -6,12 +6,12 @@ class ConfigModel(ArrayConfigModel): - """Configuration model for BPM array.""" + """Configuration model for :py:class:`.BPMArray`.""" class BPM(ArrayConfig): """ - BPM array configuration + :py:class:`.BPMArray` configuration. Example ------- @@ -27,7 +27,8 @@ class BPM(ArrayConfig): - BPM_C04-02 - BPM_C04-03 - A BPM array configuration can also be created by code using the following example: + A :py:class:`.BPMArray` configuration can also be created by code using the + following example: .. code-block:: python @@ -44,8 +45,11 @@ def __init__(self, cfg: ArrayConfigModel): def fill_array(self, holder: ElementHolder): """ - Fill the :py:class:`.BPMArray` using element holder. This method is called - when an :py:class:`~pyaml.accelerator.Accelerator` is loaded but can be + Fill the :py:class:`.BPMArray` using element holder + (:py:class:`~pyaml.lattice.simulator.Simulator` + or :py:class:`~pyaml.control.controlsystem.ControlSystem`) + and add the array to the holder. This method is called when an + :py:class:`~pyaml.accelerator.Accelerator` is loaded but can be used to create arrays by code as shown bellow: .. code-block:: python @@ -60,6 +64,6 @@ def fill_array(self, holder: ElementHolder): Parameters ---------- holder : ElementHolder - The element holder to populate the BPM array with + The element holder to populate the :py:class:`.BPMArray` with. """ holder.fill_bpm_array(self._cfg.name, self._cfg.elements) diff --git a/pyaml/arrays/bpm_array.py b/pyaml/arrays/bpm_array.py index 48c7866c..ea44abb6 100644 --- a/pyaml/arrays/bpm_array.py +++ b/pyaml/arrays/bpm_array.py @@ -18,7 +18,7 @@ class RWBPMPosition(ReadFloatArray): ---------- name : str Name of the position accessor - bpms : list[BPM] + bpms : list[pyaml.bpm.bpm.BPM] List of BPM objects to access """ @@ -80,7 +80,7 @@ class RWBPMSinglePosition(ReadFloatArray): ---------- name : str Name of the position accessor - bpms : list[BPM] + bpms : list[pyaml.bpm.bpm.BPM] List of BPM objects to access idx : int Index for the position axis (0 for horizontal, 1 for vertical) @@ -134,15 +134,16 @@ def set_aggregator(self, agg: DeviceAccessList): class BPMArray(ElementArray): """ - Class that implements access to a BPM array + Class that implements access to a BPM array. Parameters ---------- arrayName : str Array name - bpms : list[BPM] + bpms : list[pyaml.bpm.bpm.BPM] BPM list, all elements must be attached to the same instance of - either a Simulator or a ControlSystem. + either a (:py:class:`~pyaml.lattice.simulator.Simulator` + or a :py:class:`~pyaml.control.controlsystem.ControlSystem`). use_aggregator : bool Use aggregator to increase performance by using paralell access to underlying devices. @@ -150,7 +151,8 @@ class BPMArray(ElementArray): Example ------- - An array can be retrieved from the configuration as in the following example: + An array can be retrieved from the configuration as in the following + example: .. code-block:: python From 8fdff119a3a3df3705eeb22ff91bd2f42c3fd510 Mon Sep 17 00:00:00 2001 From: PONS Date: Thu, 12 Feb 2026 10:25:12 +0100 Subject: [PATCH 10/10] Added progress for API generation --- docs/gen_api.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/docs/gen_api.py b/docs/gen_api.py index a686f14e..f462259b 100644 --- a/docs/gen_api.py +++ b/docs/gen_api.py @@ -1,6 +1,6 @@ import importlib import inspect -import os +import sys from pathlib import Path # List of PyAML modules to include in the API reference @@ -86,6 +86,10 @@ def generate_selective_module(m): + # Display a progress + sys.stdout.write(".") + sys.stdout.flush() + # Module introspection p = importlib.import_module(m) classes = inspect.getmembers(p, inspect.isclass) @@ -149,9 +153,16 @@ def generate_toctree(filename: str, title: str, level: int, module: str): # Generate toctrees +sys.stdout.write("Generating API") +sys.stdout.flush() paths = generate_toctree("api.rst", "API Reference", 0, "pyaml") level = 1 while len(paths) > 0: + npaths = [] for p in paths: - paths = generate_toctree(f"api/{'pyaml.' + p}.rst", f"{p}", level, "pyaml." + p) + npaths.extend( + generate_toctree(f"api/{'pyaml.' + p}.rst", f"{p}", level, "pyaml." + p) + ) + paths = npaths level += 1 +print("done")