Skip to content

Commit

Permalink
Merge pull request #39 from ansys-internal/fix_thumbnail1
Browse files Browse the repository at this point in the history
Fix thumbnail1
  • Loading branch information
Samuelopez-ansys authored Feb 20, 2024
2 parents f07a11d + 0868518 commit 08bf273
Show file tree
Hide file tree
Showing 9 changed files with 90 additions and 29 deletions.
Binary file added doc/source/_static/thumbnails/box.png
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 doc/source/_static/thumbnails/layout.png
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 doc/source/_static/thumbnails/waveguide.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 3 additions & 25 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@

nbsphinx_thumbnails = {
"examples/aedt_common/api_aedt_simple": "_static/thumbnails/coaxial.png",
"examples/aedt_common/api_aedt_open_project": "_static/thumbnails/box.png",
"examples/aedt_common/api_aedt_connect_session": "_static/thumbnails/waveguide.png",
"examples/edb_common/api_edb": "_static/thumbnails/layout.png",
"examples/properties_common/api_properties": "_static/thumbnails/book.png",
}

Expand All @@ -180,31 +183,6 @@
"examples/properties_common/models.py",
]

# if os.name != "posix":
# extensions.append("sphinx_gallery.gen_gallery")

# sphinx_gallery_conf = {
# # # convert rst to md for ipynb
# "pypandoc": True,
# # path to your examples scripts
# "examples_dirs": ["../../examples/"],
# # path where to save gallery generated examples
# "gallery_dirs": ["examples"],
# # Pattern to search for examples files
# "filename_pattern": r"\.py",
# # Remove the "Download all examples" button from the top level gallery
# "download_all_examples": False,
# # Sort gallery examples by file name instead of number of lines (default)
# "within_subsection_order": FileNameSortKey,
# # directory where function granular galleries are stored
# "backreferences_dir": None,
# # Modules for which function level galleries are created. In
# "doc_module": "ansys-legacy",
# "ignore_pattern": "flycheck*",
# "thumbnail_size": (350, 350),
# }


# -- Options for LaTeX output ------------------------------------------------

# additional logos for the latex coverage
Expand Down
2 changes: 1 addition & 1 deletion doc/source/examples/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ Common API examples.

REST API
~~~~~~~~
Find here a `REST API example <https://github.com/ansys-internal/pyaedt-toolkits-common>`_.
Find here a `REST API example <https://github.com/ansys-internal/pyaedt-toolkits-common/blob/main/examples/backend/rest_api_aedt_example.py>`_.
29 changes: 29 additions & 0 deletions doc/source/getting_started/architecture.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
.. _architecture:

Architecture
============

This repository is a common API for any new AEDT toolkit. It standardizes AEDT toolkits implementation.

The API provides some methods to connect to an existing AEDT session, open an existing
AEDT project or initialize a new AEDT session, which should be the basic capability of any toolkit.

The architecture is divided in two main parts:


1. The backend, using `Flask <https://flask.palletsprojects.com/en/2.3.x/>`_. Flask creates a REST API,
which let interact different services by simply doing HTTP requests.

2. The user interface, using `Pyside6 <https://doc.qt.io/qtforpython-6/quickstart.html>`_. Pyside6 has a designer tool
which allows to create user interfaces and it is translated to python directly.

Using Flask, the toolkit becomes interface agnostic, then you can decide change it and use a WebUI for instance
as user interface.

You can install the library like any other open source package. You can add this project as a dependency of the new toolkit.

The architecture is defined in the following picture:

.. image:: ../_static/toolkit_architecture.png
:width: 800
:alt: Toolkit architecture
39 changes: 39 additions & 0 deletions doc/source/getting_started/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
.. _getting_started:

===============
Getting started
===============

If you want to develop a new toolkit, you need first to learn how the :ref:`architecture` works.

.. grid:: 2

.. grid-item-card:: Architecture :fa:`person-running`
:padding: 2 2 2 2
:link: architecture
:link-type: doc

Learn more about the toolkit architecture.

.. grid-item-card:: Installation :fa:`book-bookmark`
:padding: 2 2 2 2
:link: installation
:link-type: doc

Learn how to install the common library.

.. grid-item-card:: Example toolkit :fa:`scroll`
:padding: 2 2 2 2
:link: example_toolkit
:link-type: doc

Example toolkit using the common methods.


.. toctree::
:hidden:
:maxdepth: 2

architecture
installation
example_toolkit
15 changes: 15 additions & 0 deletions doc/source/getting_started/installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.. _installation:

Installation
============

If you want to use this library for a toolkit or workflow, you can install the backend standalone or
install backend and user interface common methods.

You can install both backend and user interface methods from PyPI::

pip -m install git+https://github.com/ansys-internal/pyaedt-toolkits-common.git[all]

You can install only the backend methods from PyPI, this is useful if you only need the common API::

pip -m install git+https://github.com/ansys-internal/pyaedt-toolkits-common.git
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ tests = [
"flask",
]
doc = [
"ansys-sphinx-theme==0.13.1",
"ansys-sphinx-theme==0.14.0",
"numpydoc==1.6.0",
"recommonmark==0.7.1",
"sphinx==7.2.6",
"sphinx-copybutton==0.5.2",
"enum-tools[sphinx]==0.11.0",
"sphinx-autoapi==3.0.0",
"sphinx-autobuild==2021.3.14",
"sphinx-autodoc-typehints==1.25.2",
"sphinx-autobuild==2024.2.4",
"sphinx-autodoc-typehints==2.0.0",
"sphinx-notfound-page==1.0.0",
"nbsphinx==0.9.3",
"sphinx_design",
Expand Down

0 comments on commit 08bf273

Please sign in to comment.