Skip to main content

A python wrapper for Ansys SimAI

Project description

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:

python -m pip install -U pip

Then, you can simply execute:

python -m pip install ansys-simai-core

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:

    git clone https://github.com/ansys/pysimai
  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

    • For Linux/Mac:

      pdm install
      eval $(pdm venv activate)
    • For Windows:

      pdm install
      Invoke-Expression (pdm venv activate)
  4. Finally, verify your development installation by running:

    python -m pip install tox
    tox

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: checks 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:

python -m pip install pre-commit && pre-commit install

Documentation

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

make -C doc/ html && open doc/html/index.html

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

tox -e doc && open .tox/doc_out/index.html

Distributing

PDM commands can help you build or publish the package

pdm build
pdm publish

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ansys_simai_core-0.2.1.tar.gz (66.5 kB view details)

Uploaded Source

Built Distribution

ansys_simai_core-0.2.1-py3-none-any.whl (114.2 kB view details)

Uploaded Python 3

File details

Details for the file ansys_simai_core-0.2.1.tar.gz.

File metadata

  • Download URL: ansys_simai_core-0.2.1.tar.gz
  • Upload date:
  • Size: 66.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.14

File hashes

Hashes for ansys_simai_core-0.2.1.tar.gz
Algorithm Hash digest
SHA256 fa13dd05517b92e83e69e783c856cb262fc8f01222cdedf0a768acecc4eb5f4b
MD5 63bdee44f36a6658791dfb725d2eaa71
BLAKE2b-256 ffccda0f9d1883984ed21a327ef86dc3f9e74a3628ffca5d9c419cf0caaafa95

See more details on using hashes here.

File details

Details for the file ansys_simai_core-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ansys_simai_core-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ff654785acf16d100df99f73b310bcb72047be82a29a0cfb16873da3607e998f
MD5 becfa6971a49d934bca2fb68a8a7ace0
BLAKE2b-256 af885ef3d6b4d5c1c09789714bf332711106379ad3378c83d0a7576223c3e63d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page