ansys / pysimai

A Python wrapper for Ansys SimAI

Home Page:http://simai.docs.pyansys.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PySimAI

PyAnsys Python PyPI GH-CI Codecov MIT Ruff

A Python wrapper for Ansys SimAI

How to install

At least two installation modes are provided: user and developer.

For users

In order to install PySimAI, make sure you have the latest version of pip. To do so, run:

Then, you can simply execute:

For developers

Installing PySimAI in developer mode allows you to modify the source and enhance it.

Before contributing to the project, please refer to the PyAnsys Developer's guide. You will need to follow these steps:

  1. Start by cloning this repository:

  2. Install PDM. NB: If you are a Windows user, make sure that Python is installed on your system and it is added to the Path.
  3. Use PDM to create a virtual env with the dependencies and activate it
  4. Finally, verify your development installation by running:

How to test

This project takes advantage of tox. This tool allows to automate common development tasks (similar to Makefile) but it is oriented towards Python development.

Using tox

As Makefile has rules, tox has environments. In fact, the tool creates its own virtual environment so anything being tested is isolated from the project in order to guarantee project's integrity. The following environments commands are provided:

  • tox -e style: will check for coding style quality.
  • tox -e py: checks for unit tests.
  • tox -e py-coverage: checks for unit testing and code coverage.
  • tox -e doc: checs for documentation building process.

Raw testing

If required, you can always call the style commands (ruff) or unit testing ones (pytest) from the command line. However, this does not guarantee that your project is being tested in an isolated environment, which is the reason why tools like tox exist.

A note on pre-commit

The style checks take advantage of pre-commit. Developers are not forced but encouraged to install this tool via:

Documentation

For building documentation, you can either run the usual rules provided in the Sphinx Makefile, such as:

However, the recommended way of checking documentation integrity is using:

Distributing

PDM commands can help you build or publish the package

About

A Python wrapper for Ansys SimAI

http://simai.docs.pyansys.com/

License:MIT License


Languages

Language:Python 100.0%