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 45 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
45 commits
Select commit Hold shift + click to select a range
b6a4928
new tutorials layout
luisaFelixSalles Oct 21, 2024
bc998a3
user guide index page with tutorials
luisaFelixSalles Oct 22, 2024
bd08a1e
add new basic tutorial and jupyter_ sphinx extension
luisaFelixSalles Oct 22, 2024
64b4a63
add new basic tutorial in the sidebar
luisaFelixSalles Oct 22, 2024
992c045
add new fundamentals tutorial page
luisaFelixSalles Oct 22, 2024
a0d288e
reorganizing
luisaFelixSalles Oct 22, 2024
f616dd1
add fundamentals and usage tutorials and their sections
luisaFelixSalles Oct 23, 2024
7c79417
add more required tutorials
luisaFelixSalles Nov 7, 2024
0046af2
folders and index files for each tut section
luisaFelixSalles Nov 7, 2024
456b54d
update distributed files section grid
luisaFelixSalles Nov 7, 2024
3421141
updates
luisaFelixSalles Nov 8, 2024
4a2e9d3
layout changes
luisaFelixSalles Nov 12, 2024
db55259
updates on the index cards
luisaFelixSalles Nov 12, 2024
51fc7b9
updates on the index pages
luisaFelixSalles Nov 12, 2024
4de2bf1
updates on the basic tuts
luisaFelixSalles Nov 12, 2024
be5197c
updates
luisaFelixSalles Nov 12, 2024
f5f8f88
updates
luisaFelixSalles Nov 12, 2024
823289f
update tutorials main page
luisaFelixSalles Nov 13, 2024
cdadc07
add maths section
luisaFelixSalles Nov 13, 2024
df79026
add physics data section
luisaFelixSalles Nov 13, 2024
97f32dc
Fix requirements/requirements_docs.txt
PProfizi Nov 19, 2024
1dd2cdb
Merge branch 'master' into doc/new-tutorials-section
PProfizi Nov 25, 2024
d5ad6a1
Add badges for supported solvers (#1925)
PProfizi Nov 26, 2024
42c47eb
Add a links and refs file to be used in the doc (#1940)
luisaFelixSalles Nov 28, 2024
991b95a
Merge branch 'master' into doc/new-tutorials-section
luisaFelixSalles Dec 3, 2024
e9cfde6
Add animation tutorials to the main tutorials branch (#1915)
luisaFelixSalles Dec 3, 2024
81891a3
separate the documentation part from the contributing.rst (main page)
luisaFelixSalles Nov 27, 2024
434e08c
create the index page for the writing documentation section
luisaFelixSalles Nov 27, 2024
85e79e6
add the tutorials guide lines file
luisaFelixSalles Nov 27, 2024
e7a19bf
add the tutorial template file
luisaFelixSalles Nov 27, 2024
d7fe5d0
updates the contributing.rst main page
luisaFelixSalles Nov 28, 2024
7a61543
add a separate section for develop code (contributing)
luisaFelixSalles Nov 28, 2024
91314e7
add the writing documentation index page
luisaFelixSalles Nov 28, 2024
f23e69e
add new links to links_and_refs.rst
luisaFelixSalles Nov 28, 2024
52e1e05
add tutorial_card_template.rst
luisaFelixSalles Nov 29, 2024
dc6b51c
add tutorial_section_template.rst
luisaFelixSalles Nov 29, 2024
bfb1aee
add toctree to index file of the write_doc folder
luisaFelixSalles Nov 29, 2024
9cd072b
add first part of the guide_lines_tutorials.rst
luisaFelixSalles Nov 29, 2024
f1eaf99
add new links to links_and_refs.rst
luisaFelixSalles Dec 3, 2024
cc52e74
updates
luisaFelixSalles Dec 3, 2024
6049c05
final first version of guide_lines_tutorials.rst
luisaFelixSalles Dec 3, 2024
bbbecea
add tutorial_content_template.rst
luisaFelixSalles Dec 3, 2024
5c889cc
add tutorial_structure_template.rst
luisaFelixSalles Dec 3, 2024
1ee2a9f
updates the guide_lines_tutorials.rst with the new tutorial templates…
luisaFelixSalles Dec 3, 2024
b3654d3
updates the guide_lines_tutorials.rst
luisaFelixSalles Dec 3, 2024
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}
15 changes: 15 additions & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
"sphinx_design",
"sphinx_gallery.gen_gallery",
'sphinx_reredirects',
"jupyter_sphinx",
]

redirects = {
Expand Down Expand Up @@ -323,3 +324,17 @@ 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))
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.

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.
101 changes: 101 additions & 0 deletions doc/source/getting_started/write_code/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
.. _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_clone`
- :ref:`ref_write_code_check_install`
- :ref:`ref_write_code_develop_code`

.. _ref_write_code_clone:

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

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

Then, clone and install 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
---------------------------

Developing code in a repository, particularly when using version control systems like Git,
involves a set of essential guidelines to ensure efficient collaboration, code management, and tracking changes.

Here are the main guidelines for developing code in a repository:

#. **Use branches**: Create branches for different features, bug fixes, or
experiments. This keeps changes isolated and facilitates parallel
development. For example, the branch name must start with a prefix and a backslash.

#. **Write descriptive commit messages**: Provide clear and concise commit
messages that explain the purpose and context of the changes. Follow a
consistent style.

#. **Commit frequently**: Make small, meaningful commits frequently. Avoid
making a large number of unrelated changes in a single commit.

#. **Pull before you push**: Always update your local branch with the latest
changes from the remote repository before pushing your own changes to avoid
conflicts.

#. **Use pull requests (PRs)**: Use PRs to submit your changes for review.
This allows for discussion and validation before merging into the main branch.
Pull requests must follow the same convention as the commit messages.

The pull requests can also be labeled for easier repository maintenance.
Those labels are already defined in the repository.

#. **Write good documentation**: Maintain clear and up-to-date documentation for your
contribution or changes, including comments in code, and relevant project
documentation in rST or Markdown files.
If you implement a new feature or change the behaviour of the library in any way,
remember to mention it somewhere in the documentation (rST files in :file:`doc\source` directory)
Follow the `numpydoc <numpydoc_>`_ convention for documenting code.

#. **Test your changes**: Thoroughly test your changes to ensure that they work
as expected. If applicable, create or update the unit tests that run on the
continuous integration/continuous deployment (CI/CD) pipelines to catch issues early
and ensure reliable deployments.

#. **Respect code style and standards**: Follow code style
guidelines and adhere to coding standards specific to your language or
framework.

#. **Collaborate and communicate**: Communicate with team members, provide
updates on your progress, and resolve any conflicts promptly.

#. **Ask for help**: To ensure code quality, identify issues, and share knowledge,
ask PyMAPDL developers to assist you and review your code.
If you need help or guidance, mention ``@ansys/pydpf-admins`` in a comment
so they they are notified.

By following these guidelines, you can ensure smooth and organized code
development within a repository, fostering collaboration, code quality, and feature enhancement.
Loading
Loading