How-to#

This section describes how to create effective and efficient Python libraries for interfacing with Ansys products and services. It also explains how apps and complex services expose functionalities such as logging, data transfer, and app APIs.

Prerequisites

Environment setup

How to configure your Python environment before contributing to a PyAnsys project.

Environment setup
Contributing

How to follow PyAnsys coding standards, branching, and the contribution workflow.

Contributing

Library Development

Python versions

How to define which Python versions your library supports and configure CI accordingly.

Python versions
Packaging

How to package and distribute a PyAnsys library for end users.

Packaging
gRPC API packages

How to structure gRPC API packages following PyAnsys conventions.

gRPC API packages
Logging

How to add structured logging to a PyAnsys library.

Logging
Documenting

How to write and maintain documentation following PyAnsys style guidelines.

Documenting

Quality Assurance

Testing

How to write unit and integration tests and measure code coverage.

Testing
Continuous integration

How to automate testing, linting, and builds with GitHub Actions.

Continuous integration

Security and Maintenance

Repository protection

How to secure branches, tags, and secrets in your GitHub repository.

Repository protection
Vulnerabilities

How to find and fix security vulnerabilities in a PyAnsys package.

Vulnerabilities
Product compatibility

How to manage compatibility across different Ansys product versions.

Product compatibility
Deprecating a library

How to retire a library cleanly and guide users to alternatives.

Deprecating a library

Release & Publish

DNS configuration

How to set up the documentation domain for your PyAnsys library.

DNS configuration
Releasing and publishing

How to create and publish a versioned release to PyPI.

Releasing and publishing