Skip to content

Commit 079560e

Browse files
authored
Merge pull request #40 from open-lasso-python/release/2.0.1
Release 2.0.1
2 parents 2efed71 + dfa125e commit 079560e

File tree

11 files changed

+1319
-1374
lines changed

11 files changed

+1319
-1374
lines changed

.github/workflows/ci-cd.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
strategy:
15-
# If either the tests for 3.8 or 3.10 fail all workflows
15+
# If either the tests for 3.8 or 3.11 fail all workflows
1616
# are terminated to safe computing resources.
1717
fail-fast: true
1818
# To safe runtime least and latest version supported are
1919
# chosen. We go for 3.8 due to some dependencies. For more
2020
# info see the pyproject.toml
2121
matrix:
22-
python-version: ["3.8", "3.10"]
22+
python-version: ["3.8", "3.11"]
2323

2424
steps:
2525
- uses: actions/checkout@v3
@@ -79,10 +79,10 @@ jobs:
7979
echo "version=${VERSION}" >> $GITHUB_OUTPUT
8080
8181
# For publishing any version will do
82-
- name: Set up Python 3.10
82+
- name: Set up Python 3.11
8383
uses: actions/setup-python@v4
8484
with:
85-
python-version: "3.10"
85+
python-version: "3.11"
8686

8787
- name: Install Task
8888
run: |
@@ -127,10 +127,10 @@ jobs:
127127

128128
steps:
129129
# Install python (be aware NO checkout action)
130-
- name: Set up Python 3.10
130+
- name: Set up Python 3.11
131131
uses: actions/setup-python@v4
132132
with:
133-
python-version: "3.10"
133+
python-version: "3.11"
134134

135135
# Check if it installs without errors
136136
- name: Install package
@@ -158,10 +158,10 @@ jobs:
158158
with:
159159
fetch-depth: 0
160160

161-
- name: Set up Python 3.10
161+
- name: Set up Python 3.11
162162
uses: actions/setup-python@v4
163163
with:
164-
python-version: "3.10"
164+
python-version: "3.11"
165165

166166
- name: Install Task
167167
run: |

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,6 @@ venv.bak/
7474

7575
# Ignore generated changelog
7676
CHANGELOG.md
77+
78+
# a custom testing file with non-public files
79+
test/read_write_test.py

lasso/diffcrash/diffcrash_run.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def parse_diffcrash_args():
8282
print(get_application_header())
8383

8484
parser = argparse.ArgumentParser(
85-
description="Python utility script for Diffcrash written by LASSO GmbH."
85+
description="Python utility script for Diffcrash written by OPEN-LASSO."
8686
)
8787

8888
parser.add_argument(
@@ -1225,7 +1225,7 @@ def read_config_file(self, config_file: str) -> List[str]:
12251225
From the official diffcrash docs ... seriously.
12261226
"""
12271227

1228-
# Just to make it clear, this is not code from LASSO
1228+
# Just to make it clear, this is not code from OPEN-LASSO
12291229
# ...
12301230

12311231
# pylint: disable = too-many-locals

lasso/dimred/hashing_sphere.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def _create_sphere_mesh(diameter: np.ndarray) -> typing.Tuple[np.ndarray, np.nda
3232
beta bin boundaries
3333
"""
3434

35-
assert diameter.dtype == np.float
35+
assert diameter.dtype == float
3636

3737
# partition latitude
3838
n_alpha = 145
@@ -142,8 +142,8 @@ def sphere_hashing(
142142
# same length as the number of points
143143
assert len(bin_numbers[0] == len(field))
144144
# check data types
145-
assert bin_numbers.dtype == np.int
146-
assert bin_counts.dtype == np.float
145+
assert bin_numbers.dtype == int
146+
assert bin_counts.dtype == float
147147

148148
n_rows = bin_counts.shape[0]
149149
n_cols = bin_counts.shape[1]

lasso/dyna/d3plot.py

+9-8
Original file line numberDiff line numberDiff line change
@@ -674,8 +674,14 @@ def build_header(self):
674674
):
675675
new_header["ioshl3"] = 1000
676676
else:
677-
# new_header["ioshl3"] = 999
678-
new_header["ioshl3"] = 0
677+
# See https://github.com/open-lasso-python/lasso-python/issues/39
678+
if (
679+
ArrayType.element_shell_thickness in self.d3plot.arrays
680+
or ArrayType.element_shell_internal_energy in self.d3plot.arrays
681+
):
682+
new_header["ioshl3"] = 999
683+
else:
684+
new_header["ioshl3"] = 0
679685

680686
if n_shells == 0:
681687
new_header["ioshl3"] = (
@@ -6163,7 +6169,7 @@ def plot(
61636169
def write_d3plot(
61646170
self, filepath: Union[str, BinaryIO], block_size_bytes: int = 2048, single_file: bool = True
61656171
):
6166-
"""Write a d3plot file again **(pro version only)**
6172+
"""Write a d3plot file again
61676173
61686174
Parameters
61696175
----------
@@ -6200,11 +6206,6 @@ def write_d3plot(
62006206
... [1, 0, 0],
62016207
... [0, 1, 0]]])
62026208
>>> d3plot.write_d3plot("yay.d3plot")
6203-
6204-
Notes
6205-
-----
6206-
This function is not available in the public version please contact
6207-
LASSO directly in case of further interest.
62086209
"""
62096210

62106211
# if there is a single buffer, write all in

lasso/dyna/test_mapper.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ def test_others(self):
387387
strain1 = np.random.randn(1, 2)
388388
strain2 = np.random.randn(1, 2)
389389

390-
history_vars = np.array([[1, 2], [0, 3], [12, 2]], dtype=np.float)
390+
history_vars = np.array([[1, 2], [0, 3], [12, 2]], dtype=float)
391391

392392
history_vars1 = np.random.randn(3, 2)
393393
history_vars2 = np.random.randn(3, 2)

lasso/femzip/femzip_api.py

-6
Original file line numberDiff line numberDiff line change
@@ -1179,12 +1179,6 @@ def read_variables(
11791179
-------
11801180
arrays: dict
11811181
dictionary with d3plot arrays
1182-
1183-
Notes
1184-
-----
1185-
Uses extended femzip library and requires a license
1186-
for 'FEMUNZIPLIB_DYNA'. Please contact sidact if
1187-
required.
11881182
"""
11891183

11901184
# pylint: disable = too-many-arguments

0 commit comments

Comments
 (0)