Skip to content

Commit

Permalink
Merge pull request #347 from fusion-energy/imporved-docs
Browse files Browse the repository at this point in the history
Imporved docs
  • Loading branch information
shimwell authored Oct 12, 2024
2 parents e29dd7c + f51578b commit 25191c0
Show file tree
Hide file tree
Showing 13 changed files with 153 additions and 16 deletions.
31 changes: 31 additions & 0 deletions docs/_static/api.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/favicon.ico
Binary file not shown.
31 changes: 31 additions & 0 deletions docs/_static/getting_started.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions docs/_static/paramak.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.sd-card .sd-card-img-top {
height: 60px;
width: 60px;
margin-left: auto;
margin-right: auto;
margin-top: 10px;
}

/* Main index page overview images */

html[data-theme=dark] .sd-card img[src*='.svg'] {
filter: invert(0.82) brightness(0.8) contrast(1.2);
}
1 change: 1 addition & 0 deletions docs/_static/user_guide.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 13 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


project = "Paramak"
copyright = "2024, J. Shimwell"
copyright = "2024, Fusion Energy"
author = "J. Shimwell"

import paramak
Expand All @@ -34,6 +34,7 @@
"sphinx.ext.doctest",
"sphinx.ext.viewcode",
"sphinxcadquery.sphinxcadquery",
"sphinx_design",
]

templates_path = ["_templates"]
Expand All @@ -45,7 +46,7 @@

html_theme = "pydata_sphinx_theme"
html_static_path = ["_static"]

html_css_files = ["paramak.css"]

# TODO add logo
# html_favicon = "favicon.ico"
Expand All @@ -61,10 +62,20 @@
version_match = version

html_theme_options = {
# "primary_sidebar_end": ["sidebar-nav-bs"],
"github_url": "https://github.com/fusion-energy/paramak",
"switcher": {
"json_url": "https://raw.githubusercontent.com/fusion-energy/paramak/main/docs/version_switcher.json",
"version_match": version_match,
},
"navbar_start": ["version-switcher", "navbar-icon-links"],
"show_nav_level": 3,
"collapse_navigation": True,
"show_version_warning_banner": True,
}
html_sidebars = {
"**": ["sidebar-nav-bs"]
}

html_favicon = '_static/favicon.ico'
master_doc = "index"
10 changes: 5 additions & 5 deletions docs/usage.rst → docs/examples.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Usage
=====
Examples
========

There are two main reactors to choose from:

Expand All @@ -25,7 +25,7 @@ These examples show how to make various reactors with different options.
.. toctree::
:maxdepth: 3

usage_vis
usage_tokamak
usage_spherical_tokamak
examples_vis
examples_tokamak
examples_spherical_tokamak

File renamed without changes.
File renamed without changes.
File renamed without changes.
62 changes: 57 additions & 5 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,70 @@
Paramak documentation
=====================



**Version**: |version|


.. toctree::
:maxdepth: 3
:caption: Contents:
:hidden:

install
examples
python_api

Parameter driven CAD creation for fusion reactors.

Paramak provides parameter driven creation of Tokamak and Spherical Tokamak CAD models as well as DAGMC compatible neutronics models.

The style of reaction, sizes of components, plasma shape and number of radial or vertical layers can be specified,


.. toctree::
:maxdepth: 3

install
usage
python_api
.. grid:: 12 12 3 3
:gutter: 2

.. grid-item-card::
:img-top: _static/getting_started.svg
:text-align: center

Installation
^^^

.. button-ref:: install
:expand:
:color: secondary
:click-parent:

To the installation guide

.. grid-item-card::
:img-top: _static/user_guide.svg
:text-align: center

Examples
^^^

.. button-ref:: examples
:expand:
:color: secondary
:click-parent:

To the examples

.. grid-item-card::
:img-top: _static/api.svg
:text-align: center

API reference
^^^

.. button-ref:: python_api
:expand:
:color: secondary
:click-parent:

To the reference guide

3 changes: 0 additions & 3 deletions docs/python_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@ Assemblies
----------

.. autofunction:: tokamak

.. autofunction:: tokamak_from_plasma

.. autofunction:: spherical_tokamak

.. autofunction:: spherical_tokamak_from_plasma

Workplanes
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ docs = [
"sphinx",
"pydata-sphinx-theme",
"cadquery",
"ipython"
"ipython",
"sphinx_design"
]

[tool.black]
Expand Down

0 comments on commit 25191c0

Please sign in to comment.