Skip to content

Commit 6de3d0d

Browse files
authored
Merge pull request #570 from ansys/maint/prepare_beta2_release
Release 0.1b2
2 parents 9df617e + d30ee4a commit 6de3d0d

36 files changed

+2168
-1476
lines changed

.github/workflows/ci_cd.yml

Lines changed: 58 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@ on:
1515
description: "Branch of the 'ansys-api-acp' repository used during the build."
1616
required: false
1717
docker_image_suffix:
18-
description: "Suffix of the 'pyacp' docker image used for testing. For example, ':latest', or '@sha256:<hash>' (without quotes)."
18+
description: "Suffix of the 'acp' docker image used for testing. For example, ':latest', or '@sha256:<hash>' (without quotes)."
1919
required: false
2020

2121
env:
2222
MAIN_PYTHON_VERSION: "3.12"
2323
PACKAGE_NAME: "ansys-acp-core"
2424
DOCUMENTATION_CNAME: "acp.docs.pyansys.com"
25+
API_BRANCH: ${{ github.event.inputs.api_branch || '' }}
26+
DOCKER_IMAGE_NAME: "ghcr.io/ansys/acp${{ github.event.inputs.docker_image_suffix || ':latest' }}"
2527

2628
concurrency:
2729
group: ${{ github.workflow }}-${{ github.ref }}
@@ -56,10 +58,22 @@ jobs:
5658
pip install 'poetry!=1.7.0'
5759
poetry install --with dev,test
5860
59-
- name: Install custom API branch if needed
60-
if: "${{ github.event.inputs.api_branch != '' }}"
61+
- name: Build API package from custom branch
62+
if: "${{ env.API_BRANCH != '' }}"
63+
run: |
64+
python3.10 -m venv .api_builder_venv
65+
. .api_builder_venv/bin/activate
66+
python -m pip install --upgrade pip wheel
67+
mkdir .api_package
68+
python -m pip wheel --no-deps --wheel-dir .api_package git+https://github.com/ansys/ansys-api-acp.git@${{ env.API_BRANCH }}
69+
70+
- name: Install custom API branch package
71+
if: "${{ env.API_BRANCH != '' }}"
72+
# The --no-deps flag is added since this may cause dependency conflicts with
73+
# other transitive dependencies. For example, when a newer version of protobuf
74+
# is installed.
6175
run: |
62-
poetry run pip install --force-reinstall git+https://github.com/ansys/ansys-api-acp.git@${{ github.event.inputs.api_branch }}
76+
poetry run pip install --no-deps --force-reinstall .api_package/*.whl
6377
6478
- name: Run pre-commit
6579
run: |
@@ -69,10 +83,9 @@ jobs:
6983
name: "Documentation style"
7084
runs-on: ubuntu-latest
7185
steps:
72-
- uses: ansys/actions/doc-style@v5
86+
- uses: ansys/actions/doc-style@v7
7387
with:
7488
token: ${{ secrets.GITHUB_TOKEN }}
75-
vale-version: "3.1.0"
7689

7790
build-wheelhouse:
7891
name: "Build wheelhouse"
@@ -88,7 +101,7 @@ jobs:
88101
os: macos-latest
89102
steps:
90103
- name: "Build wheelhouse and perform smoke test"
91-
uses: ansys/actions/build-wheelhouse@v5
104+
uses: ansys/actions/build-wheelhouse@v7
92105
with:
93106
library-name: ${{ env.PACKAGE_NAME }}
94107
operating-system: ${{ matrix.os }}
@@ -127,18 +140,21 @@ jobs:
127140
poetry install --with test
128141
129142
- name: Build API package from custom branch
130-
if: "${{ github.event.inputs.api_branch != '' }}"
143+
if: "${{ env.API_BRANCH != '' }}"
131144
run: |
132145
python3.10 -m venv .api_builder_venv
133146
. .api_builder_venv/bin/activate
134147
python -m pip install --upgrade pip wheel
135148
mkdir .api_package
136-
python -m pip wheel --no-deps --wheel-dir .api_package git+https://github.com/ansys/ansys-api-acp.git@${{ github.event.inputs.api_branch }}
149+
python -m pip wheel --no-deps --wheel-dir .api_package git+https://github.com/ansys/ansys-api-acp.git@${{ env.API_BRANCH }}
137150
138151
- name: Install custom API branch package
139-
if: "${{ github.event.inputs.api_branch != '' }}"
152+
if: "${{ env.API_BRANCH != '' }}"
153+
# The --no-deps flag is added since this may cause dependency conflicts with
154+
# other transitive dependencies. For example, when a newer version of protobuf
155+
# is installed.
140156
run: |
141-
poetry run pip install --force-reinstall .api_package/*.whl
157+
poetry run pip install --no-deps --force-reinstall .api_package/*.whl
142158
143159
- name: Login in Github Container registry
144160
uses: docker/login-action@v3
@@ -178,7 +194,7 @@ jobs:
178194
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' }}
179195
env:
180196
LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }}
181-
IMAGE_NAME: "ghcr.io/ansys/acp${{ github.event.inputs.docker_image_suffix || ':latest' }}"
197+
IMAGE_NAME: ${{ env.DOCKER_IMAGE_NAME }}
182198

183199
- name: Store benchmark result
184200
uses: benchmark-action/github-action-benchmark@v1
@@ -219,18 +235,21 @@ jobs:
219235
poetry install --with test,dev
220236
221237
- name: Build API package from custom branch
222-
if: "${{ github.event.inputs.api_branch != '' }}"
238+
if: "${{ env.API_BRANCH != '' }}"
223239
run: |
224240
python3.10 -m venv .api_builder_venv
225241
. .api_builder_venv/bin/activate
226242
python -m pip install --upgrade pip wheel
227243
mkdir .api_package
228-
python -m pip wheel --no-deps --wheel-dir .api_package git+https://github.com/ansys/ansys-api-acp.git@${{ github.event.inputs.api_branch }}
244+
python -m pip wheel --no-deps --wheel-dir .api_package git+https://github.com/ansys/ansys-api-acp.git@${{ env.API_BRANCH }}
229245
230246
- name: Install custom API branch package
231-
if: "${{ github.event.inputs.api_branch != '' }}"
247+
if: "${{ env.API_BRANCH != '' }}"
248+
# The --no-deps flag is added since this may cause dependency conflicts with
249+
# other transitive dependencies. For example, when a newer version of protobuf
250+
# is installed.
232251
run: |
233-
poetry run pip install --force-reinstall .api_package/*.whl
252+
poetry run pip install --no-deps --force-reinstall .api_package/*.whl
234253
235254
- name: Login in Github Container registry
236255
uses: docker/login-action@v3
@@ -264,7 +283,7 @@ jobs:
264283
xvfb-run poetry run make -C doc doctest
265284
env:
266285
LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }}
267-
IMAGE_NAME: "ghcr.io/ansys/acp${{ github.event.inputs.docker_image_suffix || ':latest' }}"
286+
IMAGE_NAME: ${{ env.DOCKER_IMAGE_NAME }}
268287
PYACP_DOC_SKIP_GALLERY: "true"
269288
PYACP_DOC_SKIP_API: "true"
270289

@@ -296,7 +315,7 @@ jobs:
296315
uses: docker/login-action@v3
297316
with:
298317
registry: ghcr.io
299-
username: pyansys-ci-bot
318+
username: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
300319
password: ${{ secrets.PYANSYS_CI_BOT_PACKAGE_TOKEN }}
301320
if: ${{ matrix.build_type == 'full' }}
302321

@@ -311,16 +330,28 @@ jobs:
311330
pip install 'poetry!=1.7.0'
312331
poetry install --with dev
313332
314-
- name: Install custom API branch if needed
315-
if: "${{ github.event.inputs.api_branch != '' }}"
333+
- name: Build API package from custom branch
334+
if: "${{ env.API_BRANCH != '' }}"
316335
run: |
317-
poetry run pip install --force-reinstall git+https://github.com/ansys/ansys-api-acp.git@${{ github.event.inputs.api_branch }}
336+
python3.10 -m venv .api_builder_venv
337+
. .api_builder_venv/bin/activate
338+
python -m pip install --upgrade pip wheel
339+
mkdir .api_package
340+
python -m pip wheel --no-deps --wheel-dir .api_package git+https://github.com/ansys/ansys-api-acp.git@${{ env.API_BRANCH }}
341+
342+
- name: Install custom API branch package
343+
if: "${{ env.API_BRANCH != '' }}"
344+
# The --no-deps flag is added since this may cause dependency conflicts with
345+
# other transitive dependencies. For example, when a newer version of protobuf
346+
# is installed.
347+
run: |
348+
poetry run pip install --no-deps --force-reinstall .api_package/*.whl
318349
319350
- name: Configure Local Product Launcher for ACP
320351
run: >
321352
poetry run
322353
ansys-launcher configure ACP docker_compose
323-
--image_name_pyacp=ghcr.io/ansys/acp${{ github.event.inputs.docker_image_suffix || ':latest' }}
354+
--image_name_pyacp=${{ env.DOCKER_IMAGE_NAME }}
324355
--image_name_filetransfer=ghcr.io/ansys/tools-filetransfer:latest
325356
--license_server=1055@$LICENSE_SERVER
326357
--keep_volume=False
@@ -394,7 +425,7 @@ jobs:
394425
timeout-minutes: 30
395426
steps:
396427
- name: Build library source and wheel artifacts
397-
uses: ansys/actions/build-library@v5
428+
uses: ansys/actions/build-library@v7
398429
with:
399430
library-name: ${{ env.PACKAGE_NAME }}
400431
python-version: ${{ env.MAIN_PYTHON_VERSION }}
@@ -406,14 +437,14 @@ jobs:
406437
runs-on: ubuntu-latest
407438
steps:
408439
- name: Release to the public PyPI repository
409-
uses: ansys/actions/release-pypi-public@v5
440+
uses: ansys/actions/release-pypi-public@v7
410441
with:
411442
library-name: ${{ env.PACKAGE_NAME }}
412443
twine-username: "__token__"
413444
twine-token: ${{ secrets.PYPI_TOKEN }}
414445

415446
- name: Release to GitHub
416-
uses: ansys/actions/release-github@v5
447+
uses: ansys/actions/release-github@v7
417448
with:
418449
library-name: ${{ env.PACKAGE_NAME }}
419450

@@ -424,7 +455,7 @@ jobs:
424455
needs: [build]
425456
steps:
426457
- name: Deploy the latest documentation
427-
uses: ansys/actions/doc-deploy-dev@v5
458+
uses: ansys/actions/doc-deploy-dev@v7
428459
with:
429460
cname: ${{ env.DOCUMENTATION_CNAME }}
430461
token: ${{ secrets.GITHUB_TOKEN }}
@@ -437,7 +468,7 @@ jobs:
437468
needs: [release]
438469
steps:
439470
- name: Deploy the stable documentation
440-
uses: ansys/actions/doc-deploy-stable@v5
471+
uses: ansys/actions/doc-deploy-stable@v7
441472
with:
442473
cname: ${{ env.DOCUMENTATION_CNAME }}
443474
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/package_cleanup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: "Delete untagged package versions"
17-
uses: ansys/actions/hk-package-clean-untagged@v5
17+
uses: ansys/actions/hk-package-clean-untagged@v7
1818
with:
1919
package-org: 'ansys'
2020
package-name: 'acp'

.pre-commit-config.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
repos:
22
- repo: https://github.com/asottile/pyupgrade
3-
rev: v3.15.1
3+
rev: v3.16.0
44
hooks:
55
- id: pyupgrade
66
args: [--py39-plus]
77

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

1313
- repo: https://github.com/adamchainz/blacken-docs
14-
rev: 1.16.0
14+
rev: 1.18.0
1515
hooks:
1616
- id: blacken-docs
17-
additional_dependencies: [black==24.2.0]
17+
additional_dependencies: [black==24.4.2]
1818

1919
- repo: https://github.com/pycqa/isort
2020
rev: "5.13.2"
2121
hooks:
2222
- id: isort
2323

2424
- repo: https://github.com/PyCQA/flake8
25-
rev: "7.0.0"
25+
rev: "7.1.0"
2626
hooks:
2727
- id: flake8
2828

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

3636
- repo: https://github.com/python-poetry/poetry/
3737
rev: "1.8.0"
@@ -61,7 +61,7 @@ repos:
6161
]
6262

6363
- repo: https://github.com/ansys/pre-commit-hooks
64-
rev: v0.2.9
64+
rev: v0.3.1
6565
hooks:
6666
- id: add-license-headers
6767
args: ["--start_year", "2022"]

LICENSE

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
MIT License
22

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

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

1212
The above copyright notice and this permission notice shall be included in all
1313
copies or substantial portions of the Software.

README.rst

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ PyACP
1010
:target: https://pypi.org/project/ansys-acp-core
1111
:alt: Python
1212

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

@@ -33,10 +33,6 @@ PyACP
3333

3434
A Python client for Ansys Composite PrepPost (ACP).
3535

36-
.. note::
37-
38-
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.
39-
4036
Overview
4137
--------
4238

doc/source/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
errors.txt
2+
sg_execution_times.rst

doc/source/_templates/autosummary/no_methods_doc/class.rst.jinja2

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
.. autosummary::
1212
:toctree:
1313
{% for item in attributes %}
14-
{{ name }}.{{ item }}
14+
{% if item not in inherited_members %}
15+
{{ name }}.{{ item }}
16+
{% endif %}
1517
{%- endfor %}
1618
{% endif %}
1719
{% endblock %}

doc/source/api/enum_types.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Enumeration data types
77
:toctree: _autosummary
88
:template: autosummary/no_methods_doc/class.rst.jinja2
99

10+
ArrowType
1011
BooleanOperationType
1112
CutoffMaterialType
1213
CutoffRuleType
@@ -23,7 +24,9 @@ Enumeration data types
2324
LookUpTable3DInterpolationAlgorithm
2425
LookUpTableColumnValueType
2526
NodalDataType
27+
OffsetType
2628
PlyCutoffType
29+
PlyGeometryExportFormat
2730
PlyType
2831
RosetteSelectionMethod
2932
RosetteType

doc/source/api/internal.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Internal objects
3131
_tree_objects.base.CreatableTreeObject
3232
_tree_objects.base.TreeObject
3333
_tree_objects.base.TreeObjectBase
34+
_tree_objects.base.ServerWrapper
3435
_tree_objects.material.property_sets.wrapper.TC
3536
_tree_objects.material.property_sets.wrapper.TV
3637
_workflow._LocalWorkingDir

0 commit comments

Comments
 (0)