-
Notifications
You must be signed in to change notification settings - Fork 8
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
base: main
Are you sure you want to change the base?
Conversation
The towncrier template has been successfully rewritten with the default template. |
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension. |
There was a problem hiding this 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. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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".
There was a problem hiding this 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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. | ||
|
There was a problem hiding this comment.
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?
Contributing as a documentarian | ||
############################### |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Contributing as a documentarian | |
############################### | |
Contribute as a documentarian | |
############################# |
|
||
.. note:: | ||
|
||
If you are not an Ansys employee, you must fork the repository and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
>>> pyworkbench version is {{ PYWORKBENCH_VERSION }} | |
>>> PyWorkbench version is {{ PYWORKBENCH_VERSION }}. |
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:align: center | |
:align: left |
We should be avoiding center alignment.
:link: build-documentation | ||
:link-type: ref | ||
|
||
Render the documentation to see your changes reflected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
: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>`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
@jorgepiloto Is this PR ready to be merged? |
This pull-request includes the
Contribute
section for this project. Three basic sections are included:Preview for each section: