Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create documentation #15

Merged
merged 14 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
timeout-minutes: 5
run: |
.\.venv\Scripts\Activate.ps1
pytest -v -m backend\tests_common_api --cov
pytest -v -m common --cov

# - name: AEDT Test
# timeout-minutes: 5
Expand Down
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ exclude: |
(?x)(
src/ansys/aedt/toolkits/common/ui/utils/ui_templates/.* |
tests/input_data/.* |
examples/.*
examples/.* |
README.rst
)

repos:
Expand Down
34 changes: 25 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AEDT common toolkit
===================
PyAEDT Common Toolkit
=====================

|pyansys| |PythonVersion| |GH-CI| |MIT| |coverage| |black|

Expand All @@ -24,22 +24,38 @@ AEDT common toolkit
:alt: black


The ``ansys-aedt-toolkits-template`` package provides a template to create your own toolkit using PyAEDT.
The toolkit could be used inside AEDT or launched from a python console.
Toolkit features should be accessible from the user interface or directly from the API.
The ``pyaedt-toolkits-common`` package provides common methods to create a new toolkit using PyAEDT.
This package has two main parts: backend and user interface.

The backend has some common methods to control Ansys Electronics Desktop (AEDT) session, and in addition,
it has a REST API based on `Flask <https://flask.palletsprojects.com/en/2.3.x/>`_.

The user interface has some common methods to create a desktop application based on `Pyside6 <https://doc.qt.io/qtforpython-6/quickstart.html>`_.

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

.. code:: python

pip install pyaedt-toolkits-common[all]

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

.. code:: python

pip install pyaedt-toolkits-common


Requirements
~~~~~~~~~~~~
In addition to the runtime dependencies listed in the installation information, this toolkit
requires Ansys Electronics Desktop (AEDT) 2022 R2 or later. The AEDT Student Version is also supported.
requires Ansys Electronics Desktop (AEDT) 2023 R2 or later. The AEDT Student Version is also supported.

Documentation and issues
~~~~~~~~~~~~~~~~~~~~~~~~
In addition to installation and wizard information, the toolkit
documentation provides `API reference <https://aedt.toolkit.common.docs.pyansys.com/version/dev/Toolkit/index.html>`_ and `Contribute <https://aedt.toolkit.common.docs.pyansys.com/version/dev/Contributing.html>`_ sections.
The documentation provides the `API reference <https://aedt.toolkit.common.docs.pyansys.com/version/dev/Toolkit/index.html>`_ to create a new toolkit,
you can also find a `Toolkit example <https://github.com/ansys-internal/pyaedt-toolkits-common/tree/main/examples/toolkit/pyaedt_toolkit>`_.

On the `Issues <https://github.com/ansys/pyaedt-toolkits-common/issues>`_ page, you can
On the `Common Toolkit Issues <https://github.com/ansys-internal/pyaedt-toolkits-common/issues>`_ page, you can
create issues to submit questions, report bugs, and request new features.

License
Expand Down
12 changes: 6 additions & 6 deletions doc/source/Contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,27 @@ development mode, run these commands:

.. code::

git clone https://github.com/ansys/pymotorcad-pyaedt-toolkit.git
cd pymotorcad-pyaedt-toolkit
git clone https://github.com/ansys-internal/pyaedt-toolkits-common.git
cd pyaedt-toolkits-common
python -m pip install --upgrade pip
pip install -e .
pip install -e .[all]

Post issues
-----------
Use the `Motor Segmentation Toolkit Issues <https://github.com/ansys/pymotorcad-pyaedt-toolkit/issues>`_ page
Use the `PyAEDT Common Toolkit Issues <https://github.com/ansys/pyaedt-toolkits-common/issues>`_ page
to create issues to report bugs and request new features.

View documentation
-------------------
Documentation for the latest stable release is hosted at `Common PyAEDT Toolkit documentation <https://aedt.common.toolkit.docs.pyansys.com/version/stable/>`_.
Documentation for the latest stable release is hosted at `PyAEDT Common Toolkit documentation <https://aedt.common.toolkit.docs.pyansys.com/version/stable/>`_.

In the upper right corner of the documentation’s title bar, there is an option for switching from viewing
the documentation for the latest stable release to viewing the documentation for the development version
or previously released versions.

Adhere to code style
--------------------
The Motor Segmentation Toolkit is compliant with `PyAnsys code style
The Common Toolkit is compliant with `PyAnsys code style
<https://dev.docs.pyansys.com/coding-style/index.html>`_. It uses the tool
`pre-commit <https://pre-commit.com/>`_ to select the code style.

Expand Down
10 changes: 10 additions & 0 deletions doc/source/Getting_Started/Architecture.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. _ref_toolkit_architecture:

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

The architecture is defined in the following picture:

.. image:: ../_static/toolkit_architecture.png
:width: 800
:alt: Toolkit architecture
2 changes: 2 additions & 0 deletions doc/source/Getting_Started/Installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Installation
============
35 changes: 35 additions & 0 deletions doc/source/Getting_Started/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
.. _ref_getting_started:

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

If you want to develop a new toolkit, you need first to understand the 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 split 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 frontend, 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.

If you need more information, go to :ref:`ref_toolkit_architecture`.


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

Architecture
Installation
181 changes: 0 additions & 181 deletions doc/source/Getting_started.rst

This file was deleted.

Loading
Loading