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

Add tutorials guidelines in the main tutorials branch #1950

Open
wants to merge 35 commits into
base: doc/new-tutorials-section
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
d560c1a
add new basic tutorial and jupyter_ sphinx extension
luisaFelixSalles Oct 22, 2024
37ee211
separate the documentation part from the contributing.rst (main page)
luisaFelixSalles Nov 27, 2024
de29b48
create the index page for the writing documentation section
luisaFelixSalles Nov 27, 2024
727b986
add the tutorials guide lines file
luisaFelixSalles Nov 27, 2024
9140d97
add the tutorial template file
luisaFelixSalles Nov 27, 2024
f804a34
updates the contributing.rst main page
luisaFelixSalles Nov 28, 2024
2d327d4
add a separate section for develop code (contributing)
luisaFelixSalles Nov 28, 2024
aefe142
add the writing documentation index page
luisaFelixSalles Nov 28, 2024
b1d2280
add new links to links_and_refs.rst
luisaFelixSalles Nov 28, 2024
ffb8646
add tutorial_card_template.rst
luisaFelixSalles Nov 29, 2024
4330976
add tutorial_section_template.rst
luisaFelixSalles Nov 29, 2024
18d71fd
add toctree to index file of the write_doc folder
luisaFelixSalles Nov 29, 2024
8e8d7d9
add first part of the guide_lines_tutorials.rst
luisaFelixSalles Nov 29, 2024
023c831
updates
luisaFelixSalles Dec 3, 2024
ed18ffa
final first version of guide_lines_tutorials.rst
luisaFelixSalles Dec 3, 2024
8de7c92
add tutorial_content_template.rst
luisaFelixSalles Dec 3, 2024
624993c
add tutorial_structure_template.rst
luisaFelixSalles Dec 3, 2024
9e43d18
updates the guide_lines_tutorials.rst with the new tutorial templates…
luisaFelixSalles Dec 3, 2024
404a90f
updates the guide_lines_tutorials.rst
luisaFelixSalles Dec 3, 2024
54103fe
delete file basic_tutorial.rst
luisaFelixSalles Jan 3, 2025
744f210
Update doc/source/getting_started/write_doc/guide_lines_tutorials.rst
luisaFelixSalles Jan 7, 2025
388f48e
Update doc/source/getting_started/write_doc/tutorial_structure_templa…
luisaFelixSalles Jan 7, 2025
ce79f12
Apply suggestions from code review
luisaFelixSalles Jan 7, 2025
43bed3e
updates the links references in the rst files
luisaFelixSalles Jan 7, 2025
4c14777
updates the links references in the install.rst file
luisaFelixSalles Jan 7, 2025
03666da
redirect to the PyAnsys guidelines for developing code and add the in…
luisaFelixSalles Jan 7, 2025
6432bff
redirect to the PyAnsys guidelines for developing documentation
luisaFelixSalles Jan 7, 2025
8c75f84
add new links and substitution text to the links_and_refs.rst file
luisaFelixSalles Jan 7, 2025
3a3f5f8
update text in index.rst (write doc)
luisaFelixSalles Jan 7, 2025
db56798
update the guide_lines_tutorials.rst
luisaFelixSalles Jan 8, 2025
bae3156
update the tutorial_structure_template.rst
luisaFelixSalles Jan 8, 2025
c09b799
add the installing dpf server explanation to the write code index.rst
luisaFelixSalles Jan 8, 2025
a498138
add the link to the jupyter execute extension doc to the links_and_re…
luisaFelixSalles Jan 8, 2025
da323b5
rename the guidelines_tutorials.rst file
luisaFelixSalles Jan 8, 2025
33f763f
updates the guidelines_tutorials.rst name in the toctree of the write…
luisaFelixSalles Jan 8, 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
98 changes: 75 additions & 23 deletions doc/source/getting_started/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,90 @@
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/overview/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.

The following contribution information is specific to PyDPF-Core.
luisaFelixSalles marked this conversation as resolved.
Show resolved Hide resolved

Clone the repository
--------------------
Clone and install the latest version of PyDPF-Core in
development mode by running this code:
.. _ref_contributing_answer_discussions:

.. code::
Answer discussions
------------------

Answering discussions is an excellent way to contribute to PyDPF-Core, and it does not require
any setup, just a GitHub account. Engaging in discussions often requires a thorough grasp of
the project’s goals and challenges. Your contributions can help other users or contributors who may be
facing similar issues, making the repository more welcoming and inclusive. By providing answers or solutions,
you can directly contribute to the project’s success, maintain its health, and encourage a positive,
open source ecosystem.

git clone https://github.com/ansys/pydpf-core
cd pydpf-core
pip install -e .
To discover how you can help see the `PyDPF-Core Discussions page <pydpfcore_discussions_>`_.

.. _ref_contributing_post_issues:

Post issues
-----------
Use the `PyDPF-Core Issues <https://github.com/ansys/pydpf-core/issues>`_
page to submit questions, report bugs, and request new features.

To reach the project support team, email `[email protected] <[email protected]>`_.
Posting issues in a repository allows you to voice concerns, suggest improvements, or report bugs, which can
lead to a more robust and user-friendly project. It also offers an opportunity for you to engage with the
project’s community, learn from others, and gain experience in issue tracking and collaboration.

For the repository, issues serve as a structured way to track and prioritize work, helping maintainers understand
the needs of users and guide the project’s development.

Use the `PyDPF-Core Issues page <pydpfcore_issues_>`_ to submit questions, report bugs, and request new features. When possible, use
these issue templates:

- 🐞 Bug, problem, or error: Fill a bug report here;
- 📖 Documentation issue: Modifications to the documentation only;
- 🎓 Adding an example: Proposing a new example for the library;
- 🎓 Adding an tutorial: Proposing a new tutorial for the library;
- 💡 New feature: Enhancements to the code;
- If your issue does not fit into one of these categories create a blank issue.

To reach the project support team, email `[email protected] <[email protected]>`_

.. _ref_contributing_develop_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 explanations in the :ref:`ref_write_code` section.


.. _ref_contributing_improve_doc:

Improve documentation
---------------------

The PyDPF-Core documentation plays a pivotal role in making the project more accessible and usable.
Clear and comprehensive documentation empowers users and developers to understand, implement, and
troubleshoot the project effectively. It minimizes barriers to entry, making it easier for newcomers
to get involved and for existing contributors to be more productive.

Good documentation also reduces the burden on maintainers, as it can answer common questions and
help prevent issues. By creating or improving documentation, you not only enhance the project’s quality but
also facilitate knowledge sharing and community growth, making your contribution invaluable for the project’s
long-term success.

To contribute on our current documentation go to the :ref:`ref_write_doc` section.

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

write_doc/index.rst
write_code/index.rst


View documentation
------------------
Documentation for the latest stable release of PyDPF-Core is hosted at
`PyDPF-Core Documentation <https://dpf.docs.pyansys.com/>`_.

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.
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 to have `PyVista <https://pyvista.org/>`_ installed.
PyDPF-Core plotting capabilities require to have `PyVista <pyvista_org_>`_ installed.
To install PyDPF-Core with its optional plotting functionalities, use:

.. code::
Expand Down Expand Up @@ -52,7 +52,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 @@ -64,8 +64,8 @@ then use the following command from within this local directory:

Beware that PyDPF-Core wheelhouses do not include the optional plotting dependencies.
To allow for 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 previous local directory and run the command above.
for `PyVista <pyvista_download_files_>`_ and
`matplotlib <matplotlib_download_files_>`_, then place them in the same previous local directory and run the command above.


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
luisaFelixSalles marked this conversation as resolved.
Show resolved Hide resolved
============

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:
luisaFelixSalles marked this conversation as resolved.
Show resolved Hide resolved

.. 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
luisaFelixSalles marked this conversation as resolved.
Show resolved Hide resolved
---------------------------

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