Skip to content

Commit

Permalink
feat: added project-metadata file and used jinja syntax in rst files (#…
Browse files Browse the repository at this point in the history
…761)

* feat: added project-metadata file and used jinja syntax in rst files

* fix: minor correction to conf.py

* fix: applied review comments

* fix: applied review comments

* fix: applied review comments

---------

Co-authored-by: Roberto Pastor Muela <[email protected]>
  • Loading branch information
moe-ad and RobPasMue authored Nov 20, 2024
1 parent bdb1958 commit 2ae3f8e
Show file tree
Hide file tree
Showing 8 changed files with 457 additions and 815 deletions.
2 changes: 1 addition & 1 deletion doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ pdf:
(test -f $(BUILDDIR)/latex/pyansys.pdf && echo pdf exists) || exit 1

clean:
rm -rf build
rm -rf $(BUILDDIR)
193 changes: 9 additions & 184 deletions doc/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,190 +18,15 @@ reference section. In order to navigate through them, please refer to their docu
PyAnsys packages API reference
******************************

.. grid:: 3
:gutter: 3 3 4 4
.. jinja:: project_context

.. grid-item-card:: PyACP
:img-top: _static/thumbnails/pyacp.png
:link: https://acp.docs.pyansys.com/version/dev/api/index.html
:class-title: pyansys-card-title
.. grid:: 3
:gutter: 3 3 4 4

.. grid-item-card:: PyAdditive
:img-top: _static/thumbnails/intro.png
:link: https://additive.docs.pyansys.com/version/stable/api/index.html
:class-title: pyansys-card-title
{% for project, metadata in projects['projects'].items() %}
.. grid-item-card:: {{ metadata['name'] }}
:img-top: {{ metadata['thumbnail'] }}
:link: {{ metadata['documentation']['api'] }}
:class-title: pyansys-card-title

.. grid-item-card:: PyAdditive Widgets
:img-top: _static/thumbnails/intro.png
:link: https://widgets.additive.docs.pyansys.com/version/stable/api/index.html
:class-title: pyansys-card-title

.. grid-item-card:: PyAEDT
:img-top: _static/thumbnails/pyaedt.png
:link: https://aedt.docs.pyansys.com/version/stable/API/index.html
:class-title: pyansys-card-title

.. grid-item-card:: PyAnsys Geometry
:img-top: _static/thumbnails/pyansys-geometry.png
:link: https://geometry.docs.pyansys.com/version/stable/api/index.html
:class-title: pyansys-card-title

.. grid-item-card:: PyAnsys Math
:img-top: _static/thumbnails/pyansys-math.png
:link: https://math.docs.pyansys.com/version/stable/api/index.html
:class-title: pyansys-card-title

.. grid-item-card:: PyAnsys Sound
:img-top: _static/thumbnails/pyansys-sound.png
:link: https://sound.docs.pyansys.com/version/stable/api/index.html
:class-title: pyansys-card-title

.. grid-item-card:: PyConceptEV
:img-top: _static/thumbnails/pyconceptev.png
:link: https://conceptev.docs.pyansys.com/version/stable/api_ref.html
:class-title: pyansys-card-title

.. grid-item-card:: PyDPF - Core
:img-top: _static/thumbnails/pydpf-core.png
:link: https://dpf.docs.pyansys.com/version/stable/api/index.html
:class-title: pyansys-card-title

.. grid-item-card:: PyDPF - Post
:img-top: _static/thumbnails/pydpf-post.png
:link: https://post.docs.pyansys.com/version/stable/api/index.html
:class-title: pyansys-card-title

.. grid-item-card:: PyDPF - Composites
:img-top: _static/thumbnails/pydpf-composites.png
:link: https://composites.dpf.docs.pyansys.com/version/stable/api/index.html
:class-title: pyansys-card-title

.. grid-item-card:: PyDyna
:img-top: _static/thumbnails/pydyna.png
:link: https://dyna.docs.pyansys.com/version/stable/autoapi/index.html
:class-title: pyansys-card-title

.. grid-item-card:: PyDynamicReporting
:img-top: _static/thumbnails/pydynamicreporting.png
:link: https://dynamicreporting.docs.pyansys.com/version/stable/class_documentation.html
:class-title: pyansys-card-title

.. grid-item-card:: PyEDB
:img-top: _static/thumbnails/pyedb.png
:link: https://edb.docs.pyansys.com/version/stable/api/index.html
:class-title: pyansys-card-title

.. grid-item-card:: PyEDB - Core
:img-top: _static/thumbnails/pyedb.png
:link: https://edb.core.docs.pyansys.com/version/stable/api/index.html
:class-title: pyansys-card-title

.. grid-item-card:: PyEnSight
:img-top: _static/thumbnails/pyensight.png
:link: https://ensight.docs.pyansys.com/version/stable/class_documentation.html
:class-title: pyansys-card-title

.. grid-item-card:: PyFluent
:img-top: _static/thumbnails/pyfluent.png
:link: https://fluent.docs.pyansys.com/version/stable/api/index.html
:class-title: pyansys-card-title

.. grid-item-card:: PyFluent - Visualization
:img-top: _static/thumbnails/pyfluent-visualization.png
:link: https://visualization.fluent.docs.pyansys.com/version/stable/api/index.html
:class-title: pyansys-card-title

.. grid-item-card:: PyGranta
:img-top: _static/thumbnails/pygranta.png
:link: https://grantami.docs.pyansys.com/version/stable/api.html
:class-title: pyansys-card-title

.. grid-item-card:: PyHPS
:img-top: _static/thumbnails/intro.png
:link: https://hps.docs.pyansys.com/version/stable/api/index.html
:class-title: pyansys-card-title

.. grid-item-card:: PyMAPDL
:img-top: _static/thumbnails/pymapdl.png
:link: https://mapdl.docs.pyansys.com/version/stable/api/index.html
:class-title: pyansys-card-title

.. grid-item-card:: PyMAPDL Reader
:img-top: _static/thumbnails/pymapdl.png
:link: https://reader.docs.pyansys.com/version/stable/api/index.html
:class-title: pyansys-card-title

.. grid-item-card:: PyMechanical
:img-top: _static/thumbnails/pymechanical.png
:link: https://mechanical.docs.pyansys.com/version/stable/api/index.html
:class-title: pyansys-card-title

.. grid-item-card:: PyModelCenter
:img-top: _static/thumbnails/pymodelcenter.png
:link: https://modelcenter.docs.pyansys.com/version/stable/api/index.html
:class-title: pyansys-card-title

.. grid-item-card:: PyMotorCAD
:img-top: _static/thumbnails/pymotorcad.png
:link: https://motorcad.docs.pyansys.com/version/stable/methods/index.html
:class-title: pyansys-card-title

.. grid-item-card:: PyOptislang
:img-top: _static/thumbnails/pyoptislang.png
:link: https://optislang.docs.pyansys.com/version/stable/api/index.html
:class-title: pyansys-card-title

.. grid-item-card:: PyPIM
:img-top: _static/thumbnails/intro.png
:link: https://pypim.docs.pyansys.com/version/stable/api/index.html
:class-title: pyansys-card-title

.. grid-item-card:: PyPrimeMesh
:img-top: _static/thumbnails/pyprimemesh.png
:link: https://prime.docs.pyansys.com/version/stable/api/index.html
:class-title: pyansys-card-title

.. grid-item-card:: PyRocky
:img-top: _static/thumbnails/pyrocky.png
:link: https://rocky.docs.pyansys.com/version/stable/api/index.html
:class-title: pyansys-card-title

.. grid-item-card:: PySeascape
:img-top: _static/thumbnails/intro.png
:link: https://seascape.docs.pyansys.com/version/stable/#usage
:class-title: pyansys-card-title

.. grid-item-card:: PySherlock
:img-top: _static/thumbnails/pysherlock.png
:link: https://sherlock.docs.pyansys.com/version/stable/api/index.html
:class-title: pyansys-card-title

.. grid-item-card:: PySimAI
:img-top: _static/thumbnails/pysimai.png
:link: https://simai.docs.pyansys.com/version/stable/api_reference.html
:class-title: pyansys-card-title

.. grid-item-card:: PySystemCoupling
:img-top: _static/thumbnails/pysystem-coupling.png
:link: https://systemcoupling.docs.pyansys.com/version/stable/api/index.html
:class-title: pyansys-card-title

.. grid-item-card:: PyTurboGrid
:img-top: _static/thumbnails/pyturbogrid.png
:link: https://turbogrid.docs.pyansys.com/version/stable/api_reference/index.html
:class-title: pyansys-card-title

.. grid-item-card:: PyTwin
:img-top: _static/thumbnails/pytwin.png
:link: https://twin.docs.pyansys.com/version/stable/api/index.html
:class-title: pyansys-card-title

.. grid-item-card:: PyWorkbench
:img-top: _static/thumbnails/intro.png
:link: https://workbench.docs.pyansys.com/version/stable/api/index.html
:class-title: pyansys-card-title

.. grid-item-card:: Shared Components - OpenAPI Common
:img-top: _static/thumbnails/intro.png
:link: https://openapi.docs.pyansys.com/version/stable/api/index.html
:class-title: pyansys-card-title
{% endfor %}
14 changes: 10 additions & 4 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import sphinx
from sphinx.builders.latex import LaTeXBuilder
import toml
import yaml

from pyansys import __version__ as pyansys_version

Expand Down Expand Up @@ -73,8 +74,15 @@
"sphinx_design",
"sphinx_copybutton",
"sphinxcontrib.mermaid",
"sphinx_jinja",
]

metadata = Path(__file__).parent.parent.parent / "projects.yaml"

jinja_contexts = {
"project_context": {"projects": yaml.safe_load(metadata.read_text(encoding="utf-8"))}
}

html_context = {
"github_user": "ansys",
"github_repo": "pyansys",
Expand Down Expand Up @@ -129,11 +137,9 @@
"links.rst",
]

# make rst_epilog a variable, so you can add other epilog parts to it
rst_epilog = ""
# Read link all targets from file
with Path.open("links.rst") as file:
rst_epilog += file.read()
path_to_links_rst = Path(__file__).parent / "links.rst"
rst_epilog = path_to_links_rst.read_text(encoding="utf-8")

# Ignore certain URLs
linkcheck_ignore = [
Expand Down
Loading

0 comments on commit 2ae3f8e

Please sign in to comment.