Skip to content

New tutorials section #1876

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

Open
wants to merge 37 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
4450156
new tutorials layout
luisaFelixSalles Oct 21, 2024
d42da98
user guide index page with tutorials
luisaFelixSalles Oct 22, 2024
dbfea2e
add new basic tutorial and jupyter_ sphinx extension
luisaFelixSalles Oct 22, 2024
c110330
add new basic tutorial in the sidebar
luisaFelixSalles Oct 22, 2024
043e864
add new fundamentals tutorial page
luisaFelixSalles Oct 22, 2024
337caa6
reorganizing
luisaFelixSalles Oct 22, 2024
a10b628
add fundamentals and usage tutorials and their sections
luisaFelixSalles Oct 23, 2024
aca0c7e
add more required tutorials
luisaFelixSalles Nov 7, 2024
cc614ea
folders and index files for each tut section
luisaFelixSalles Nov 7, 2024
26b4cbe
update distributed files section grid
luisaFelixSalles Nov 7, 2024
354bdd4
updates
luisaFelixSalles Nov 8, 2024
49b6fe0
layout changes
luisaFelixSalles Nov 12, 2024
b914cc5
updates on the index cards
luisaFelixSalles Nov 12, 2024
7b5dc53
updates on the index pages
luisaFelixSalles Nov 12, 2024
a22d3b8
updates on the basic tuts
luisaFelixSalles Nov 12, 2024
d7f946c
updates
luisaFelixSalles Nov 12, 2024
b812bde
updates
luisaFelixSalles Nov 12, 2024
1b143a8
update tutorials main page
luisaFelixSalles Nov 13, 2024
85509b0
add maths section
luisaFelixSalles Nov 13, 2024
eea2d08
add physics data section
luisaFelixSalles Nov 13, 2024
d6ed508
Fix requirements/requirements_docs.txt
PProfizi Nov 19, 2024
bb6b859
Add badges for supported solvers (#1925)
PProfizi Nov 26, 2024
d596f0a
Add a links and refs file to be used in the doc (#1940)
luisaFelixSalles Nov 28, 2024
f2d4469
Add animation tutorials to the main tutorials branch (#1915)
luisaFelixSalles Dec 3, 2024
0270c6e
Update doc/source/links_and_refs.rst
luisaFelixSalles Dec 4, 2024
0a04c25
updates the ref in the Manipulating physics data card in the index.rs…
luisaFelixSalles Dec 19, 2024
96b6a58
adds the "mathematics" and "manipulate physics data" sections in the …
luisaFelixSalles Dec 19, 2024
850f838
adds solver badges in the beginning of the animate_time.rst tutorial
luisaFelixSalles Dec 19, 2024
e1dcd34
updates some lists that didn't render correctly in the animate_time.r…
luisaFelixSalles Dec 19, 2024
617c55d
add jupter_sphinx extension to the conf.py file
luisaFelixSalles Dec 19, 2024
14f3c78
add new links and substitution text to the links_and_refs.rst file
luisaFelixSalles Dec 19, 2024
b3be655
animate_time.rst use the links_and_refs.rst file
luisaFelixSalles Dec 19, 2024
627c2de
changes the conf.py file so the links from the links_and_refs.rst fil…
luisaFelixSalles Dec 19, 2024
293a63d
Merge branch 'refs/heads/master' into doc/new-tutorials-section
luisaFelixSalles Jan 8, 2025
0a8fa75
Add tutorials guidelines in the main tutorials branch (#1950)
luisaFelixSalles Jan 28, 2025
d7df37a
Merge branch 'master' into doc/new-tutorials-section
PProfizi Apr 22, 2025
5b90dc7
Update contributing.rst after merge
PProfizi Apr 22, 2025
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
12 changes: 12 additions & 0 deletions doc/source/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,15 @@
.wy-table-responsive table td, .wy-table-responsive table th {
white-space: normal;
}
/* Check https://www.w3schools.com/cssref/css_colors.php for colors */
/* Ansys gold for MAPDL with black text*/
.sd-bg-mapdl{background-color: #FFB71B}
.sd-bg-text-mapdl{color: Black}
/* Ansys orange accent color for Fluent with black text*/
.sd-bg-lsdyna{background-color: #FB471F}
.sd-bg-text-lsdyna{color: Black}
/* Ansys blue accent color #00629F for Fluent with black text*/
.sd-bg-fluent{background-color: #0081D0}
.sd-bg-text-fluent{color: Black}
.sd-bg-cfx{background-color: LightSeaGreen}
.sd-bg-text-cfx{color: Black}
27 changes: 25 additions & 2 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@
"sphinx_design",
"sphinx_jinja",
'sphinx_reredirects',
"ansys_sphinx_theme.extension.autoapi",
"jupyter_sphinx",
]

redirects = {
Expand Down Expand Up @@ -156,7 +158,14 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []
exclude_patterns = ["links_and_refs.rst"]

# make rst_epilog a variable, so you can add other epilog parts to it
rst_epilog = ""

# Read links and targets from file
with open("links_and_refs.rst") as f:
rst_epilog += f.read()

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = None
Expand Down Expand Up @@ -376,6 +385,20 @@ def reset_servers(gallery_conf, fname, when):
# A list of files that should not be packed into the epub file.
epub_exclude_files = ["search.html"]

# Define custom docutils roles for solver badges
from sphinx_design.badges_buttons import BadgeRole

def setup(app):
badge_roles = {
"bdg-mapdl": "mapdl",
"bdg-cfx": "cfx",
"bdg-fluent": "fluent",
"bdg-lsdyna": "lsdyna"
}

for role_name, color in badge_roles.items():
app.add_role(name=role_name, role=BadgeRole(color=color))

# Common content for every RST file such us links
rst_epilog = ""
links_filepath = Path(__file__).parent.absolute() / "links.rst"
Expand Down Expand Up @@ -404,4 +427,4 @@ def reset_servers(gallery_conf, fname, when):

BUILD_EXAMPLES = True if os.environ.get("BUILD_EXAMPLES", "true") == "true" else False
if BUILD_EXAMPLES:
extensions.extend(["sphinx_gallery.gen_gallery"])
extensions.extend(["sphinx_gallery.gen_gallery"])
13 changes: 10 additions & 3 deletions doc/source/getting_started/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,17 @@
Contributing
############

There are several ways to contribute to PyDPF-Core:

- :ref:`ref_contributing_answer_discussions`
- :ref:`ref_contributing_post_issues`
- :ref:`ref_contributing_develop_code`
- :ref:`ref_contributing_improve_doc`

Overall guidance on contributing to a PyAnsys repository appears in
`Contribute <https://dev.docs.pyansys.com/how-to/contributing.html>`_
in the *PyAnsys Developer's Guide*. Ensure that you are thoroughly familiar
with this guide before attempting to contribute to PyDPF-Core.
`Contributing <dev_guide_contributing_>`_ in the *PyAnsys Developer's Guide*.
Ensure that you are thoroughly familiar with this guide before attempting
to contribute to PyDPF-Core.

.. important::

Expand Down
10 changes: 5 additions & 5 deletions doc/source/getting_started/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Installation
Install using ``pip``
---------------------

The standard package installer for Python is `pip <https://pypi.org/project/pip/>`_.
The standard package installer for Python is `pip <pip_pypi_page_>`_.

To use PyDPF-Core with Ansys 2022 R2 or later, install the latest version
with this command:
Expand All @@ -16,7 +16,7 @@ with this command:

pip install ansys-dpf-core

PyDPF-Core plotting capabilities require you to have `PyVista <https://pyvista.org/>`_ installed.
PyDPF-Core plotting capabilities require you to have `PyVista <pyvista_org_>`_ installed.
To install PyDPF-Core with its optional plotting functionalities, run this command:

.. code::
Expand Down Expand Up @@ -58,7 +58,7 @@ Install without internet

If you are unable to install PyDPF-Core on the host machine using ``pip`` due to
network isolation, download the wheelhouse corresponding to your platform and Python interpreter version
for the latest release of PyDPF-Core from the assets section of the `latest PyDPF-Core release on GitHub <https://github.com/ansys/pydpf-core/releases/latest>`_.
for the latest release of PyDPF-Core from the assets section of the `latest PyDPF-Core release on GitHub <pydpfcore_latest_release>`_.

The wheelhouse is a ZIP file containing Python wheels for all the packages PyDPF-Core requires to run.
To install PyDPF-Core using the downloaded wheelhouse, unzip the wheelhouse to a local directory,
Expand All @@ -70,8 +70,8 @@ then use the following command from within this local directory:

Note that PyDPF-Core wheelhouses do not include the optional plotting dependencies.
To use the plotting capabilities, also download the wheels corresponding to your platform and Python interpreter version
for `PyVista <https://pypi.org/project/pyvista/#files>`_ and
`matplotlib <https://pypi.org/project/matplotlib/#files>`_. Then, place them in the same local directory and run the preceding command.
for `PyVista <pyvista_download_files_>`_ and
`matplotlib <matplotlib_download_files_>`_. Then, place them in the same local directory and run the preceding command.


Install in development mode
Expand Down
61 changes: 61 additions & 0 deletions doc/source/getting_started/write_code/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
.. _ref_write_code:

============
Develop code
============

You can help improve PyDPF-Core by fixing a bug. To do it, you must set up the repository
on your local machine as per the following steps:

- :ref:`ref_write_code_install`
- :ref:`ref_write_code_clone`
- :ref:`ref_write_code_check_install`
- :ref:`ref_write_code_develop_code`

.. _ref_write_code_install:

Install the repository and the DPF server
-----------------------------------------

Install the PyDPF-Core repository by following the steps in :ref:`installation` and :ref:`ref_dpf_server`.

.. _ref_write_code_clone:

Clone the repository
--------------------

Before cloning the PyDPF-Core repository, you must install a version control system such as Git.

Then, clone the latest version of PyDPF-Core in development mode (using ``pip`` with the ``-e``
development flag) by running this code:

.. code::

git clone https://github.com/ansys/pydpf-core
cd pydpf-core
pip install -e .

.. _ref_write_code_check_install:

Check the installation
----------------------

Run the following Python code to verify your PyDPF-Core installation:

.. code::

from ansys.dpf.core import Model
from ansys.dpf.core import examples
model = Model(examples.find_simple_bar())
print(model)

.. _ref_write_code_develop_code:

Develop the PyDPF-Core code
---------------------------

Overall guidance on contributing to the code of a PyAnsys repository appears in
`Contributing <dev_guide_contributing_>`_ in the *PyAnsys Developer's Guide*.

You must also follow the `Coding style <dev_guide_coding_style_>`_ guide to ensure
that all source code looks the same across the project.
Loading
Loading