33Development Practices
44=====================
55This page explains how PyAnsys development is conducted. When
6- contributing directly to PyAnsys libraries , use these general
6+ contributing to a PyAnsys repository , use these general
77coding paradigms:
88
99#. Follow the `Zen of Python <https://www.python.org/dev/peps/pep-0020/ >`__.
1010 As silly as core Python developers are sometimes, there's much to be
1111 gained by following the basic guidelines listed in PEP 20. As suggested
1212 in these guidelines, focus on making your additions intuitive, novel,
13- and helpful for PyAnsys library users. When in doubt, use ``import this ``.
13+ and helpful for PyAnsys users. When in doubt, use ``import this ``.
1414 For Ansys code quality standards, see :ref: `coding_style `.
1515
1616#. Document your contributions. Include a docstring for any added
@@ -31,13 +31,15 @@ coding paradigms:
3131
3232Contributing Through GitHub
3333---------------------------
34- To submit new code to a PyAnsys Library :
34+ To submit new code to a PyAnsys repository :
3535
3636#. `Fork <https://docs.github.com/en/get-started/quickstart/fork-a-repo >`_
37- the respective library's GitHub repository and then clone
38- the forked repository to your computer.
37+ the respective GitHub repository and then clone the forked repository
38+ to your computer.
3939
40- #. In your local repository, create a branch. See `Branching Model <#Branching Model >`__.
40+ #. In your local repository, create a branch. See :ref: `branch_naming `.
41+ Comprehensive information on our model for branching is availible in
42+ `Branching Model <#Branching Model >`__.
4143
4244#. Add your new feature and commit it locally. Be sure to commit
4345 frequently as the ability to revert to past commits is often helpful,
@@ -54,15 +56,15 @@ Once you have tested your branch locally, create a PR and target your
5456merge to ``main ``. This will automatically run CI testing and verify
5557that your changes will work across all supported platforms.
5658
57- For code verification, someone from the development team for the PyAnsys library
58- will review your code to verify that it meets our standards. Once your code
59- is approved, if you have write permission, you may merge the PR branch. If you
60- don't have write permission, the reviewer or someone else with write permission
61- will merge and delete the PR branch.
59+ For code verification, someone from the PyAnsys development team will review your
60+ code to verify that it meets our standards. Once your code is approved, if you
61+ have write permission, you may merge the PR branch. If you don't have write
62+ permission, the reviewer or someone else with write permission will merge your
63+ PR and then delete your PR branch.
6264
6365If your PR branch is a ``fix/ `` branch, do not delete it because it may be necessary to
64- merge your PR branch with the current release branch. See the next section for branch
65- naming conventions.
66+ merge your PR branch with the current release branch. The next section explains our
67+ branch naming conventions.
6668
6769.. _branch_naming :
6870
@@ -124,7 +126,8 @@ like this:
124126
125127Documentation
126128-------------
127- Documentation for a PyAnsys library is generated from three sources:
129+ The source and content for documentation varies from repository to repository. For a PyAnsys library,
130+ documentation is generated from three sources:
128131
129132- Docstrings from the library's classes, functions, and modules using
130133 `sphinx.ext.autodoc <https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html >`_.
@@ -161,21 +164,21 @@ and will be compiled dynamically during the build process. Always ensure that
161164examples run properly locally because they will be verified through the CI performed
162165via GitHub Actions.
163166
164- Documentation for the latest stable release of a PyAnsys libary is accessible
165- from its repository. You can access the latest development version of the
167+ Documentation for the latest stable release of a PyAnsys library is accessible
168+ from its repository. You can generally access the latest development version of the
166169documentation tracking the ``main `` branch by adding the prefix ``dev. `` to
167- the URL for the latest stable release. For example, the URL for the latest
168- stable release of the PyAEDT documentation is
169- `< https://dev.aedtdocs.pyansys.com/ >`_, and the URL for the latest development
170- version of this documentation is `<https://dev.aedtdocs.pyansys.com/ >`_. The
171- latest development version is kept up-to-date automatically via GitHub actions.
170+ the URL for the latest stable release. For example, the URL for documentation of the
171+ latest stable release of PyAEDT is `< https://aedtdocs.pyansys.com/ >`_, and
172+ the URL for the latest documentation for the development version of PyAEDT is
173+ `<https://dev.aedtdocs.pyansys.com/ >`_. The latest development versions of both
174+ the library and its documentation are kept up-to-date automatically via GitHub actions.
172175
173- Building the Documentation Locally
174- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
175- You can build and verify a library's HTML documentation locally by installing
176- Sphinx and other documentation build dependencies.
176+ Building Documentation Locally
177+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
178+ You can build and verify the HTML documentation for a PyAnsys project locally
179+ by installing Sphinx and other documentation build dependencies.
177180
178- #. Optionally install the library in development mode:
181+ #. Optionally install the project in development mode:
179182
180183.. code ::
181184
@@ -201,14 +204,14 @@ Otherwise, if running on Windows, build the documentation:
201204 cd doc
202205 make.bat html
203206
204- #. After documentation builds successfully locally, use your
205- browser to open the file `` index.html `` in `` doc/_build/html/ ``
206- to review it .
207+ #. After documentation builds successfully locally, navigate to
208+ `` doc/_build/html/ `` and use your browser to open the
209+ `` index.html `` so that you can review the documenation .
207210
208211Continuous Integration and Continuous Delivery (CI/CD)
209212------------------------------------------------------
210213
211- A PyAnsys library uses continuous integration (CI) and continuous delivery (CD)
214+ A PyAnsys project uses continuous integration (CI) and continuous delivery (CD)
212215to automate building, testing, and deployment tasks. The CI pipeline is
213216deployed on both GitHub Actions and Azure Pipelines and performs the following
214217tasks:
@@ -218,9 +221,11 @@ tasks:
218221- Spelling and style verification
219222- Documentation build
220223
224+ .. _branching_model :
225+
221226Branching Model
222227---------------
223- The branching model for a PyAnsys library enables rapid development of
228+ The branching model for a PyAnsys project enables rapid development of
224229features without sacrificing stability. The model closely follows the
225230`Trunk Based Development <https://trunkbaseddevelopment.com/ >`_ approach:
226231
@@ -276,11 +281,10 @@ Release procedures follow for major and minor releases.
276281 #. After building the documentation, open the local build and examine
277282 the examples for any obvious issues.
278283
279- #. Update the version numbers in
280- ``ansys/<product>/<library>/_version.py `` and commit this file. Push the
281- branch to GitHub and create a new PR for this release that merges
282- it to ``main ``. While effort is focused on the release, development
283- to ``main `` should be limited.
284+ #. Update the version numbers in ``ansys/<product>/<library>/_version.py ``
285+ and commit this file. Push the branch to GitHub and create a new PR
286+ for this release that merges it to ``main ``. While effort is focused
287+ on the release, development to ``main `` should be limited.
284288
285289#. Wait for the PyAnsys developers and community to functionally test the
286290 new release. Testors should locally install this branch and use it in
@@ -327,11 +331,12 @@ should not wait until a minor release. These are the steps for a patch release:
327331 an opportunity to validate and approve the bug fix release. Any
328332 additional hotfixes should be outside of this PR.
329333
330- #. When the PR is approved, merge it with the release branch, but not with
331- ``main `` as there is no reason to increment the version of the ``main `` branch.
334+ #. When the PR is approved, merge it with the release branch but not with
335+ ``main `` because there is no reason to increment the version of the
336+ ``main `` branch.
332337
333338#. Create a tag from the release branch with the applicable version number
334339 as described in the previous section.
335340
336- 4 . If deemed necessary, create and add release notes as described in the
341+ # . If deemed necessary, create and add release notes as described in the
337342 previous section.
0 commit comments