Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 079560e

Browse files
authoredApr 28, 2023
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

Lines changed: 8 additions & 8 deletions
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

Lines changed: 3 additions & 0 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 9 additions & 8 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 0 additions & 6 deletions
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

‎poetry.lock

Lines changed: 1290 additions & 1275 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "lasso-python"
3-
version = "2.0.0"
3+
version = "2.0.1"
44
description = "An open-source CAE and Machine Learning library."
55
authors = ["open-lasso-python <open.lasso.python@gmail.com>"]
66
license = "BSD-3"
@@ -15,6 +15,7 @@ classifiers = [
1515
"Programming Language :: Python :: 3.8",
1616
"Programming Language :: Python :: 3.9",
1717
"Programming Language :: Python :: 3.10",
18+
"Programming Language :: Python :: 3.11",
1819
]
1920
packages = [
2021
{ include = "lasso" }
@@ -26,14 +27,14 @@ packages = [
2627
python = "^3.8, <3.12"
2728
h5py = "^3.7.0"
2829
scipy = "^1.9.1"
29-
sklearn = "^0.0"
3030
numpy = "^1.23.3"
3131
plotly = "^5.10.0"
3232
matplotlib = "^3.6.0"
3333
attrs = "^22.1.0"
3434
psutil = "^5.9.2"
3535
rich = "^12.5.1"
3636
pandas = "^1.5.0"
37+
scikit-learn = "^1.2.1"
3738

3839
[tool.poetry.dev-dependencies]
3940
pytest = "^7.1.3"

‎requirements.txt

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

‎setup.py

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

0 commit comments

Comments
 (0)