Skip to content

Commit b0ee74d

Browse files
Reorganize Library Overview layout by unifying sections (#63)
* Refer to ansys-templates in template.rst * Apply suggestions from code review Co-authored-by: Alex Kaszynski <[email protected]>
1 parent d99cad9 commit b0ee74d

File tree

1 file changed

+80
-13
lines changed

1 file changed

+80
-13
lines changed

doc/source/library_description/template.rst

Lines changed: 80 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,88 @@
22
Library Template
33
################
44

5-
Within the `PyAnsys Organization <https://github.com/pyansys>`_, there
6-
is a `template repository <https://github.com/pyansys/template>`_
7-
where you can `create a repository from a template`_ and create a
8-
PyAnsys project that follows the guidelines specified in this developer's
9-
guide.
5+
Starting a new project from scratch is a tedious task. For this reason, the
6+
`ansys-templates`_ tool was created to simplify the starting process and
7+
make it more dynamic. Any rendered project will be compliant with the latest
8+
PyAnsys coding and API style guidelines.
109

11-
The template repository contains a generalized library skeleton that includes:
10+
The ansys-templates tool
11+
========================
1212

13-
- Library skeleton with sample classes and methods
14-
- Sample documentation build including customized templates
15-
- Sample GitHub actions specific to PyAnsys libraries
16-
- Licensing, example README, and setup files
17-
- ``.gitignore`` and other requirements files
13+
The `ansys-templates`_ is a command line interface which provides you with a
14+
collection of templates. This tool allows you to create new PyAnsys projects
15+
from scratch in a dynamic way by asking you several questions before generating
16+
the new project.
1817

19-
To use this template, `create a repository from a template`_.
18+
Please, follow the `ansys-templates installation guide`_ to get the latest stable
19+
version installed in your system.
2020

21+
- **Repository**: https://github.com/pyansys/pyansys-templates
22+
- **Documentation**: https://github.com/pyansys/pyansys-templates
23+
- **Issues board**: https://github.com/pyansys/pyansys-templates/issues
2124

22-
.. _Create a repository from a template: https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template
25+
26+
.. note::
27+
28+
Open a new issue in the `ansys-templates issues board`_ if you encounter any
29+
problem during the installation or usage of the tool.
30+
31+
32+
PyAnsys Available Templates
33+
===========================
34+
35+
There are two templates which can be used as basis for creating new PyAnsys
36+
projects. These are the ``pyansys`` and the ``pyansys-advanced`` templates.
37+
38+
.. important::
39+
40+
Install `ansys-templates`_ to access these templates. Refer to the
41+
`ansys-templates user guide`_ for more information on how to use this tool.
42+
43+
44+
PyAnsys Template
45+
----------------
46+
47+
The ``pyansys`` template ships only with the required directories and files to
48+
quickly setup a PyAnsys compliant project:
49+
50+
- Provides a ``src/ansys/product/library/`` layout
51+
- Includes a ``setup.py`` file
52+
- Generates a ``doc/`` and a ``tests/`` directories
53+
- Generic ``.gitignore`` for Python libraries
54+
- Includes building, doc, and test requirements files
55+
- Metadata files like ``README.rst`` and ``LICENSE``
56+
57+
Create a new project based on the ``pyansys`` template by running:
58+
59+
.. code:: bash
60+
61+
ansys-templates new pyansys
62+
63+
64+
PyAnsys Advanced Template
65+
-------------------------
66+
67+
The ``pyansys-advanced`` is an enhanced version of the ``pyansys`` template. It
68+
ships with the same files as this last template except:
69+
70+
- Allows you to select the project file (``setup.py`` or ``pyproject.toml``)
71+
- Uses `Tox`_ for testing and tasks automation
72+
- Includes GitHub actions for CI purposes
73+
- Uses `pre-commit`_ for checking coding style
74+
75+
Create a new project based on the ``pyansys-advanced`` template by running:
76+
77+
.. code:: bash
78+
79+
ansys-templates new pyansys-advanced
80+
81+
.. _ansys-templates: https://templates.pyansys.com/index.html
82+
.. _ansys-templates installation guide: https://templates.pyansys.com/getting_started/index.html
83+
.. _ansys-templates user guide: https://templates.pyansys.com/user_guide/index.html
84+
.. _ansys-templates issues board: https://github.com/pyansys/pyansys-templates/issues
85+
.. _flit: https://flit.readthedocs.io/en/latest/
86+
.. _poetry: https://python-poetry.org/
87+
.. _pre-commit: https://pre-commit.com/
88+
.. _setuptools: https://pypi.org/project/setuptools/
89+
.. _Tox: https://tox.wiki/en/latest/

0 commit comments

Comments
 (0)