Skip to content

Commit 742d389

Browse files
[docs] Add type annotations for the environment variables in docs (#5492)
* [docs] Add type annotations for the environment variables in docs * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent ed085ef commit 742d389

File tree

3 files changed

+55
-2
lines changed

3 files changed

+55
-2
lines changed

docs/source/envvars.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,18 @@
33
The following environment variables can be used to configure the package.
44

55
```{envvar} ABAQUS_BAT_PATH
6+
7+
**Type: string**
8+
69
The file path of the `abaqus` command line batch file (`.bat`). Only set this environment variable if `abaqus` is not
710
the default Abaqus command line executable. This variable is used by `abqpy` to run the Abaqus command line
811
procedure inside the Python interpreter environment where it is installed.
912
```
1013

1114
````{envvar} ABAQUS_COMMAND_OPTIONS
15+
16+
**Type: string of a Python dictionary**
17+
1218
The default execution procedure invoked by `abqpy` inside the Python interpreter
1319
environment where it is installed is to run one of the two following command lines:
1420
@@ -72,54 +78,100 @@ boolean option to `True` and any other values to set it to `False`.
7278
````
7379

7480
```{envvar} ABAQUS_CAE_DATABASE
81+
82+
**Type: string**
83+
7584
A shortcut to the {envvar}`ABAQUS_COMMAND_OPTIONS` environment variable to set the `database` option but has higher priority.
7685
```
7786

7887
```{envvar} ABAQUS_CAE_REPLAY
88+
89+
**Type: string**
90+
7991
A shortcut to the {envvar}`ABAQUS_COMMAND_OPTIONS` environment variable to set the `replay` option but has higher priority.
8092
```
8193

8294
```{envvar} ABAQUS_CAE_RECOVER
95+
96+
**Type: string**
97+
8398
A shortcut to the {envvar}`ABAQUS_COMMAND_OPTIONS` environment variable to set the `recover` option but has higher priority.
8499
```
85100

101+
```{envvar} ABAQUS_CAE_STARTUP
102+
103+
**Type: string**
104+
105+
A shortcut to the {envvar}`ABAQUS_COMMAND_OPTIONS` environment variable to set the `startup` option but has higher priority.
106+
```
107+
86108
```{envvar} ABAQUS_CAE_GUI
109+
110+
**Type: bool {true, false, on, off, yes, no, 1, 0}**
111+
87112
A shortcut to the {envvar}`ABAQUS_COMMAND_OPTIONS` environment variable to set the `gui` option but has higher priority.
88113
```
89114

90115
```{envvar} ABAQUS_CAE_ENVSTARTUP
116+
117+
**Type: bool {true, false, on, off, yes, no, 1, 0}**
118+
91119
A shortcut to the {envvar}`ABAQUS_COMMAND_OPTIONS` environment variable to set the `envstartup` option but has higher priority.
92120
```
93121

94122
```{envvar} ABAQUS_CAE_SAVED_OPTIONS
123+
124+
**Type: bool {true, false, on, off, yes, no, 1, 0}**
125+
95126
A shortcut to the {envvar}`ABAQUS_COMMAND_OPTIONS` environment variable to set the `savedOptions` option but has higher priority.
96127
```
97128

98129
```{envvar} ABAQUS_CAE_SAVED_GUI_PREFS
130+
131+
**Type: bool {true, false, on, off, yes, no, 1, 0}**
132+
99133
A shortcut to the {envvar}`ABAQUS_COMMAND_OPTIONS` environment variable to set the `savedGuiPrefs` option but has higher priority.
100134
```
101135

102136
```{envvar} ABAQUS_CAE_STARTUP_DIALOG
137+
138+
**Type: bool {true, false, on, off, yes, no, 1, 0}**
139+
103140
A shortcut to the {envvar}`ABAQUS_COMMAND_OPTIONS` environment variable to set the `startupDialog` option but has higher priority.
104141
```
105142

106143
```{envvar} ABAQUS_CAE_CUSTOM
144+
145+
**Type: string**
146+
107147
A shortcut to the {envvar}`ABAQUS_COMMAND_OPTIONS` environment variable to set the `custom` option but has higher priority.
108148
```
109149

110150
```{envvar} ABAQUS_CAE_GUI_TESTER
151+
152+
**Type: string**
153+
111154
A shortcut to the {envvar}`ABAQUS_COMMAND_OPTIONS` environment variable to set the `guiTester` option but has higher priority.
112155
```
113156

114157
```{envvar} ABAQUS_CAE_GUI_RECORD
158+
159+
**Type: bool {true, false, on, off, yes, no, 1, 0}**
160+
115161
A shortcut to the {envvar}`ABAQUS_COMMAND_OPTIONS` environment variable to set the `guiRecord` option but has higher priority.
116162
```
117163

118164
```{envvar} ABAQUS_PYTHON_SIM
165+
166+
**Type: string**
167+
119168
A shortcut to the {envvar}`ABAQUS_COMMAND_OPTIONS` environment variable to set the `sim` option but has higher priority.
120169
```
121170

122171
```{envvar} ABAQUS_PYTHON_LOG
172+
173+
**Type: string**
174+
123175
A shortcut to the {envvar}`ABAQUS_COMMAND_OPTIONS` environment variable to set the `log` option but has higher priority.
124176
```
125177

docs/source/user/python/use-scripts/interact.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ These arguments allow you to associate the callback function with both a particu
1818
The interface definition of the callback function is
1919

2020
```python
21-
def functionName(jobName, messageType, data, userData):
22-
...
21+
def functionName(jobName, messageType, data, userData): ...
2322
```
2423

2524
The arguments to the callback function are:

src/abqpy/config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class AbaqusCAEConfig(CompatibleBaseModel):
1919
database: Optional[str] = None
2020
replay: Optional[str] = None
2121
recover: Optional[str] = None
22+
startup: Optional[str] = None
2223
gui: bool = False
2324
envstartup: bool = True
2425
savedOptions: bool = True
@@ -59,6 +60,7 @@ class AbaqusCommandOptions(AbaqusCAEConfig, AbaqusPythonConfig):
5960
database=os.environ["ABAQUS_CAE_DATABASE"] if "ABAQUS_CAE_DATABASE" in os.environ else options.database,
6061
replay=os.environ["ABAQUS_CAE_REPLAY"] if "ABAQUS_CAE_REPLAY" in os.environ else options.replay,
6162
recover=os.environ["ABAQUS_CAE_RECOVER"] if "ABAQUS_CAE_RECOVER" in os.environ else options.recover,
63+
startup=os.environ["ABAQUS_CAE_STARTUP"] if "ABAQUS_CAE_STARTUP" in os.environ else options.startup,
6264
gui=os.environ["ABAQUS_CAE_GUI"].lower() in trues if "ABAQUS_CAE_GUI" in os.environ else options.gui,
6365
envstartup=(
6466
os.environ["ABAQUS_CAE_ENVSTARTUP"].lower() in trues

0 commit comments

Comments
 (0)