Skip to content

Commit ffb83b0

Browse files
committed
Merge branch 'maint/v0.68.4-changelog' of https://github.com/ansys/pymapdl into maint/v0.68.4-changelog
2 parents 66fe6dc + febfaa9 commit ffb83b0

File tree

21 files changed

+490
-248
lines changed

21 files changed

+490
-248
lines changed

.ci/build_matrix.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/bin/bash
22

3+
# **** REMEMBER *****
4+
# Remember to update the env var ``LATEST_VERSION`` in ci.yml
5+
#
6+
37
# List of versions
48
versions=(
59
# if added more "latest", change "$LATEST"

.github/workflows/ci.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,14 @@ env:
2424
PACKAGE_NAME: 'ansys-mapdl-core'
2525
PACKAGE_NAMESPACE: 'ansys.mapdl.core'
2626
DOCUMENTATION_CNAME: 'mapdl.docs.pyansys.com'
27+
LATEST_VERSION: "242"
28+
MAPDL_IMAGE_VERSION_DOCS_BUILD: v24.2-ubuntu-student
2729
MEILISEARCH_API_KEY: ${{ secrets.MEILISEARCH_API_KEY }}
2830
MEILISEARCH_PUBLIC_API_KEY: ${{ secrets.MEILISEARCH_PUBLIC_API_KEY }}
2931
PYANSYS_OFF_SCREEN: True
3032
DPF_START_SERVER: False
3133
DPF_PORT: 21004
3234
MAPDL_PACKAGE: ghcr.io/ansys/mapdl
33-
MAPDL_IMAGE_VERSION_DOCS_BUILD: v24.1-ubuntu-student
3435
ON_CI: True
3536
PYTEST_ARGUMENTS: '-vvv -ra --durations=10 --maxfail=3 --reruns 3 --reruns-delay 4 --cov=ansys.mapdl.core --cov-report=html'
3637

@@ -339,10 +340,25 @@ jobs:
339340
- name: "Install Git and checkout project"
340341
uses: actions/[email protected]
341342

343+
- name: Get event type and user to check permissions.
344+
id: get_user
345+
env:
346+
type_event: ${{ github.event.issue.pull_request }}
347+
run: |
348+
if [[ $type_event ]]; then
349+
echo "Event type: $type_event"
350+
echo "event_type=$( echo "$type_event" )" >> $GITHUB_OUTPUT
351+
export user=${{ github.event.pull_request.user.login }}
352+
else
353+
export user=${{ github.actor }}
354+
fi
355+
echo "This PR has been opened by: $user"
356+
echo "user=$( echo "$user" )" >> $GITHUB_OUTPUT
357+
342358
- uses: tspascoal/get-user-teams-membership@v3
343359
id: is_organization_member
344360
with:
345-
username: ${{ github.actor }}
361+
username: ${{ steps.get_user.outputs.user }}
346362
organization: ansys
347363
team: 'pymapdl-developers'
348364
GITHUB_TOKEN: ${{ secrets.TOKEN_TEAMS_USER_READ }}
@@ -792,7 +808,7 @@ jobs:
792808
# executable path with the env var: PYMAPDL_MAPDL_EXEC.
793809
794810
if [[ "${{ matrix.mapdl-version }}" == *"latest-ubuntu"* ]] ; then
795-
version="242"
811+
version=${{ env.LATEST_VERSION }}
796812
else
797813
version=$(echo "${{ matrix.mapdl-version }}" | head -c 5 | tail -c 4 | tr -d '.')
798814
fi;

doc/changelog.d/3276.added.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
chore: update CHANGELOG for v0.68.4

doc/source/api/pool.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _ref_pool_api:
22

3-
Local MAPDL pool
4-
================
3+
MAPDL pool
4+
==========
55

66
.. currentmodule:: ansys.mapdl.core
77

doc/source/changelog.rst

Lines changed: 40 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,50 +9,38 @@ This document contains the release notes for the project.
99
1010
.. towncrier release notes start
1111
12-
`0.68.4 <https://github.com/ansys/pymapdl/releases/tag/v0.68.4>`_ - 2024-07-10
13-
==============================================================================
14-
No significant changes.
15-
16-
17-
`0.68.4 <https://github.com/ansys/pymapdl/releases/tag/v0.68.4>`_ - 2024-07-09
12+
`0.68.4 <https://github.com/ansys/pymapdl/releases/tag/v0.68.4>`_ - 2024-07-15
1813
==============================================================================
1914

2015
Added
2116
^^^^^
2217

23-
- test: skip test `#3259 <https://github.com/ansys/pymapdl/pull/3259>`_
24-
25-
26-
Changed
27-
^^^^^^^
28-
29-
- chore: update CHANGELOG for v0.68.2 `#3183 <https://github.com/ansys/pymapdl/pull/3183>`_
30-
- ci: Use CICD only on ``v*`` tags. `#3186 <https://github.com/ansys/pymapdl/pull/3186>`_
31-
- ci: checking documentation style in ``Examples`` directory too `#3191 <https://github.com/ansys/pymapdl/pull/3191>`_
32-
- chore: update CHANGELOG for v0.68.3 `#3201 <https://github.com/ansys/pymapdl/pull/3201>`_
33-
- ci: Update julia testing `#3211 <https://github.com/ansys/pymapdl/pull/3211>`_
34-
- ci: improving if to match also schedule and workflow_dispatch `#3223 <https://github.com/ansys/pymapdl/pull/3223>`_
35-
- docs: documenting new naming conventions for commits, branches and PRs. `#3228 <https://github.com/ansys/pymapdl/pull/3228>`_
36-
- ci: Using a dynamically generated matrix for testing job setup `#3232 <https://github.com/ansys/pymapdl/pull/3232>`_
37-
- ci: increase the files checked for changes before load docs cache `#3237 <https://github.com/ansys/pymapdl/pull/3237>`_
38-
- build: bump certifi from 2024.2.2 to 2024.7.4 in /doc/source/examples/extended_examples/hpc `#3242 <https://github.com/ansys/pymapdl/pull/3242>`_
39-
4018

4119
Fixed
4220
^^^^^
4321

22+
- fix: missing arguments on ``OCDATA`` command `#3226 <https://github.com/ansys/pymapdl/pull/3226>`_
23+
- fix: Raising `ValueError` when using ips within pool library `#3240 <https://github.com/ansys/pymapdl/pull/3240>`_
24+
- fix: pool issues `#3266 <https://github.com/ansys/pymapdl/pull/3266>`_
4425
- fix: using same labels everywhere `#3188 <https://github.com/ansys/pymapdl/pull/3188>`_
45-
- ci: Fix missing labels format in dependabot file `#3204 <https://github.com/ansys/pymapdl/pull/3204>`_
46-
- ci: wrong tagging on the coverage artifacts `#3225 <https://github.com/ansys/pymapdl/pull/3225>`_
4726
- fix: avoid inspecting suspended processes `#3227 <https://github.com/ansys/pymapdl/pull/3227>`_
4827
- fix: not deleting temporary file when ``remove_temp_dir_on_exit`` =True `#3247 <https://github.com/ansys/pymapdl/pull/3247>`_
4928
- fix: local tests always running as student `#3251 <https://github.com/ansys/pymapdl/pull/3251>`_
5029
- fix: incorrect env vars section `#3252 <https://github.com/ansys/pymapdl/pull/3252>`_
5130

5231

32+
Documentation
33+
^^^^^^^^^^^^^
34+
35+
- docs: adapt static images to dark/light themes `#3249 <https://github.com/ansys/pymapdl/pull/3249>`_
36+
- docs: documenting new naming conventions for commits, branches and PRs. `#3228 <https://github.com/ansys/pymapdl/pull/3228>`_
37+
38+
5339
Dependencies
5440
^^^^^^^^^^^^
5541

42+
- build: bump grpcio from 1.64.1 to 1.65.0 in the grpc-deps group `#3270 <https://github.com/ansys/pymapdl/pull/3270>`_
43+
- build: bump zipp from 3.17.0 to 3.19.1 in /doc/source/examples/extended_examples/hpc `#3261 <https://github.com/ansys/pymapdl/pull/3261>`_
5644
- build: bump the minimal group across 1 directory with 2 updates `#3197 <https://github.com/ansys/pymapdl/pull/3197>`_
5745
- build: bump importlib-metadata from 7.2.0 to 7.2.1 in the minimal group `#3212 <https://github.com/ansys/pymapdl/pull/3212>`_
5846
- build: bump scipy from 1.13.1 to 1.14.0 in the core group `#3213 <https://github.com/ansys/pymapdl/pull/3213>`_
@@ -63,15 +51,38 @@ Dependencies
6351
- build: bump importlib-metadata from 7.2.1 to 8.0.0 in the minimal group `#3229 <https://github.com/ansys/pymapdl/pull/3229>`_
6452
- build: bump the core group with 2 updates `#3241 <https://github.com/ansys/pymapdl/pull/3241>`_
6553
- build: update ansys-api-mapdl to 0.5.2 `#3255 <https://github.com/ansys/pymapdl/pull/3255>`_
54+
- build: bump certifi from 2024.2.2 to 2024.7.4 in /doc/source/examples/extended_examples/hpc `#3242 <https://github.com/ansys/pymapdl/pull/3242>`_
55+
56+
57+
Tests
58+
^^^^^
59+
60+
- test: skip test `#3259 <https://github.com/ansys/pymapdl/pull/3259>`_
61+
62+
63+
Maintenance
64+
^^^^^^^^^^^
65+
66+
- [pre-commit.ci] pre-commit autoupdate `#3238 <https://github.com/ansys/pymapdl/pull/3238>`_, `#3253 <https://github.com/ansys/pymapdl/pull/3253>`_
67+
- ci: Fix missing labels format in dependabot file `#3204 <https://github.com/ansys/pymapdl/pull/3204>`_
68+
- ci: wrong tagging on the coverage artifacts `#3225 <https://github.com/ansys/pymapdl/pull/3225>`_
69+
- ci: Adding v251 CentOS based image to testing `#3210 <https://github.com/ansys/pymapdl/pull/3210>`_
70+
- ci: [pre-commit.ci] pre-commit autoupdate `#3206 <https://github.com/ansys/pymapdl/pull/3206>`_
71+
- ci: Use CICD only on ``v*`` tags. `#3186 <https://github.com/ansys/pymapdl/pull/3186>`_
72+
- ci: checking documentation style in ``Examples`` directory too `#3191 <https://github.com/ansys/pymapdl/pull/3191>`_
73+
- chore: update CHANGELOG for v0.68.3 `#3201 <https://github.com/ansys/pymapdl/pull/3201>`_
74+
- ci: Update julia testing `#3211 <https://github.com/ansys/pymapdl/pull/3211>`_
75+
- ci: improving if to match also schedule and workflow_dispatch `#3223 <https://github.com/ansys/pymapdl/pull/3223>`_
76+
- ci: Using a dynamically generated matrix for testing job setup `#3232 <https://github.com/ansys/pymapdl/pull/3232>`_
77+
- ci: increase the files checked for changes before load docs cache `#3237 <https://github.com/ansys/pymapdl/pull/3237>`_
78+
- ci: run extended array based on the person who open the PR `#3256 <https://github.com/ansys/pymapdl/pull/3256>`_
6679

6780

6881
Miscellaneous
6982
^^^^^^^^^^^^^
7083

71-
- ci: [pre-commit.ci] pre-commit autoupdate `#3206 <https://github.com/ansys/pymapdl/pull/3206>`_
72-
- ci: Adding v251 CentOS based image to testing `#3210 <https://github.com/ansys/pymapdl/pull/3210>`_
73-
- [pre-commit.ci] pre-commit autoupdate `#3238 <https://github.com/ansys/pymapdl/pull/3238>`_, `#3253 <https://github.com/ansys/pymapdl/pull/3253>`_
74-
- docs: adapt static images to dark/light themes `#3249 <https://github.com/ansys/pymapdl/pull/3249>`_
84+
- chore: update CHANGELOG for v0.68.2 `#3183 <https://github.com/ansys/pymapdl/pull/3183>`_
85+
7586

7687
`0.68.3 <https://github.com/ansys/pymapdl/releases/tag/v0.68.3>`_ - 2024-06-21
7788
==============================================================================

doc/source/examples/extended_examples/hpc/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ tabulate==0.9.0
4040
tqdm==4.66.3
4141
urllib3==2.2.2
4242
vtk==9.3.0
43-
zipp==3.17.0
43+
zipp==3.19.1

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ doc = [
7777
"ansys-dpf-core==0.10.1",
7878
"ansys-mapdl-reader==0.53.0",
7979
"ansys-sphinx-theme==0.16.6",
80-
"grpcio==1.64.1",
80+
"grpcio==1.65.0",
8181
"imageio-ffmpeg==0.5.1",
8282
"imageio==2.34.2",
8383
"jupyter_sphinx==0.5.3",

src/ansys/mapdl/core/_commands/solution/ocean.py

Lines changed: 41 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,27 @@
2222

2323

2424
class Ocean:
25-
def ocdata(self, val1="", val2="", val3="", val14="", **kwargs):
25+
def ocdata(
26+
self,
27+
val1: str = "",
28+
val2: str = "",
29+
val3: str = "",
30+
val4: str = "",
31+
val5: str = "",
32+
val6: str = "",
33+
val7: str = "",
34+
val8: str = "",
35+
val9: str = "",
36+
val10: str = "",
37+
val11: str = "",
38+
val12: str = "",
39+
val13: str = "",
40+
val14: str = "",
41+
**kwargs,
42+
):
2643
"""Defines an ocean load using non-table data.
2744
28-
APDL Command: OCDATA
45+
APDL Command: ``OCDATA``
2946
3047
Parameters
3148
----------
@@ -34,14 +51,14 @@ def ocdata(self, val1="", val2="", val3="", val14="", **kwargs):
3451
3552
Notes
3653
-----
37-
The OCDATA command specifies non-table data that defines the ocean
54+
The ``OCDATA`` command specifies non-table data that defines the ocean
3855
load, such as the depth of the ocean to the mud line, the ratio of
3956
added mass over added mass for a circular cross section, or the wave
4057
type to apply. The terms VAL1, VAL2, etc. are specialized according to
4158
the input set required for the given ocean load.
4259
43-
The program interprets the data input via the OCDATA command within the
44-
context of the most recently issued OCTYPE command.
60+
The program interprets the data input via the ``OCDATA`` command within the
61+
context of the most recently issued ``OCTYPE`` command.
4562
4663
Input values in the order indicated.
4764
@@ -52,19 +69,19 @@ def ocdata(self, val1="", val2="", val3="", val14="", **kwargs):
5269
For a better understanding of how to set up a basic ocean type, see
5370
Figure: 5:: Basic Ocean Data Type Components .
5471
55-
DEPTH -- The depth of the ocean (that is, the distance between the mean
72+
``DEPTH`` -- The depth of the ocean (that is, the distance between the mean
5673
sea level and the mud line). The water surface is assumed to be level
5774
in the XY plane, with Z being positive upwards. This value is required
5875
and must be positive.
5976
60-
MATOC -- The material number of the ocean. This value is required and
77+
``MATOC`` -- The material number of the ocean. This value is required and
6178
is used to input the required density. It is also used to input the
62-
viscosity if the Reynolds number is used (OCTABLE).
79+
viscosity if the Reynolds number is used (``OCTABLE``).
6380
64-
KFLOOD -- The inside-outside fluid-interaction key:
81+
``KFLOOD`` -- The inside-outside fluid-interaction key:
6582
66-
For beam subtype CTUBE and HREC used with BEAM188 or BEAM189 and ocean
67-
loading, KFLOOD is always set to 1.
83+
For beam subtype ``CTUBE`` and ``HREC`` used with BEAM188 or BEAM189 and ocean
84+
loading, ``KFLOOD`` is always set to 1.
6885
6986
Cay -- The ratio of added mass of the external fluid over the mass of
7087
the fluid displaced by the element cross section in the y direction
@@ -73,7 +90,7 @@ def ocdata(self, val1="", val2="", val3="", val14="", **kwargs):
7390
element moves in the element y direction during a dynamic analysis.
7491
7592
If no value is specified, and the coefficient of inertia CMy is not
76-
specified (OCTABLE), both values default to 0.0.
93+
specified (``OCTABLE``), both values default to 0.0.
7794
7895
If no value is specified, but CMy is specified, this value defaults to
7996
Cay = CMy - 1.0.
@@ -90,7 +107,7 @@ def ocdata(self, val1="", val2="", val3="", val14="", **kwargs):
90107
Cay.
91108
92109
If no value is specified, and the coefficient of inertia CMz is not
93-
specified (OCTABLE), both values default to 0.0.
110+
specified (``OCTABLE``), both values default to 0.0.
94111
95112
If no value is specified, but CMz is specified, this value defaults to
96113
Cay = CMz - 1.0.
@@ -115,31 +132,31 @@ def ocdata(self, val1="", val2="", val3="", val14="", **kwargs):
115132
116133
Two example cases for Zmsl are:
117134
118-
A structure with its origin on the sea floor (Zmsl = DEPTH).
135+
A structure with its origin on the sea floor (Zmsl = ``DEPTH``).
119136
120-
A tidal change (tc) above the mean sea level (Zmsl = tc, and DEPTH
121-
becomes DEPTH + tc)
137+
A tidal change (tc) above the mean sea level (Zmsl = tc, and ``DEPTH``
138+
becomes ``DEPTH`` + tc)
122139
123-
Ktable -- The dependency of VAL1 on the OCTABLE command:
140+
Ktable -- The dependency of VAL1 on the ``OCTABLE`` command:
124141
125-
KWAVE -- The incident wave type:
142+
``KWAVE`` -- The incident wave type:
126143
127-
THETA -- Angle of the wave direction θ from the global Cartesian X axis
144+
``THETA`` -- Angle of the wave direction θ from the global Cartesian X axis
128145
toward the global Cartesian Y axis (in degrees).
129146
130-
WAVELOC (valid when KWAVE = 0 through 3, and 101+) -- The wave location
147+
``WAVELOC`` (valid when ``KWAVE`` = 0 through 3, and 101+) -- The wave location
131148
type:
132149
133-
SPECTRUM (valid when KWAVE = 5 through 7) -- The wave spectrum type:
150+
``SPECTRUM`` (valid when ``KWAVE`` = 5 through 7) -- The wave spectrum type:
134151
135-
KCRC -- The wave-current interaction key.
152+
``KCRC`` -- The wave-current interaction key.
136153
137-
Adjustments to the current profile are available via the KCRC constant
154+
Adjustments to the current profile are available via the ``KCRC`` constant
138155
of the water motion table. Typically, these options are used only when
139156
the wave amplitude is large relative to the water depth, such that
140157
significant wave-current interaction exists.
141158
"""
142-
command = f"OCDATA,{val1},{val2},{val3},{val14}"
159+
command = f"OCDATA,{val1},{val2},{val3},{val4},{val5},{val6},{val7},{val8},{val9},{val10},{val11},{val12},{val13},{val14}"
143160
return self.run(command, **kwargs)
144161

145162
def ocdelete(self, datatype="", zonename="", **kwargs):

src/ansys/mapdl/core/cli/list_instances.py

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,23 +73,35 @@ def list_instances(instances, long, cmd, location):
7373
mapdl_instances = []
7474

7575
def is_valid_process(proc):
76-
valid_status = proc.status in [psutil.STATUS_RUNNING, psutil.STATUS_IDLE]
76+
valid_status = proc.status() in [
77+
psutil.STATUS_RUNNING,
78+
psutil.STATUS_IDLE,
79+
psutil.STATUS_SLEEPING,
80+
]
7781
valid_ansys_process = ("ansys" in proc.name().lower()) or (
7882
"mapdl" in proc.name().lower()
7983
)
84+
# Early exit to avoid checking 'cmdline' of a protected process (raises psutil.AccessDenied)
85+
if not valid_ansys_process:
86+
return False
87+
8088
grpc_is_active = "-grpc" in proc.cmdline()
8189
return valid_status and valid_ansys_process and grpc_is_active
8290

8391
for proc in psutil.process_iter():
8492
# Check if the process is running and not suspended
85-
if is_valid_process(proc):
86-
# Checking the number of children we infer if the process is the main process,
87-
# or one of the main process thread.
88-
if len(proc.children(recursive=True)) < 2:
89-
proc.ansys_instance = False
90-
else:
91-
proc.ansys_instance = True
92-
mapdl_instances.append(proc)
93+
try:
94+
if is_valid_process(proc):
95+
# Checking the number of children we infer if the process is the main process,
96+
# or one of the main process thread.
97+
if len(proc.children(recursive=True)) < 2:
98+
proc.ansys_instance = False
99+
else:
100+
proc.ansys_instance = True
101+
mapdl_instances.append(proc)
102+
103+
except (psutil.NoSuchProcess, psutil.ZombieProcess) as e:
104+
continue
93105

94106
# printing
95107
table = []

0 commit comments

Comments
 (0)