Skip to content

Commit b725ec1

Browse files
authored
try release step (#23)
2 parents 70f97af + 132f117 commit b725ec1

File tree

4 files changed

+21
-20
lines changed

4 files changed

+21
-20
lines changed

doc/source/contribute_examples.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,35 @@ Contribute
33

44
## Contribute to PyWorkbench example repo
55

6-
You can share your PyWorkbench project on [PyWorkbench Example repo](https://github.com/ansys-internal/pyworkbench-examples) with PyWorkbench community.
6+
You can share your PyWorkbench projects on [PyWorkbench Example repo](https://github.com/ansys-internal/pyworkbench-examples) with the PyWorkbench community.
77

88

9-
## Check out a clone of PyWorkbench Example repo:
9+
## How to contribute to PyWorkbench example repo:
10+
### Check out a clone of PyWorkbench Example repo:
1011
```
1112
git clone https://github.com/ansys-internal/pyworkbench-examples.git pywb_examples
1213
```
13-
## Access the example root directory:
14+
### Access the example root directory:
1415
```
1516
cd pywb_examples
1617
```
17-
## Create a git feature branch:
18+
### Create a git feature branch:
1819
```
1920
git checkout -b feat/your_branch_name
2021
```
21-
## Add your example under a new subdirectory:
22+
### Add your example under a new subdirectory:
2223
```
2324
mkdir examples/your_sub_dir
2425
cp example_files* examples/your_sub_dir/
2526
```
26-
## Update the code owner file:
27+
### Update the code owner file:
2728
```
2829
edit CODEOWNERS
2930
```
30-
## Push your changes to github server:
31+
### Push your changes to github server:
3132
```
3233
git push -u origin feat/your_branch_name
3334
```
3435

35-
## Create a pull request to merge your feature branch into the main branch.
36+
### Create a pull request to merge your feature branch into the main branch.
3637

doc/source/start_server.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ By default, server's working directory uses the user preference for temporary
1010
project file directory. One can also specify a different working directory:
1111
`StartServer(WorkingDirectory="/path/to/a/writable/dir")`
1212

13-
14-
Another way to start Workbench server, along with a connected client, is to use [PyWorkbench API](api/index).
13+
## Start Workbench server from client side
14+
Another way to start Workbench server, along with a connected client, is to use [PyWorkbench API](api/index) client-side scripting.

doc/source/user_guide.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,22 @@ wb.connect()
2222
### Launch Workbench server and start a client
2323
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.
2424

25-
One can certainly start a Workbench server by executing command `StartServer()` in any Workbench session and use the returned server port to start a client, like in the example above.
25+
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.
2626

27-
Alternatively, one can launch a Workbench server and start a client programmatically in Python script. To launch it on the local computer:
27+
Alternatively, one can launch a Workbench server and start a client programmatically in client-side Python script. To launch a server on the local computer:
2828
```
2929
from ansys.workbench.core import launch_workbench
3030
wb = launch_workbench()
3131
```
32-
or to launcher server on a remote Windows machine with valid credentials:
32+
or to launcher a server on a remote Windows machine with valid user credentials:
3333
```
3434
from ansys.workbench.core import launch_workbench
3535
host = "server_machine_name_or_ip"
3636
username = "your_username_on_server_machine"
3737
password = "your_password_on_server_machine"
3838
wb = launch_workbench(host=host, username=username, password=password)
3939
```
40-
There are other options to this API, such as specifying a certain Workbench release to launch, or to use specified working directories on server or at client side instead of the default directories.
40+
There are other options to this `launch_workbench` API, such as specifying a certain Workbench release to launch, or to use particular working directories on the server and/or at the client instead of the default directories.
4141
```
4242
from ansys.workbench.core import launch_workbench
4343
wb = launch_workbench(release='241', server_workdir='path_to_a_dir_on_server', client_workdir='path_to_a_dir_on_client')
@@ -60,7 +60,7 @@ wb.run_script_file('a_script_file_name', log_level='info')
6060
```
6161

6262
### File handling
63-
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. 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 server.
63+
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.
6464

6565
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:
6666
```
@@ -88,7 +88,7 @@ out_file_des = os.path.join(work_dir, "solve.out")
8888
shutil.copyfile(out_file_src, out_file_des)
8989
''')
9090
```
91-
The client can then download all output file from the server:
91+
This client script downloads all files with .out extension from the server's working directory:
9292
```
9393
wb.download_file('*.out')
9494
```
@@ -103,7 +103,7 @@ All the file handling APIs come with progress bar that is shown by default. One
103103
wb.download_file('solve.out', show_progress=False)
104104
```
105105

106-
### Start other PyANSYS services based on PyWorkbench
106+
### Start other PyANSYS services from systems in a PyWorkbench project
107107
#### PyMechanical
108108
For any mechanical system in the Workbench project, PyMechanical service can be started and connected to from the same client machine.
109109
The following runs a server side script to create a mechanical system, then starts PyMechanical service for the system and establish a PyMechanical client.
@@ -112,11 +112,11 @@ from ansys.mechanical.core import launch_mechanical
112112
sys_name = wb.run_script_string(r'''import json
113113
wb_script_result=json.dumps(GetTemplate(TemplateName="Static Structural (ANSYS)").CreateSystem().Name)
114114
''')
115-
server_port=wb.start_mechanical_server(system_name=system_name)
115+
server_port=wb.start_mechanical_server(system_name=sys_name)
116116
mechanical = launch_mechanical(start_instance=False, ip='localhost', port=server_port)"
117117
```
118118
#### PyFluent
119-
This example illustrates how to start PyFluent service and client on a Fluent system created in Workbench.
119+
This example illustrates how to start PyFluent service and client for a Fluent system created in Workbench.
120120
```
121121
import ansys.fluent.core as pyfluent
122122
sys_name = wb.run_script_string(r'''import json

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "flit_core.buildapi"
66

77
[project]
88
name = "ansys-workbench-core"
9-
version = "0.5.dev0"
9+
version = "0.6.dev0"
1010
description = "A python wrapper for Ansys Workbench"
1111
readme = "README.md"
1212
requires-python = ">=3.8,<4.0"

0 commit comments

Comments
 (0)