Skip to content

Commit 72c763c

Browse files
Revathyvenugopal162franknli
authored andcommitted
fix: update workflow and dependencies (#56)
1 parent ec2761c commit 72c763c

File tree

8 files changed

+31
-77
lines changed

8 files changed

+31
-77
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
name: "Code style"
2626
runs-on: ubuntu-latest
2727
steps:
28-
- uses: ansys/actions/code-style@v5
28+
- uses: ansys/actions/code-style@v6
2929
with:
3030
python-version: ${{ env.MAIN_PYTHON_VERSION }}
3131

@@ -34,7 +34,7 @@ jobs:
3434
runs-on: ubuntu-latest
3535
steps:
3636
- name: "Running documentation style checks"
37-
uses: ansys/actions/doc-style@v5
37+
uses: ansys/actions/doc-style@v6
3838
with:
3939
token: ${{ secrets.GITHUB_TOKEN }}
4040

@@ -43,66 +43,21 @@ jobs:
4343
runs-on: ubuntu-latest
4444
needs: [doc-style]
4545
steps:
46-
47-
- name: "Checkout project"
48-
uses: actions/checkout@v4
49-
50-
- name: "Install Python"
51-
uses: actions/setup-python@v5
46+
- uses: ansys/actions/doc-build@v6
5247
with:
5348
python-version: ${{ env.MAIN_PYTHON_VERSION }}
5449

55-
- name: "Install project with doc dependencies"
56-
run: |
57-
sudo apt update
58-
sudo apt-get install -y build-essential texlive-latex-extra latexmk texlive-pstricks
59-
python -m pip install .[doc]
60-
61-
- name: "Install custom sphinx-autoapi branch"
62-
run: |
63-
python -m pip install \
64-
"sphinx-autoapi @ git+https://github.com/ansys/sphinx-autoapi@feat/single-page-stable"
65-
66-
- name: "Build HTML documentation"
67-
run: |
68-
make -C doc html
69-
70-
- name: "Build PDF documentation"
71-
run: |
72-
make -C doc pdf
73-
74-
- name: "Upload HTML documentation artifact"
75-
uses: actions/upload-artifact@v3
76-
with:
77-
name: documentation-html
78-
path: doc/_build/html
79-
retention-days: 7
80-
81-
- name: "Upload PDF documentation artifact"
82-
uses: actions/upload-artifact@v3
83-
with:
84-
name: documentation-pdf
85-
path: doc/_build/latex/*.pdf
86-
retention-days: 7
87-
88-
# TODO: restore these step in favor of previous ones this PR is merged
89-
# https://github.com/readthedocs/sphinx-autoapi/pull/399
90-
#
91-
# - uses: ansys/actions/doc-build@v4
92-
# with:
93-
# python-version: ${{ env.MAIN_PYTHON_VERSION }}
94-
9550
build-wheelhouse:
9651
name: "Build wheelhouse for latest Python versions"
9752
runs-on: ${{ matrix.os }}
9853
needs: [code-style]
9954
strategy:
10055
matrix:
10156
os: [ubuntu-latest, windows-latest]
102-
python-version: ['3.8', '3.9', '3.10', '3.11']
57+
python-version: ['3.9', '3.10', '3.11']
10358
steps:
10459
- name: "Build a wheelhouse for ${{ matrix.python-version }}"
105-
uses: ansys/actions/build-wheelhouse@v5
60+
uses: ansys/actions/build-wheelhouse@v6
10661
with:
10762
library-name: ${{ env.PACKAGE_NAME }}
10863
operating-system: ${{ matrix.os }}
@@ -113,7 +68,7 @@ jobs:
11368
runs-on: ubuntu-latest
11469
needs: [build-wheelhouse, doc-build]
11570
steps:
116-
- uses: ansys/actions/build-library@v5
71+
- uses: ansys/actions/build-library@v6
11772
with:
11873
library-name: ${{ env.PACKAGE_NAME }}
11974
python-version: ${{ env.MAIN_PYTHON_VERSION }}
@@ -125,14 +80,14 @@ jobs:
12580
runs-on: ubuntu-latest
12681
steps:
12782
- name: Release to the private PyPI repository
128-
uses: ansys/actions/release-pypi-private@v5
83+
uses: ansys/actions/release-pypi-private@v6
12984
with:
13085
library-name: ${{ env.PACKAGE_NAME }}
13186
twine-username: "__token__"
13287
twine-token: ${{ secrets.PYANSYS_PYPI_PRIVATE_PAT }}
13388

13489
- name: Release to GitHub
135-
uses: ansys/actions/release-github@v5
90+
uses: ansys/actions/release-github@v6
13691
with:
13792
library-name: ${{ env.PACKAGE_NAME }}
13893

@@ -142,7 +97,7 @@ jobs:
14297
runs-on: ubuntu-latest
14398
needs: doc-build
14499
steps:
145-
- uses: ansys/actions/doc-deploy-dev@v5
100+
- uses: ansys/actions/doc-deploy-dev@v6
146101
with:
147102
cname: ${{ env.DOCUMENTATION_CNAME }}
148103
token: ${{ secrets.GITHUB_TOKEN }}
@@ -154,7 +109,7 @@ jobs:
154109
needs: [release]
155110
steps:
156111
- name: Deploy the stable documentation
157-
uses: ansys/actions/doc-deploy-stable@v5
112+
uses: ansys/actions/doc-deploy-stable@v6
158113
with:
159114
cname: ${{ env.DOCUMENTATION_CNAME }}
160115
token: ${{ secrets.GITHUB_TOKEN }}

doc/source/user_guide.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ This section provides an overview of the PyWorkbench package, explaining
33
key concepts and approaches when working with Workbench gRPC service.
44

55

6-
### Start Workbench client and connect to a running Workbench server
6+
## Start Workbench client and connect to a running Workbench server
77
A typical user of Workbench gRPC service starts a Workbench client that connects to
88
a running Workbench server on cloud, given the server's name/IP and port.
99
A client-side working directory should be specified. This directory is the default
@@ -17,7 +17,7 @@ wb = WorkbenchClient(workdir, host, port)
1717
wb.connect()
1818
```
1919

20-
### Launch Workbench server and start a client
20+
## Launch Workbench server and start a client
2121
During development phase or for debugging purpose, it is useful to start Workbench server on the developer's desktop or some computer within the company network.
2222

2323
One can always start a Workbench server by executing command `StartServer()` in any running Workbench session and use the returned server port to start a client, like in the example above.
@@ -41,7 +41,7 @@ from ansys.workbench.core import launch_workbench
4141
wb = launch_workbench(release='241', server_workdir='path_to_a_dir_on_server', client_workdir='path_to_a_dir_on_client')
4242
```
4343

44-
### Run script/commands/queries on Workbench server
44+
## Run script/commands/queries on Workbench server
4545
IronPython based Workbench scripts containing commands/queries can be executed on the server via
4646
* `run_script_file`, which execute a script file in the client working directory; or
4747
* `run_script_string`, which execute a script contained in the given string
@@ -57,7 +57,7 @@ These run_script APIs can also be called with different logging levels. The defa
5757
wb.run_script_file('a_script_file_name', log_level='info')
5858
```
5959

60-
### File handling
60+
## File handling
6161
Data files can be uploaded to the server or downloaded from the server, using `upload_file` or `download_file` API. The client-side working directory is used to hold these files unless absolute paths or target directory is specified. There is also a working directory on the server for the same purpose. The server's working directory can be obtained via Workbench query `GetServerWorkingDirectory()` that runs on the server.
6262

6363
For example, this uploads all part files with a given prefix and all agdb files in the working directory, plus another file outside of the working directory, from client to server:
@@ -101,8 +101,8 @@ All the file handling APIs come with progress bar that is shown by default. One
101101
wb.download_file('solve.out', show_progress=False)
102102
```
103103

104-
### Start other PyANSYS services from systems in a PyWorkbench project
105-
#### PyMechanical
104+
## Start other PyANSYS services from systems in a PyWorkbench project
105+
### PyMechanical
106106
For any mechanical system in the Workbench project, PyMechanical service can be started and connected to from the same client machine.
107107
The following runs a server side script to create a mechanical system, then starts PyMechanical service for the system and establish a PyMechanical client.
108108
```
@@ -113,7 +113,7 @@ wb_script_result=json.dumps(GetTemplate(TemplateName="Static Structural (ANSYS)"
113113
server_port=wb.start_mechanical_server(system_name=sys_name)
114114
mechanical = launch_mechanical(start_instance=False, ip='localhost', port=server_port)"
115115
```
116-
#### PyFluent
116+
### PyFluent
117117
This example illustrates how to start PyFluent service and client for a Fluent system created in Workbench.
118118
```
119119
import ansys.fluent.core as pyfluent

doc/styles/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*
2+
!config
3+
!config/**
4+
!.gitignore
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
(?!)amsys
2+
Workbench
3+
PyMechanical
4+
PyFluent
5+
(?!)github
6+
(?)APIs
7+
(?!)agdb
8+
(?!)run_script

doc/styles/styles/.gitignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

doc/styles/styles/Vocab/ANSYS/accept.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

pyproject.toml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ name = "ansys-workbench-core"
99
version = "0.3.0"
1010
description = "A python wrapper for Ansys Workbench"
1111
readme = "README.md"
12-
requires-python = ">=3.8,<4.0"
12+
requires-python = ">=3.9,<4.0"
1313
license = {file = "LICENSE"}
1414
authors = [{name = "ANSYS, Inc.", email = "pyansys.core@ansys.com"}]
1515
maintainers = [{name = "ANSYS, Inc.", email = "pyansys.core@ansys.com"}]
@@ -35,15 +35,12 @@ dependencies = [
3535
]
3636
[project.optional-dependencies]
3737
doc = [
38-
"ansys-sphinx-theme==0.14.1",
38+
"ansys-sphinx-theme[autoapi]==0.15.2",
3939
"jupyter_sphinx==0.4.0",
4040
"jupytext==1.15.0",
4141
"myst-parser==2.0.0",
4242
"numpydoc==1.6.0",
4343
"Sphinx==7.2.6",
44-
# TODO: use the following for local development until merged into sphinx-autoapi
45-
# "sphinx-autoapi @ git+https://github.com/ansys/sphinx-autoapi@feat/single-page-stable",
46-
"sphinx-autoapi==3.0.0",
4744
"sphinx-autodoc-typehints==1.24.0",
4845
"sphinx-copybutton==0.5.2",
4946
"sphinx_design==0.5.0",

0 commit comments

Comments
 (0)