Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a508d4a
fix: use PYANSYS_CI_BOT_USERNAME (#523)
RobPasMue Apr 8, 2024
6542d22
fix: badges (#522)
RobPasMue Apr 8, 2024
e7cd51e
feat: allow local-product-launcher and filetransfer new versions (#524)
RobPasMue Apr 8, 2024
1f71c0c
Update pre-commit and dev dependencies (#525)
greschd Apr 9, 2024
c2bccc6
Bump the dependencies group with 4 updates (#526)
dependabot[bot] Apr 17, 2024
40ebaee
Bump ansys/actions from 5 to 6 (#530)
dependabot[bot] Apr 22, 2024
a2c52d7
Remove upper bounds on dependencies (#531)
greschd Apr 25, 2024
b47eb84
Bump the dependencies group with 7 updates (#532)
dependabot[bot] Apr 29, 2024
069645a
Bump the dependencies group with 2 updates (#534)
dependabot[bot] May 6, 2024
7c5ea14
Remove workaround for sphinx cache warning (#533)
greschd May 6, 2024
5141ff1
Skip inherited members for enums (#535)
janvonrickenbach May 13, 2024
a8b002f
Bump the dependencies group across 1 directory with 13 updates (#539)
dependabot[bot] Jun 3, 2024
15fbd57
Bump the dependencies group with 7 updates (#541)
dependabot[bot] Jun 10, 2024
ad8fb06
Bump the dependencies group across 1 directory with 9 updates (#544)
dependabot[bot] Jul 1, 2024
93ce405
CI: Fix custom API branch install (#546)
greschd Jul 3, 2024
45a364d
Bump the dependencies group with 5 updates (#547)
dependabot[bot] Jul 8, 2024
d893c29
Bump hypothesis from 6.105.1 to 6.108.1 in the dependencies group (#549)
dependabot[bot] Jul 15, 2024
66bda48
Bump the dependencies group with 9 updates
dependabot[bot] Jul 22, 2024
dba9c86
Remove now-redundant type cast
greschd Jul 22, 2024
2800e91
Bump the dependencies group with 4 updates (#551)
dependabot[bot] Jul 29, 2024
2d5db9d
Bump the dependencies group with 5 updates (#553)
dependabot[bot] Aug 5, 2024
bda6836
Bump ansys/actions from 6 to 7 (#555)
dependabot[bot] Aug 14, 2024
bb2d70e
Remove note about 2024R2 server not being released (#552)
greschd Aug 18, 2024
eb5056c
Update to ansys-sphinx-theme 1.x (#558)
greschd Aug 18, 2024
a2feb2c
Implement ply geometry export for modeling plies (#557)
greschd Aug 20, 2024
31a3798
Fix EdgePropertyList construction via _from_object_info (#562)
greschd Aug 23, 2024
acee20f
Bump the dependencies group across 1 directory with 3 updates (#568)
dependabot[bot] Aug 26, 2024
b4bba30
Accept empty resource paths in linked objects when storing (#569)
greschd Aug 26, 2024
d6c2c86
Bump version to 0.1b2
greschd Aug 26, 2024
d30ee4a
Merge branch 'release/0.1' of https://github.com/ansys/pyacp into mai…
greschd Aug 26, 2024
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
85 changes: 58 additions & 27 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ on:
description: "Branch of the 'ansys-api-acp' repository used during the build."
required: false
docker_image_suffix:
description: "Suffix of the 'pyacp' docker image used for testing. For example, ':latest', or '@sha256:<hash>' (without quotes)."
description: "Suffix of the 'acp' docker image used for testing. For example, ':latest', or '@sha256:<hash>' (without quotes)."
required: false

env:
MAIN_PYTHON_VERSION: "3.12"
PACKAGE_NAME: "ansys-acp-core"
DOCUMENTATION_CNAME: "acp.docs.pyansys.com"
API_BRANCH: ${{ github.event.inputs.api_branch || '' }}
DOCKER_IMAGE_NAME: "ghcr.io/ansys/acp${{ github.event.inputs.docker_image_suffix || ':latest' }}"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -56,10 +58,22 @@ jobs:
pip install 'poetry!=1.7.0'
poetry install --with dev,test

- name: Install custom API branch if needed
if: "${{ github.event.inputs.api_branch != '' }}"
- name: Build API package from custom branch
if: "${{ env.API_BRANCH != '' }}"
run: |
python3.10 -m venv .api_builder_venv
. .api_builder_venv/bin/activate
python -m pip install --upgrade pip wheel
mkdir .api_package
python -m pip wheel --no-deps --wheel-dir .api_package git+https://github.com/ansys/ansys-api-acp.git@${{ env.API_BRANCH }}

- name: Install custom API branch package
if: "${{ env.API_BRANCH != '' }}"
# The --no-deps flag is added since this may cause dependency conflicts with
# other transitive dependencies. For example, when a newer version of protobuf
# is installed.
run: |
poetry run pip install --force-reinstall git+https://github.com/ansys/ansys-api-acp.git@${{ github.event.inputs.api_branch }}
poetry run pip install --no-deps --force-reinstall .api_package/*.whl

- name: Run pre-commit
run: |
Expand All @@ -69,10 +83,9 @@ jobs:
name: "Documentation style"
runs-on: ubuntu-latest
steps:
- uses: ansys/actions/doc-style@v5
- uses: ansys/actions/doc-style@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
vale-version: "3.1.0"

build-wheelhouse:
name: "Build wheelhouse"
Expand All @@ -88,7 +101,7 @@ jobs:
os: macos-latest
steps:
- name: "Build wheelhouse and perform smoke test"
uses: ansys/actions/build-wheelhouse@v5
uses: ansys/actions/build-wheelhouse@v7
with:
library-name: ${{ env.PACKAGE_NAME }}
operating-system: ${{ matrix.os }}
Expand Down Expand Up @@ -127,18 +140,21 @@ jobs:
poetry install --with test

- name: Build API package from custom branch
if: "${{ github.event.inputs.api_branch != '' }}"
if: "${{ env.API_BRANCH != '' }}"
run: |
python3.10 -m venv .api_builder_venv
. .api_builder_venv/bin/activate
python -m pip install --upgrade pip wheel
mkdir .api_package
python -m pip wheel --no-deps --wheel-dir .api_package git+https://github.com/ansys/ansys-api-acp.git@${{ github.event.inputs.api_branch }}
python -m pip wheel --no-deps --wheel-dir .api_package git+https://github.com/ansys/ansys-api-acp.git@${{ env.API_BRANCH }}

- name: Install custom API branch package
if: "${{ github.event.inputs.api_branch != '' }}"
if: "${{ env.API_BRANCH != '' }}"
# The --no-deps flag is added since this may cause dependency conflicts with
# other transitive dependencies. For example, when a newer version of protobuf
# is installed.
run: |
poetry run pip install --force-reinstall .api_package/*.whl
poetry run pip install --no-deps --force-reinstall .api_package/*.whl

- name: Login in Github Container registry
uses: docker/login-action@v3
Expand Down Expand Up @@ -178,7 +194,7 @@ jobs:
poetry run pytest -v --license-server=1055@$LICENSE_SERVER --no-server-log-files --docker-image=$IMAGE_NAME --build-benchmark-image --benchmark-json benchmark_output.json --benchmark-group-by=fullname ${{ (matrix.python-version == '3.9' && github.ref == 'refs/heads/main') && ' ' || '--validate-benchmarks-only' }}
env:
LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }}
IMAGE_NAME: "ghcr.io/ansys/acp${{ github.event.inputs.docker_image_suffix || ':latest' }}"
IMAGE_NAME: ${{ env.DOCKER_IMAGE_NAME }}

- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
Expand Down Expand Up @@ -219,18 +235,21 @@ jobs:
poetry install --with test,dev

- name: Build API package from custom branch
if: "${{ github.event.inputs.api_branch != '' }}"
if: "${{ env.API_BRANCH != '' }}"
run: |
python3.10 -m venv .api_builder_venv
. .api_builder_venv/bin/activate
python -m pip install --upgrade pip wheel
mkdir .api_package
python -m pip wheel --no-deps --wheel-dir .api_package git+https://github.com/ansys/ansys-api-acp.git@${{ github.event.inputs.api_branch }}
python -m pip wheel --no-deps --wheel-dir .api_package git+https://github.com/ansys/ansys-api-acp.git@${{ env.API_BRANCH }}

- name: Install custom API branch package
if: "${{ github.event.inputs.api_branch != '' }}"
if: "${{ env.API_BRANCH != '' }}"
# The --no-deps flag is added since this may cause dependency conflicts with
# other transitive dependencies. For example, when a newer version of protobuf
# is installed.
run: |
poetry run pip install --force-reinstall .api_package/*.whl
poetry run pip install --no-deps --force-reinstall .api_package/*.whl

- name: Login in Github Container registry
uses: docker/login-action@v3
Expand Down Expand Up @@ -264,7 +283,7 @@ jobs:
xvfb-run poetry run make -C doc doctest
env:
LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }}
IMAGE_NAME: "ghcr.io/ansys/acp${{ github.event.inputs.docker_image_suffix || ':latest' }}"
IMAGE_NAME: ${{ env.DOCKER_IMAGE_NAME }}
PYACP_DOC_SKIP_GALLERY: "true"
PYACP_DOC_SKIP_API: "true"

Expand Down Expand Up @@ -296,7 +315,7 @@ jobs:
uses: docker/login-action@v3
with:
registry: ghcr.io
username: pyansys-ci-bot
username: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
password: ${{ secrets.PYANSYS_CI_BOT_PACKAGE_TOKEN }}
if: ${{ matrix.build_type == 'full' }}

Expand All @@ -311,16 +330,28 @@ jobs:
pip install 'poetry!=1.7.0'
poetry install --with dev

- name: Install custom API branch if needed
if: "${{ github.event.inputs.api_branch != '' }}"
- name: Build API package from custom branch
if: "${{ env.API_BRANCH != '' }}"
run: |
poetry run pip install --force-reinstall git+https://github.com/ansys/ansys-api-acp.git@${{ github.event.inputs.api_branch }}
python3.10 -m venv .api_builder_venv
. .api_builder_venv/bin/activate
python -m pip install --upgrade pip wheel
mkdir .api_package
python -m pip wheel --no-deps --wheel-dir .api_package git+https://github.com/ansys/ansys-api-acp.git@${{ env.API_BRANCH }}

- name: Install custom API branch package
if: "${{ env.API_BRANCH != '' }}"
# The --no-deps flag is added since this may cause dependency conflicts with
# other transitive dependencies. For example, when a newer version of protobuf
# is installed.
run: |
poetry run pip install --no-deps --force-reinstall .api_package/*.whl

- name: Configure Local Product Launcher for ACP
run: >
poetry run
ansys-launcher configure ACP docker_compose
--image_name_pyacp=ghcr.io/ansys/acp${{ github.event.inputs.docker_image_suffix || ':latest' }}
--image_name_pyacp=${{ env.DOCKER_IMAGE_NAME }}
--image_name_filetransfer=ghcr.io/ansys/tools-filetransfer:latest
--license_server=1055@$LICENSE_SERVER
--keep_volume=False
Expand Down Expand Up @@ -394,7 +425,7 @@ jobs:
timeout-minutes: 30
steps:
- name: Build library source and wheel artifacts
uses: ansys/actions/build-library@v5
uses: ansys/actions/build-library@v7
with:
library-name: ${{ env.PACKAGE_NAME }}
python-version: ${{ env.MAIN_PYTHON_VERSION }}
Expand All @@ -406,14 +437,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Release to the public PyPI repository
uses: ansys/actions/release-pypi-public@v5
uses: ansys/actions/release-pypi-public@v7
with:
library-name: ${{ env.PACKAGE_NAME }}
twine-username: "__token__"
twine-token: ${{ secrets.PYPI_TOKEN }}

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

Expand All @@ -424,7 +455,7 @@ jobs:
needs: [build]
steps:
- name: Deploy the latest documentation
uses: ansys/actions/doc-deploy-dev@v5
uses: ansys/actions/doc-deploy-dev@v7
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -437,7 +468,7 @@ jobs:
needs: [release]
steps:
- name: Deploy the stable documentation
uses: ansys/actions/doc-deploy-stable@v5
uses: ansys/actions/doc-deploy-stable@v7
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/package_cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Delete untagged package versions"
uses: ansys/actions/hk-package-clean-untagged@v5
uses: ansys/actions/hk-package-clean-untagged@v7
with:
package-org: 'ansys'
package-name: 'acp'
Expand Down
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.1
rev: v3.16.0
hooks:
- id: pyupgrade
args: [--py39-plus]

- repo: https://github.com/psf/black
rev: "24.2.0" # when changed, also update the version in blacken-docs
rev: "24.4.2" # when changed, also update the version in blacken-docs
hooks:
- id: black

- repo: https://github.com/adamchainz/blacken-docs
rev: 1.16.0
rev: 1.18.0
hooks:
- id: blacken-docs
additional_dependencies: [black==24.2.0]
additional_dependencies: [black==24.4.2]

- repo: https://github.com/pycqa/isort
rev: "5.13.2"
hooks:
- id: isort

- repo: https://github.com/PyCQA/flake8
rev: "7.0.0"
rev: "7.1.0"
hooks:
- id: flake8

- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
rev: v2.3.0
hooks:
- id: codespell
additional_dependencies: ["tomli"] # needed to parse pyproject.toml
exclude: '^poetry\.lock$'
exclude: '^poetry\.lock|pyproject\.toml$'

- repo: https://github.com/python-poetry/poetry/
rev: "1.8.0"
Expand Down Expand Up @@ -61,7 +61,7 @@ repos:
]

- repo: https://github.com/ansys/pre-commit-hooks
rev: v0.2.9
rev: v0.3.1
hooks:
- id: add-license-headers
args: ["--start_year", "2022"]
Expand Down
14 changes: 7 additions & 7 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
MIT License

Copyright (c) 2022 - 2024 ANSYS, Inc. All rights reserved.
Copyright (c) 2022 - 2024 ANSYS, Inc. and/or its affiliates.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
Expand Down
6 changes: 1 addition & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ PyACP
:target: https://pypi.org/project/ansys-acp-core
:alt: Python

.. |pypi| image:: https://img.shields.io/pypi/v/pyacp.svg?logo=python&logoColor=white
.. |pypi| image:: https://img.shields.io/pypi/v/ansys-acp-core.svg?logo=python&logoColor=white
:target: https://pypi.org/project/ansys-acp-core
:alt: PyPI

Expand All @@ -33,10 +33,6 @@ PyACP

A Python client for Ansys Composite PrepPost (ACP).

.. note::

PyACP requires Ansys 2024 R2 to run. Unless you have advance access to the Ansys 2024 R2 release, you will not be able to use PyACP until the release is publicly available.

Overview
--------

Expand Down
1 change: 1 addition & 0 deletions doc/source/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
errors.txt
sg_execution_times.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
.. autosummary::
:toctree:
{% for item in attributes %}
{{ name }}.{{ item }}
{% if item not in inherited_members %}
{{ name }}.{{ item }}
{% endif %}
{%- endfor %}
{% endif %}
{% endblock %}
3 changes: 3 additions & 0 deletions doc/source/api/enum_types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Enumeration data types
:toctree: _autosummary
:template: autosummary/no_methods_doc/class.rst.jinja2

ArrowType
BooleanOperationType
CutoffMaterialType
CutoffRuleType
Expand All @@ -23,7 +24,9 @@ Enumeration data types
LookUpTable3DInterpolationAlgorithm
LookUpTableColumnValueType
NodalDataType
OffsetType
PlyCutoffType
PlyGeometryExportFormat
PlyType
RosetteSelectionMethod
RosetteType
Expand Down
1 change: 1 addition & 0 deletions doc/source/api/internal.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Internal objects
_tree_objects.base.CreatableTreeObject
_tree_objects.base.TreeObject
_tree_objects.base.TreeObjectBase
_tree_objects.base.ServerWrapper
_tree_objects.material.property_sets.wrapper.TC
_tree_objects.material.property_sets.wrapper.TV
_workflow._LocalWorkingDir
Loading