Available templates#

All the available templates in ansys-templates are listed below these lines. Their main features are explained so users can select the template which fits their needs.

For quick-reference, the following table provides an overview of the main capabilities and features of each template:

Template

setup.py

pyproject.toml

Actions

tox.ini

requirements/

Docker

doc-project

X

X

X

pybasic

X

pyansys

X

X

X

pyansys-advanced

X

X

X

X

X

pyansys-openapi-client

pyace

X

X

X

X

X

X

pyace-fast

X

X

X

X

X

X

pyace-flask

X

X

X

X

X

X

pyace-grpc

X

X

X

X

X

X

solution

X

X

X

X

Note

In the demo/ branches of the repository you can find rendered versions for each one of the templates. Take a look to these branches for having a better idea on the final project layout.

doc-project template#

This template renders a documentation project based on Sphinx. You can chose between Ansys or PyAnsys logos together with the color theme.

Main features of this package are:

  • Ability to choose between Ansys or PyAnsys logos.

  • Includes GitHub workflows (actions).

  • All requirements_*.txt are contained in a requirements_/ directory.

  • Includes a tox.ini file.

To create a new project using this template by running:

ansys-templates new doc-project

pybasic template#

This template renders to a basic Python project. It does not follow the Ansys namespace, meaning that a src/library/ layout is produced instead of the src/ansys/product/library one.

Main features of this package are:

  • Uses a src/library layout.

  • Uses a setup.py file for project configuration.

  • Includes a pyproject.toml for tools configuration.

  • Includes doc/ and tests/ directories.

  • All requirements_*.txt are contained in the base directory.

To create a new project using this template by running:

ansys-templates new pybasic

pyansys template#

This template renders to a basic Python project compliant with the latest PyAnsys guidelines.

Main features of this package are:

  • Uses Ansys namespace by creating a src/ansys/product/library.

  • Uses a setup.py file for project configuration.

  • Includes a pyproject.toml for tools configuration.

  • Includes doc/ and tests/ directories.

  • Includes GitHub workflows (actions).

  • All requirements_*.txt are contained in the base directory.

To create a new project using this template, run:

ansys-templates new pyansys

pyansys-advanced template#

This template renders to a basic Python project compliant with the latest PyAnsys guidelines and the most modern techniques in Python packaging.

Main features of this package are:

  • Uses Ansys namespace by creating a src/ansys/product/library.

  • Includes a pyproject.toml for project and tools configuration.

  • Allows for the selection of the build-system between flit, poetry or setuptools.

  • Includes doc/ and tests/.

  • Includes GitHub workflows (actions).

  • All requirements_*.txt are contained in a requirements_/ directory.

  • Includes a tox.ini file.

To create a new project using this template, run:

ansys-templates new pyansys-advanced

pyansys-openapi-client template#

Create an OpenAPI Client Package project compliant with PyAnsys guidelines.

Main features of this package are:

  • Includes GitHub workflows for generating, building and testing the library.

  • Customizable pom.xml file.

  • Customizable .m2/settings.xml file.

To create a new project using this template, run:

ansys-templates new pyansys-openapi-client

pyace template#

This template renders to a basic Python project compliant with the latest ACE guidelines.

Main features of this package are:

  • Uses a src/ layout.

  • Includes a pyproject.toml for project and tools configuration.

  • Allows for the selection of the build-system between flit, poetry or setuptools.

  • Includes doc/ and tests/.

  • Allows CI platform selection between GitHub and Azure DevOps.

  • All requirements_*.txt are contained in a requirements_/ directory.

  • Includes a tox.ini file.

  • Ability to integrate Docker within the project.

To create a new project using this template, run:

ansys-templates new pyace-pkg

pyace-fast template#

This template renders to a basic Python project compliant with the latest ACE guidelines and focused on FastAPI development:

Main features of this package are:

  • Focused on FastAPI development.

  • Uses a src/ layout.

  • Includes a pyproject.toml for project and tools configuration.

  • Allows for the selection of the build-system between flit, poetry or setuptools.

  • Includes doc/ and tests/.

  • Allows CI platform selection between GitHub and Azure DevOps.

  • All requirements_*.txt are contained in a requirements_/ directory.

  • Includes a tox.ini file.

  • Ability to integrate Docker within the project.

To create a new project using this template, run: .. code-block:: text

ansys-templates new pyace-fast

pyace-flask template#

This template renders to a basic Python project compliant with the latest ACE guidelines and focused on Flask development:

Main features of this package are:

  • Focused on Flask development.

  • Uses a src/ layout.

  • Includes a pyproject.toml for project and tools configuration.

  • Allows for the selection of the build-system between flit, poetry or setuptools.

  • Includes doc/ and tests/.

  • Allows CI platform selection between GitHub and Azure DevOps.

  • All requirements_*.txt are contained in a requirements_/ directory.

  • Includes a tox.ini file.

  • Ability to integrate Docker within the project.

To create a new project using this template, run:

ansys-templates new pyace-flask

pyace-grpc template#

This template renders to a basic Python project compliant with the latest ACE guidelines and focused on GRPC development:

Main features of this package are:

  • Focused on GRPC development.

  • Uses a src/ layout.

  • Includes a pyproject.toml for project and tools configuration.

  • Allows for the selection of the build-system between flit, poetry or setuptools.

  • Includes doc/ and tests/.

  • Allows CI platform selection between GitHub and Azure DevOps.

  • All requirements_*.txt are contained in a requirements_/ directory.

  • Includes a tox.ini file.

  • Ability to integrate Docker within the project.

To create a new project using this template, run: .. code-block:: text

ansys-templates new pyace-grpc

solution template#

This template renders to a Python project compliant with the latest Solutions Application guidelines:

Main features of this package are:

  • The build system is imposed to be poetry.

  • Uses a src/ layout.

  • Includes a pyproject.toml for project and tools configuration.

  • Includes doc/ and tests/.

  • Includes GitHub workflows (actions).

  • All requirements_*.txt are contained in a requirements_/ directory.

  • Includes a tox.ini file.

To create a new project using this template, run: .. code-block:: text

ansys-templates new solution