Skip to content

Commit

Permalink
Add documentation to the project
Browse files Browse the repository at this point in the history
  • Loading branch information
jhillairet committed Nov 17, 2024
1 parent 0c5a3c9 commit e9e3979
Show file tree
Hide file tree
Showing 15 changed files with 292 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ build:

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
configuration: doc/conf.py
6 changes: 3 additions & 3 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
SOURCEDIR = ./
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help clean Makefile
.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

clean:
-rm -rf $(BUILDDIR)/*

File renamed without changes.
File renamed without changes.
60 changes: 60 additions & 0 deletions doc/api/generated/west_ic_antenna.antenna.WestIcrhAntenna.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
west\_ic\_antenna.antenna.WestIcrhAntenna
=========================================

.. currentmodule:: west_ic_antenna.antenna

.. autoclass:: WestIcrhAntenna


.. automethod:: __init__


.. rubric:: Methods

.. autosummary::

~WestIcrhAntenna.Pr
~WestIcrhAntenna.Rc
~WestIcrhAntenna.Rc_WEST
~WestIcrhAntenna.Z_T
~WestIcrhAntenna.__init__
~WestIcrhAntenna.b
~WestIcrhAntenna.capa
~WestIcrhAntenna.capacitor_predictor
~WestIcrhAntenna.capacitor_velocities
~WestIcrhAntenna.circuit
~WestIcrhAntenna.currents
~WestIcrhAntenna.currents_WEST
~WestIcrhAntenna.error_signals
~WestIcrhAntenna.front_face_Rc
~WestIcrhAntenna.interpolate_front_face
~WestIcrhAntenna.load
~WestIcrhAntenna.match_both_sides
~WestIcrhAntenna.match_both_sides_iterative
~WestIcrhAntenna.match_both_sides_separately
~WestIcrhAntenna.match_one_side
~WestIcrhAntenna.optimum_frequency
~WestIcrhAntenna.optimum_frequency_index
~WestIcrhAntenna.s_act
~WestIcrhAntenna.s_act_db
~WestIcrhAntenna.swit_abcd
~WestIcrhAntenna.voltages
~WestIcrhAntenna.vswr_act
~WestIcrhAntenna.z_T
~WestIcrhAntenna.z_act
~WestIcrhAntenna.z_coupler





.. rubric:: Attributes

.. autosummary::

~WestIcrhAntenna.Cs
~WestIcrhAntenna.f
~WestIcrhAntenna.f_scaled
~WestIcrhAntenna.frequency


34 changes: 34 additions & 0 deletions doc/api/generated/west_ic_antenna.topica.TopicaResult.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
west\_ic\_antenna.topica.TopicaResult
=====================================

.. currentmodule:: west_ic_antenna.topica

.. autoclass:: TopicaResult


.. automethod:: __init__


.. rubric:: Methods

.. autosummary::

~TopicaResult.Rc
~TopicaResult.__init__
~TopicaResult.to_network
~TopicaResult.write_touchstone





.. rubric:: Attributes

.. autosummary::

~TopicaResult.raw_data
~TopicaResult.s
~TopicaResult.z
~TopicaResult.z0


13 changes: 13 additions & 0 deletions doc/api/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.. _api:


API
=========

.. toctree::
:maxdepth: 1


antenna
topica
digital_twin
File renamed without changes.
78 changes: 78 additions & 0 deletions doc/api/west_ic_antenna.digital_twin.DigitalTwin.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
west\_ic\_antenna.digital\_twin.DigitalTwin
===========================================

.. currentmodule:: west_ic_antenna.digital_twin

.. autoclass:: DigitalTwin


.. automethod:: __init__


.. rubric:: Methods

.. autosummary::

~DigitalTwin.__init__
~DigitalTwin.add_class
~DigitalTwin.add_traits
~DigitalTwin.blur
~DigitalTwin.class_own_trait_events
~DigitalTwin.class_own_traits
~DigitalTwin.class_trait_names
~DigitalTwin.class_traits
~DigitalTwin.close
~DigitalTwin.close_all
~DigitalTwin.focus
~DigitalTwin.get_manager_state
~DigitalTwin.get_state
~DigitalTwin.get_view_spec
~DigitalTwin.handle_comm_opened
~DigitalTwin.handle_control_comm_opened
~DigitalTwin.has_trait
~DigitalTwin.hold_sync
~DigitalTwin.hold_trait_notifications
~DigitalTwin.notify_change
~DigitalTwin.observe
~DigitalTwin.on_msg
~DigitalTwin.on_trait_change
~DigitalTwin.on_widget_constructed
~DigitalTwin.open
~DigitalTwin.remove_class
~DigitalTwin.send
~DigitalTwin.send_state
~DigitalTwin.set_state
~DigitalTwin.set_trait
~DigitalTwin.setup_instance
~DigitalTwin.trait_defaults
~DigitalTwin.trait_events
~DigitalTwin.trait_has_value
~DigitalTwin.trait_metadata
~DigitalTwin.trait_names
~DigitalTwin.trait_values
~DigitalTwin.traits
~DigitalTwin.unobserve
~DigitalTwin.unobserve_all





.. rubric:: Attributes

.. autosummary::

~DigitalTwin.box_style
~DigitalTwin.children
~DigitalTwin.comm
~DigitalTwin.cross_validation_lock
~DigitalTwin.keys
~DigitalTwin.layout
~DigitalTwin.log
~DigitalTwin.model_id
~DigitalTwin.tabbable
~DigitalTwin.tooltip
~DigitalTwin.widget_types
~DigitalTwin.widgets


63 changes: 63 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'WEST IC Antenna'
copyright = '2024, Julien Hillairet'
author = 'Julien Hillairet'

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
sys.path.insert(0, os.path.abspath('..'))
sys.setrecursionlimit(1500)


# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
"nbsphinx",
"sphinx.ext.mathjax",
"sphinx.ext.autodoc",
"sphinx.ext.autosectionlabel",
"sphinx.ext.autosummary",
"sphinx.ext.napoleon",
"sphinx.ext.viewcode",
]

templates_path = ['_templates']
exclude_patterns = ['_build', '**.ipynb_checkpoints', 'Thumbs.db', '.DS_Store']
# exclude some notebooks not yet ready to be converted into html
exclude_files = [
#'chart_strap_reactance.ipynb',
#'chart_manual_matching.ipynb',
'coupling_to_ideal_load.ipynb',
'coupling_to_plasma_from_COMSOL.ipynb',
'coupling_to_plasma_from_TOPICA.ipynb',
'coupling_to_water_tank.ipynb',
'digital_twin.ipynb',
#'introduction.ipynb',
'phase_scan.ipynb',
'Plasma Startup.ipynb',
#'tutorial_matching_automatic.ipynb',
#'tutorial_matching_manual.ipynb'
]
for file in exclude_files:
exclude_patterns.append(file)


# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = "sphinx_rtd_theme"
html_static_path = ['_static']

nbsphinx_allow_errors = True
17 changes: 17 additions & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.. WEST IC Antenna documentation master file
WEST IC Antenna documentation
=============================

Welcome to the documentation pages of the WEST IC Antenna RF model.

.. toctree::
:maxdepth: 2
:caption: Contents

introduction.ipynb
tutorial_matching_manual.ipynb
tutorial_matching_automatic.ipynb
chart_strap_reactance.ipynb
chart_manual_matching.ipynb
api/index.rst
6 changes: 4 additions & 2 deletions doc/introduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"metadata": {
"jp-MarkdownHeadingCollapsed": true
},
"source": [
"# WEST ICRH Antenna RF Model\n",
"# Introduction\n",
"## The WEST ICRH antennas \n",
"Three identical ELM-resilient and CW power ICRH antennas have been designed for WEST. The ELM resilience property is obtained through an internal conjugate-T electrical scheme with series capacitors. An antenna has 4 straps (2 toroidal x 2 poloidal) and is fed by 2 generators (left side and right side). Each antenna is equipped with four internal COMET® tuneable vacuum capacitors, with capacitances ranging from 15 pF to 150 pF and specifically upgraded for CW operation. A two-stage quarter-wavelength and water cooled impedance transformer is connected from the T-junction to the vacuum feedthrough.\n",
"\n",
Expand Down
8 changes: 4 additions & 4 deletions doc/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set SOURCEDIR=./
set BUILDDIR=build

if "%1" == "" goto help

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
Expand All @@ -21,10 +19,12 @@ if errorlevel 9009 (
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

Expand Down
2 changes: 1 addition & 1 deletion doc/tutorial_matching_automatic.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.7"
"version": "3.11.9"
}
},
"nbformat": 4,
Expand Down
16 changes: 14 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ license = {text="LICENSE"}
dependencies = [
"ipywidgets>=8.1.5",
"matplotlib>=3.9.2",
"networkx>=3.4.2",
"numpy>=2.1.3",
"pytest>=8.3.3",
"scikit-rf>=1.4.1",
"tqdm>=4.67.0",
]
Expand All @@ -18,4 +18,16 @@ dependencies = [
license-files = ["LICENSE"]

[tool.setuptools.dynamic]
version = {attr = "west_ic_antenna.__version__"}
version = {attr = "west_ic_antenna.__version__"}

[dependency-groups]
test = [
"pytest>=8.3.3",
]
doc = [
"ipykernel>=6.29.5",
"nbsphinx>=0.9.5",
"sphinx-rtd-theme>=3.0.2",
"sphinx>=8.1.3",
]

0 comments on commit e9e3979

Please sign in to comment.