Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 21 additions & 14 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ on:

env:
DOCKER_IMAGE_NAME: ghcr.io/ansys/prime
DOCKER_IMAGE_TAG: '25.1.1'
MAIN_PYTHON_VERSION: '3.12'
DOCKER_IMAGE_TAG: '25.1.4'
MAIN_PYTHON_VERSION: '3.10'
PACKAGE_NAME: 'ansys-meshing-prime'
PACKAGE_NAMESPACE: 'ansys.meshing.prime'
DOCUMENTATION_CNAME: 'prime.docs.pyansys.com'
Expand All @@ -35,7 +35,7 @@ jobs:
contents: write
pull-requests: write
steps:
- uses: ansys/actions/doc-deploy-changelog@v8
- uses: ansys/actions/doc-deploy-changelog@v9
with:
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
Expand All @@ -46,7 +46,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: PyAnsys code style checks
uses: ansys/actions/code-style@v8
uses: ansys/actions/code-style@v9
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
vale-config: "doc/.vale.ini"
Expand All @@ -57,7 +57,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: PyAnsys documentation style checks
uses: ansys/actions/doc-style@v8
uses: ansys/actions/doc-style@v9
with:
token: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -77,7 +77,7 @@ jobs:
os: macos-latest
steps:
- name: Build wheelhouse and perform smoke test
uses: ansys/actions/build-wheelhouse@v8
uses: ansys/actions/build-wheelhouse@v9
with:
library-name: ${{ env.PACKAGE_NAME }}
library-namespace: ${{ env.PACKAGE_NAMESPACE }}
Expand All @@ -100,10 +100,13 @@ jobs:
run: docker pull ${{ env.DOCKER_IMAGE_NAME }}:${{ env.DOCKER_IMAGE_TAG }}

- name: Setup headless display
uses: pyvista/setup-headless-display-action@v3
uses: pyvista/setup-headless-display-action@v4

- name: Install compatible pyvista and vtk
run: pip install "pyvista>=0.42" vtk

- name: "Run Ansys documentation building action"
uses: ansys/actions/doc-build@v8
uses: ansys/actions/doc-build@v9
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
check-links: false
Expand All @@ -114,6 +117,7 @@ jobs:
PYPRIMEMESH_SPHINX_BUILD: 1
PYPRIMEMESH_IMAGE_TAG: ${{ env.DOCKER_IMAGE_TAG }}
ANSYSLMD_LICENSE_FILE: '1055@${{ secrets.LICENSE_SERVER }}'
PRIME_MODE: "GRPC_INSECURE"

testing:
name: Run Unit Tests
Expand All @@ -137,9 +141,12 @@ jobs:
path: tests/graphics/image_cache
key: pyvista-image-cache-${{ runner.os }}-v-${{ env.RESET_IMAGE_CACHE }}-${{ hashFiles('pyproject.toml') }}
restore-keys: pyvista-image-cache-${{ runner.os }}-v-${{ env.RESET_IMAGE_CACHE }}

- name: Install compatible pyvista and vtk
run: pip install "pyvista>=0.42" vtk

- name: "Run pytest"
uses: ansys/actions/tests-pytest@v8
uses: ansys/actions/tests-pytest@v9
env:
PYPRIMEMESH_LAUNCH_CONTAINER: 1
PYPRIMEMESH_IMAGE_TAG: ${{ env.DOCKER_IMAGE_TAG }}
Expand All @@ -164,7 +171,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Build library source and wheel artifacts
uses: ansys/actions/build-library@v8
uses: ansys/actions/build-library@v9
with:
library-name: ${{ env.PACKAGE_NAME }}
python-version: ${{ env.MAIN_PYTHON_VERSION }}
Expand All @@ -176,14 +183,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Release to the public PyPI repository
uses: ansys/actions/release-pypi-public@v8
uses: ansys/actions/release-pypi-public@v9
with:
library-name: ${{ env.PACKAGE_NAME }}
twine-username: "__token__"
twine-token: ${{ secrets.PYPI_TOKEN }}

- name: Release to GitHub
uses: ansys/actions/release-github@v8
uses: ansys/actions/release-github@v9
with:
library-name: ${{ env.PACKAGE_NAME }}

Expand All @@ -194,7 +201,7 @@ jobs:
needs: [package]
steps:
- name: Deploy the latest documentation
uses: ansys/actions/doc-deploy-dev@v8
uses: ansys/actions/doc-deploy-dev@v9
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
Expand All @@ -208,7 +215,7 @@ jobs:
needs: [release]
steps:
- name: Deploy the stable documentation
uses: ansys/actions/doc-deploy-stable@v8
uses: ansys/actions/doc-deploy-stable@v9
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
Expand Down
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,48 @@ This project uses [towncrier](https://towncrier.readthedocs.io/) and the changes

<!-- towncrier release notes start -->

## [0.8.2](https://github.com/ansys/pyprimemesh/releases/tag/v0.8.2) - December 15, 2025


### Documentation

- updates to release/0.8 [#1188](https://github.com/ansys/pyprimemesh/pull/1188)

## [0.8.1](https://github.com/ansys/pyprimemesh/releases/tag/v0.8.1) - May 09, 2025


### Maintenance

- updated docker image tag for SP2 changes [#997](https://github.com/ansys/pyprimemesh/pull/997)

## [0.8.1](https://github.com/ansys/pyprimemesh/releases/tag/v0.8.1) - April 29, 2025


### Dependencies

- build(deps): bump sphinx from 8.2.1 to 8.2.3 in the doc-dependencies group [#990](https://github.com/ansys/pyprimemesh/pull/990)
- build(deps): bump ansys-sphinx-theme[autoapi] from 1.3.2 to 1.3.3 in the doc-dependencies group [#992](https://github.com/ansys/pyprimemesh/pull/992)
- build(deps): bump the test-dependencies group across 1 directory with 2 updates [#993](https://github.com/ansys/pyprimemesh/pull/993)
- build(deps): bump ansys-sphinx-theme[autoapi] from 1.3.3 to 1.4.2 in the doc-dependencies group [#994](https://github.com/ansys/pyprimemesh/pull/994)
- build(deps): bump pytest-cov from 6.0.0 to 6.1.1 in the test-dependencies group [#996](https://github.com/ansys/pyprimemesh/pull/996)


### Miscellaneous

- Sync ADO changes for sp2 [#1000](https://github.com/ansys/pyprimemesh/pull/1000)
- minor fix for release/0.8.1 [#1004](https://github.com/ansys/pyprimemesh/pull/1004)


### Documentation

- Update fileio.rst [#980](https://github.com/ansys/pyprimemesh/pull/980)


### Maintenance

- chore: update CHANGELOG for v0.8.0 [#988](https://github.com/ansys/pyprimemesh/pull/988)
- updated docker image tag for SP2 changes [#997](https://github.com/ansys/pyprimemesh/pull/997)

## [0.8.0](https://github.com/ansys/pyprimemesh/releases/tag/v0.8.0) - 2025-02-27


Expand Down
1 change: 0 additions & 1 deletion doc/changelog.d/980.documentation.md

This file was deleted.

1 change: 0 additions & 1 deletion doc/changelog.d/988.maintenance.md

This file was deleted.

1 change: 0 additions & 1 deletion doc/changelog.d/990.dependencies.md

This file was deleted.

1 change: 0 additions & 1 deletion doc/changelog.d/992.dependencies.md

This file was deleted.

1 change: 0 additions & 1 deletion doc/changelog.d/993.dependencies.md

This file was deleted.

1 change: 0 additions & 1 deletion doc/changelog.d/994.dependencies.md

This file was deleted.

1 change: 0 additions & 1 deletion doc/changelog.d/996.dependencies.md

This file was deleted.

1 change: 1 addition & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

from ansys.meshing.prime import __version__

os.environ["PRIME_MODE"] = "GRPC_INSECURE"
viz_interface.DOCUMENTATION_BUILD = True

# Project information
Expand Down
54 changes: 54 additions & 0 deletions doc/source/getting_started/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,60 @@ To install a basic version of the client, use this command instead:

pip install -e .

Connecting through gRPC
-----------------------

PyPrimeMesh uses gRPC to provide secure communications between client and server.
When you run the client and server on the same machine:

- For Linux OS, PyPrimeMesh uses UDS (Unix Domain Socket) for communications.

- For Windows OS, PyPrimeMesh uses interceptor to validate gRPC connections,
ensures the client is running on the same Windows user account as the server and authenticates the client.

When you launch PyPrimeMesh, gRPC establishes a connection between the Client and Server
through the secure option. **Secure** is the default option when you use launch_prime().
You should always use the **Secure** option to establish a secured connection between the client and server.

When you want to make an insecure connection between the client and server,
you may need to specify the connection type as follows:

.. code-block:: python

client = prime.launch_prime(
connection_type=prime.internals.config.ConnectionType.GRPC_INSECURE
)

.. note::
Insecure option is not recommended.

Connect securely using certificates
--------------------------------------

PyPrimeMesh offers secure connection using certificates. For secure connection with mutual TLS (mTLS), you may pass a client certificate directory and server certificate directory using client_certs_dir and server_certs_dir respectively to launch_prime().

client_certs_dir should contain the following files:

- client.crt

- client.key

- ca.crt

server_certs_dir should contain the following files:

- server.crt

- server.key

- ca.crt

.. note::
- Ensure that ca.crt file is the same for the client and the server. You should not modify the
file names in the client_certs_dir and server_certs_dir respectively.

- The path of input the files must be the same for server and client and should be on the shared network.


Dependencies
------------
Expand Down
1 change: 1 addition & 0 deletions doc/styles/config/vocabularies/ANSYS/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ automesh
Boolean
BRep
CAD
client_certs_dir
conformally
[Dd]efeature
defeaturing
Expand Down
30 changes: 28 additions & 2 deletions docker/build_docker_linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,38 @@ def create_docker_image(dest_package_path):

# Build the docker image
print(">>> Building docker image. This might take some time...")
# Parse version from AWP_ROOT or command line argument
version = "latest" # default
if len(sys.argv) >= 3:
version = sys.argv[2]

# Get the script directory for robust file path handling
script_dir = os.path.dirname(os.path.abspath(__file__))
dockerfile_path = os.path.join(script_dir, "linux", "Dockerfile")

# Verify Dockerfile exists
if not os.path.exists(dockerfile_path):
print(f"XXXXXXX Dockerfile not found at {dockerfile_path}. Exiting process. XXXXXXX")
exit(1)

# Build Docker image with version tag
image_tag = f"ghcr.io/ansys/prime:{version}"
print(f">>> Building Docker image with tag: {image_tag}")

out = subprocess.run(
["docker", "build", "-f", "linux/Dockerfile", "-t", "ghcr.io/ansys/prime:latest", "."],
cwd=os.path.dirname(os.path.abspath(__file__)),
["docker", "build", "-f", dockerfile_path, "-t", image_tag, script_dir],
capture_output=True,
)

# Check if docker build was successful
if out.returncode != 0:
print("XXXXXXX Docker build failed. XXXXXXX")
print("STDOUT:", out.stdout.decode())
print("STDERR:", out.stderr.decode())
exit(1)
else:
print(f">>> Docker image built successfully with tag: {image_tag}")


# -------------------------------------------------------------------------------
#
Expand Down
2 changes: 1 addition & 1 deletion docker/linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ ENV AWP_ROOT251="/prime"
LABEL org.opencontainers.image.authors="ANSYS Inc."
LABEL org.opencontainers.image.vendor="ANSYS Inc."

ENTRYPOINT [ "/prime/meshing/Prime/runPrime.sh", "server", "--ip", "0.0.0.0" ]
ENTRYPOINT [ "/prime/meshing/Prime/runPrime.sh", "server", "--ip", "0.0.0.0" ]
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi"

[project]
name = "ansys-meshing-prime"
version = "0.8.0"
version = "0.8.2"
description = "PyPrimeMesh is a Python client to Ansys Prime Server, which delivers core Ansys meshing technology."
readme = "README.md"
requires-python = ">=3.10,<4"
Expand Down Expand Up @@ -37,17 +37,17 @@ tests = [
"pytest-cov==6.1.1",
"pytest-pyvista==0.1.9",
"pytest-xvfb==3.1.1",
"pyvista[trame]==0.44.2"
"pyvista[trame]<=0.45.3"
]
doc = [
"ansys-sphinx-theme[autoapi]==1.4.2",
"ansys-tools-visualization-interface==0.8.3",
"ansys-tools-visualization-interface<=0.11.0",
"jupyter-sphinx==0.5.3",
"numpydoc==1.8.0",
"sphinx==8.2.3",
"sphinx>=8.0.0,<8.2.0",
"sphinx_design==0.6.1",
"pyvista==0.44.2",
"sphinx-autodoc-typehints==3.1.0",
"sphinx-autodoc-typehints==3.0.1",
"sphinx-copybutton==0.5.2",
"sphinx-gallery==0.19.0",
"sphinx-notfound-page==1.1.0",
Expand Down
2 changes: 1 addition & 1 deletion src/ansys/meshing/prime/autogen/automesh.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates.
# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
Expand Down
2 changes: 1 addition & 1 deletion src/ansys/meshing/prime/autogen/automeshstructs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates.
# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
Expand Down
2 changes: 1 addition & 1 deletion src/ansys/meshing/prime/autogen/autoquadmesher.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates.
# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
Expand Down
2 changes: 1 addition & 1 deletion src/ansys/meshing/prime/autogen/autoquadmesherstructs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates.
# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
Expand Down
2 changes: 1 addition & 1 deletion src/ansys/meshing/prime/autogen/boundaryfittednurbs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates.
# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
Expand Down
2 changes: 1 addition & 1 deletion src/ansys/meshing/prime/autogen/collapsetool.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates.
# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
Expand Down
2 changes: 1 addition & 1 deletion src/ansys/meshing/prime/autogen/collapsetoolstructs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates.
# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
Expand Down
Loading
Loading