Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.4.1 instead.
Reason given by maintainers: Packaging issue: Python files are missing from the sdist

PyACP Logo

PyAnsys Python PyPI GH-CI Codecov MIT Black

A Python client for Ansys Composite PrepPost (ACP).

Installation

Install PyACP with:

pip install ansys-acp-core[all]

For installing PyACP in development mode, see the Development Setup instructions below.

Documentation

The PyACP documentation can be viewed online at https://acp.docs.pyansys.com.

Getting Started

Launching ACP

The ACP server can be started with launch_acp:

import ansys.acp.core as pyacp

acp = pyacp.launch_acp()

Basic Usage

Once the server is running, we can start working with PyACP. For example, to load an ACP Model from an existing file:

>>> remote_path = acp.upload_file(local_path="<MODEL_PATH>")
>>> model = acp.import_model(path=remote_path)
>>> model.name
'ACP Model'

Development Setup

Installation

Installing PyACP 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, and entering the newly created directory:

    git clone https://github.com/ansys/pyacp
    cd pyacp
  2. Make sure you have the latest version of uv, using one of the methods described at https://docs.astral.sh/uv/getting-started/installation/.

    4. Install the project and all its development dependencies using uv. This also takes care of creating a new virtual environment:

    uv sync --all-groups --all-extras

    This step installs PyACP in an editable mode (no build step is needed, no re-install when changing the code).

  1. Activate your development virtual environment with:

    source .venv/bin/activate

    On Windows PowerShell:

    .venv\Scripts\Activate.ps1

Testing

The PyACP test suite uses pytest. You can run it with

pytest --license-server=<YOUR_LICENSE_SERVER> tests/unittests

Benchmarking

As part of the test suite, we run some performance benchmarks. These can be run with

pytest --license-server=<YOUR_LICENSE_SERVER> tests/benchmarks

Additional options can be found in the pytest-benchmark documentation.

NOTE: The benchmarks use the tc-netem Linux kernel module to simulate a slow network connection within a Docker container. This is available only on Linux, not on Docker for MacOS or Windows.

The benchmark results from the main branch are uploaded to https://acp.docs.pyansys.com/benchmarks.

Pre-commit hooks

Style and linter checks are run through the pre-commit tool. You can run these checks with

pre-commit run --all-files

We also recommend installing pre-commit into your repository:

pre-commit install

This will run the pre-commit hooks on the changed files before every git commit. If you ever need to create a commit without running the hooks, you can skip them with git commit -n.

Documentation

Basic documentation build

To build the documentation, run the following commands:

On Linux & MacOS:

make -C doc html

On Windows:

cd doc; .\make.bat html

The generated HTML files can be viewed with the browser of your choice.

This method of building the documentation will run the examples with the default or currently configured launch options for the ACP, MAPDL, and DPF servers. Make sure to have these installed and configured correctly, or alternatively follow the Docker-based instructions below.

Alternative: start services with docker

Alternatively, you can use the provided docker-compose file to start the MAPDL and DPF servers.

First, review the DPF preview license agreement, and if you agree, set the ANSYS_DPF_ACCEPT_LA environment variable to Y. See the PyDPF documentation for details.

On Windows, you can then use the shipped shell script:

.\doc\create_doc_windows.ps1

The following manual steps can be used on any platform:

  1. Set the following additional environment variables in your shell:

    • ANSYSLMD_LICENSE_FILE: To a valid license server (e.g 1055@mylicenseserver.com).

    • PYMAPDL_PORT: Choose any free port.

    • PYMAPDL_START_INSTANCE=FALSE

    • PYDPF_COMPOSITES_DOCKER_CONTAINER_PORT: Choose any free port.

  2. Start the docker containers with:

    docker compose -f docker-compose/docker-compose-extras.yaml up -d
  3. Build the documentation with the Sphinx commands mentioned above:

    On Linux & MacOS:

    make -C doc html

    On Windows:

    cd doc; .\make.bat html

Partial builds

Two environment variables can be used to run a quicker partial documentation build:

  • PYACP_DOC_SKIP_API=1: Skip the API reference build.

  • PYACP_DOC_SKIP_GALLERY=1: Skip running the examples.

Distribution

The following commands can be used to build and check the PyACP package:

uv build
twine check dist/*

This creates both a source distribution, and a wheel file. An alternative is

pip install build
python -m build --wheel

License

PyACP is licensed under the MIT license. Please see the LICENSE for more 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_acp_core-0.4.0.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ansys_acp_core-0.4.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file ansys_acp_core-0.4.0.tar.gz.

File metadata

  • Download URL: ansys_acp_core-0.4.0.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ansys_acp_core-0.4.0.tar.gz
Algorithm Hash digest
SHA256 ab21d667a3ae8c7857498793a49de326b1b114e88ac64a65774eb719aeecebb4
MD5 9d80472f0abeca8bdeaee86693b1985e
BLAKE2b-256 8c12ff0561f9378ecd7ae8e16a687823463dd730608a7d371577b0dfcdfeb835

See more details on using hashes here.

Provenance

The following attestation bundles were made for ansys_acp_core-0.4.0.tar.gz:

Publisher: ci_cd.yml on ansys/pyacp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ansys_acp_core-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: ansys_acp_core-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ansys_acp_core-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9d6b9dbda561873b2415488f2bd30e5a2f25099cc9566c3aa641eb6255b6d1b2
MD5 0377618f2ea71f5c4cfc70a848c8264b
BLAKE2b-256 d7909d8c439bd0975f1e75f24322554fa019584db86edaae09623239fc9d32df

See more details on using hashes here.

Provenance

The following attestation bundles were made for ansys_acp_core-0.4.0-py3-none-any.whl:

Publisher: ci_cd.yml on ansys/pyacp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.4.1

2 files

This release

0.4.0 This release

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.1

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page