PyAnsys project organization#

The PyAnsys project is a collection of many Python packages for using Ansys products through Python. The Ansys organization on GitHub contains several repositories with Python libraries for interfacing with Ansys products or services. To go to the repository for a main PyAnsys library, visit one of these links:

If you want to create, develop, or contribute to a PyAnsys library, visit these links:

Developers use the following tools to generate library packages from PROTO files, create coverage reports, and report on system coverage:

PyAnsys repository creation#

This is an overview on how to create your own PyAnsys repository in the Ansys GitHub organization. A repository is generally a project for a particular PyAnsys library.

  1. Create the repository: Create a repository from the ansys/template repository. See Creating a repository from a template in the GitHub documentation. Be sure that the repository visibility is initially private.

  2. Rename the package: Rename ansys/product/library to match your product or library. For example, the package name for PyMAPDL is ansys/mapdl/core. Do the same renaming in the setup.py file. Do this as a pull request. In fact, only add code as pull requests. Do not push to the main branch of the repository.

  3. Add source: Add your source files to ansys/<product>/<library> or create them. Also add unit tests to the tests directory, following the pytest convention. Be sure to maintain sufficient coverage when adding to your library. See the pytest-cov documentation.

    Note

    If your tests require an active service, app, or product, be sure to set it up to run in an automated manner.

  4. Update documentation: The documentation source and content vary from repository to repository. In the doc directory, there are child directories for different sections of the documentation, which can include getting started and user guides, examples, and an API reference. Ensure that all documentation is updated. See Documentation style.

  5. Prepare the package for release: When you are ready to release your package publicly, email pyansys.core@ansys.com to obtain the release checklist for obtaining official Ansys approval. Once you have completed this checklist, change the repository visibility to public and create a release branch.