Skip to content

docs(contributing): basic layout #199

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 9 commits into
base: main
Choose a base branch
from
Open

Conversation

jorgepiloto
Copy link
Member

@jorgepiloto jorgepiloto commented Mar 10, 2025

This pull-request includes the Contribute section for this project. Three basic sections are included:

image

Preview for each section:

image
image
image

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Mar 10, 2025
Copy link

The towncrier template has been successfully rewritten with the default template.
Please ensure that sphinx-design is included as a dependency in your project's documentation requirements.
Additionally, add sphinx-design to the extensions list in your conf.py file.
For more information, please refer to the migration guide at:
https://actions.docs.ansys.com/version/stable/migrations/index.html#migration-guide

@wiz-inc-572fc38784
Copy link

wiz-inc-572fc38784 bot commented Mar 10, 2025

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities
Data Finding Sensitive Data 1 Info
Secret Finding Secrets
IaC Misconfiguration IaC Misconfigurations
Total 1 Info

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

@jorgepiloto jorgepiloto marked this pull request as ready for review March 10, 2025 08:45
@jorgepiloto jorgepiloto requested review from PipKat and a team as code owners March 10, 2025 08:45
@jorgepiloto jorgepiloto requested a review from vnamdeo March 10, 2025 08:46
Copy link
Contributor

@vnamdeo vnamdeo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.


.. note::

If you are an Ansys employee, you can skip this step.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the instructions for external contributors?

Copy link
Member

@PipKat PipKat Apr 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jorgepiloto I can see now that my comment doesn't really make sense. The "Fork the repository" step doesn't have to be completed by Ansys employees, and external contributors can refer to GitHub resources or the PyAnsys dev guide for forking instructions. Should we say something to this effect though--or is it just obvious to developers? If so, just resolve this comment!

@@ -0,0 +1,45 @@
Contribute
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jorgepiloto So much of this content seems like what we talked about as part of the url_include and snippet approach. Will it eventually be implemented as we planned? Your examples also sound rather PySDK-specific, not Workbench specific or generic enough to be part of a template. Should we consider that?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @PipKat, having this as a template would be the best. By using Tox, like this project does, the commands are the same for every project. This allows the content to be "templatized".

Copy link
Member

@PipKat PipKat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jorgepiloto Feedback for your consideration.

Co-authored-by: Kathy Pippert <[email protected]>
This project adheres to the `Contributor Covenant Code of Conduct`_. By
participating, you agree to uphold this code of conduct.

Start by selecting your role in the project:
Copy link
Member

@PipKat PipKat Apr 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Start by selecting your role in the project:
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 PyWorkbench.
The following contribution information is specific to PyWorkbench. Start by
selecting your role in the project:

Adding content to make this Contribute topic and the one for PyHeart consistent.

:link-type: ref

Verify your changes to the project by running tests.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jorgepiloto I see PyHeart has two additional sections: Code style compliance and Run the CI/CD pipelines. Do you possibly want to add this type of content to this library?

Comment on lines +1 to +2
Contributing as a documentarian
###############################
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Contributing as a documentarian
###############################
Contribute as a documentarian
#############################


.. note::

If you are not an Ansys employee, you must fork the repository and
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If you are not an Ansys employee, you must fork the repository and
If you are not an Ansys employee, you must :ref:`fork the repository <fork-the-repository> and


.. code-block:: text

>>> pyworkbench version is {{ PYWORKBENCH_VERSION }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
>>> pyworkbench version is {{ PYWORKBENCH_VERSION }}
>>> PyWorkbench version is {{ PYWORKBENCH_VERSION }}.

Comment on lines +155 to +157
automation tool. The main advantage of Tox is that it allows you to test your
project in different environments and configurations in a temporary and
isolated Python virtual environment.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
automation tool. The main advantage of Tox is that it allows you to test your
project in different environments and configurations in a temporary and
isolated Python virtual environment.
automation tool. The main advantage of Tox is that it eases routine tasks like project
testing, documentation generation, and wheel building in separate and isolated Python
virtual environments.

I replaced with the wording that was in PyHeart as it sounded better!


.. code-block:: text

tox list
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be python -m tox list like in the PyHeart doc?

Once you have made your changes, you can run the tests to verify that your
changes did not break the project. PyWorkbench tests support different markers
to avoid running the whole suite of tests. These markers are associated with a
dedicated Tox environment.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we can use this instead--to match PyAnsys Heart wording:

PyWorkbench tests support different markers
to allow testing with or without coverage (and against specific Python versions).
These markers are associated with dedicated Tox environments.


.. button-link:: https://github.com/ansys/pyworkbench/fork
:color: primary
:align: center
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
:align: center
:align: left

We should be avoiding center alignment.

:link: build-documentation
:link-type: ref

Render the documentation to see your changes reflected.
Copy link
Member

@PipKat PipKat Apr 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Render the documentation to see your changes reflected.
Build the documentation to see your changes rendered.


`Sphinx`_ is the tool used to generate PyWorkbench documentation. You write most of the content
in `ReStructuredText`_ files. However, some of the content, like the
:ref:`examples <Examples>`, use a mix of `Markdown`_ and Python. If
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
:ref:`examples <Examples>`, use a mix of `Markdown`_ and Python. If
:ref:`examples <Examples>`, use a mix of `Markdown`_ and Python files. If

`Sphinx`_ is the tool used to generate PyWorkbench documentation. You write most of the content
in `ReStructuredText`_ files. However, some of the content, like the
:ref:`examples <Examples>`, use a mix of `Markdown`_ and Python. If
you are interested in writing examples, see :ref:`writing examples <write-examples>`.
Copy link
Member

@PipKat PipKat Apr 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
you are interested in writing examples, see :ref:`writing examples <write-examples>`.
you are interested in writing examples, see :ref:`write-examples`.

We just want to use the section title here.

The documentation is located in the ``doc/source`` directory. The landing page
is declared in the ``doc/source/index.rst`` file. The subdirectories contain
the pages of different documentation sections. Finally, the
``doc/source/_static/`` folder contains various assets like images, and CSS
Copy link
Member

@PipKat PipKat Apr 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
``doc/source/_static/`` folder contains various assets like images, and CSS
``doc/source/_static/`` directory contains various assets like images and CSS


The layout of the ``doc/source`` directory is reflected in the URLs of the
online documentation pages. For example, the
``doc/source/contribute/documentarian.rst``file renders as
Copy link
Member

@PipKat PipKat Apr 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
``doc/source/contribute/documentarian.rst``file renders as
``doc/source/contribute/documentarian.rst`` file renders as the

``doc/source/contribute/documentarian.rst``file renders as
``https://workbench.docs.pyansys.com/contribute/documentarian`` URL.

Thus, if you create a file, it important to follow these rules:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Thus, if you create a file, it important to follow these rules:
Thus, if you create a file, it is important to follow these rules:

- Use lowercase letters for file and directory names.
- Use short and descriptive names.
- Use hyphens to separate words.
- Play smart with the hierarchy of the files and directories.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Play smart with the hierarchy of the files and directories.
- Logically organize the hierarchy of the files and directories.

- Use hyphens to separate words.
- Play smart with the hierarchy of the files and directories.

You must include all files in a table of contents. No orphan files are
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You must include all files in a table of contents. No orphan files are
You must include all files in the table of contents. Sphinx does not permit any orphan files.

- Play smart with the hierarchy of the files and directories.

You must include all files in a table of contents. No orphan files are
permitted. If a file is not included in the table of contents, Sphinx raises a
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
permitted. If a file is not included in the table of contents, Sphinx raises a
If you do not include a file in the table of contents, Sphinx raises a

permitted. If a file is not included in the table of contents, Sphinx raises a
warning that causes the build to fail.

A table of contents can be declared using a directive like this:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A table of contents can be declared using a directive like this:
You declare the table of contents using a directive like this:


`Tox`_ is used for automating the build of the documentation. There are
different environments for cleaning the build, building the documentation
in different formats such as HTML, and running the tests.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
in different formats such as HTML, and running the tests.
in different formats such as HTML and PDF, and running the tests.

If you encounter a bug or an issue while using the project, report it.
Your feedback helps to identify problems and get them resolved.

- Search the `PyWorkbench issues`_ to see if the issue has already been reported.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Search the `PyWorkbench issues`_ to see if the issue has already been reported.
- Search the `PyWorkbench issues`_ page to see if the issue has already been reported.

===============

If you have used PyWorkbench to create something interesting, share it with the rest
of the community. You can share your work in the `PyWorkbench discussions`_. Include
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
of the community. You can share your work in the `PyWorkbench discussions`_. Include
of the community. You can share your work on the `PyWorkbench discussions`_ page. Include


If you have used PyWorkbench to create something interesting, share it with the rest
of the community. You can share your work in the `PyWorkbench discussions`_. Include
a brief description of your work and any relevant links that others may find
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
a brief description of your work and any relevant links that others may find
a brief description of your work and any relevant links that others might find

Test a new feature
==================

It is possible to test a new feature before it is officially released. To do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
It is possible to test a new feature before it is officially released. To do
You can test a new feature before it is officially released. To do

Start a discussion
==================

Complex topics may require a discussion. Whether you want to know how to use
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Complex topics may require a discussion. Whether you want to know how to use
Complex topics might require a discussion. Whether you want to know how to use

@franknli
Copy link
Collaborator

franknli commented May 7, 2025

@jorgepiloto Is this PR ready to be merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants