Skip to content

Commit

Permalink
Merge pull request #40 from open-lasso-python/release/2.0.1
Browse files Browse the repository at this point in the history
Release 2.0.1
  • Loading branch information
codie3611 authored Apr 28, 2023
2 parents 2efed71 + dfa125e commit 079560e
Show file tree
Hide file tree
Showing 11 changed files with 1,319 additions and 1,374 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ jobs:
runs-on: ubuntu-latest

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

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -79,10 +79,10 @@ jobs:
echo "version=${VERSION}" >> $GITHUB_OUTPUT
# For publishing any version will do
- name: Set up Python 3.10
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"

- name: Install Task
run: |
Expand Down Expand Up @@ -127,10 +127,10 @@ jobs:

steps:
# Install python (be aware NO checkout action)
- name: Set up Python 3.10
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"

# Check if it installs without errors
- name: Install package
Expand Down Expand Up @@ -158,10 +158,10 @@ jobs:
with:
fetch-depth: 0

- name: Set up Python 3.10
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"

- name: Install Task
run: |
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,6 @@ venv.bak/

# Ignore generated changelog
CHANGELOG.md

# a custom testing file with non-public files
test/read_write_test.py
4 changes: 2 additions & 2 deletions lasso/diffcrash/diffcrash_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def parse_diffcrash_args():
print(get_application_header())

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

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

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

# pylint: disable = too-many-locals
Expand Down
6 changes: 3 additions & 3 deletions lasso/dimred/hashing_sphere.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def _create_sphere_mesh(diameter: np.ndarray) -> typing.Tuple[np.ndarray, np.nda
beta bin boundaries
"""

assert diameter.dtype == np.float
assert diameter.dtype == float

# partition latitude
n_alpha = 145
Expand Down Expand Up @@ -142,8 +142,8 @@ def sphere_hashing(
# same length as the number of points
assert len(bin_numbers[0] == len(field))
# check data types
assert bin_numbers.dtype == np.int
assert bin_counts.dtype == np.float
assert bin_numbers.dtype == int
assert bin_counts.dtype == float

n_rows = bin_counts.shape[0]
n_cols = bin_counts.shape[1]
Expand Down
17 changes: 9 additions & 8 deletions lasso/dyna/d3plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -674,8 +674,14 @@ def build_header(self):
):
new_header["ioshl3"] = 1000
else:
# new_header["ioshl3"] = 999
new_header["ioshl3"] = 0
# See https://github.com/open-lasso-python/lasso-python/issues/39
if (
ArrayType.element_shell_thickness in self.d3plot.arrays
or ArrayType.element_shell_internal_energy in self.d3plot.arrays
):
new_header["ioshl3"] = 999
else:
new_header["ioshl3"] = 0

if n_shells == 0:
new_header["ioshl3"] = (
Expand Down Expand Up @@ -6163,7 +6169,7 @@ def plot(
def write_d3plot(
self, filepath: Union[str, BinaryIO], block_size_bytes: int = 2048, single_file: bool = True
):
"""Write a d3plot file again **(pro version only)**
"""Write a d3plot file again
Parameters
----------
Expand Down Expand Up @@ -6200,11 +6206,6 @@ def write_d3plot(
... [1, 0, 0],
... [0, 1, 0]]])
>>> d3plot.write_d3plot("yay.d3plot")
Notes
-----
This function is not available in the public version please contact
LASSO directly in case of further interest.
"""

# if there is a single buffer, write all in
Expand Down
2 changes: 1 addition & 1 deletion lasso/dyna/test_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ def test_others(self):
strain1 = np.random.randn(1, 2)
strain2 = np.random.randn(1, 2)

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

history_vars1 = np.random.randn(3, 2)
history_vars2 = np.random.randn(3, 2)
Expand Down
6 changes: 0 additions & 6 deletions lasso/femzip/femzip_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1179,12 +1179,6 @@ def read_variables(
-------
arrays: dict
dictionary with d3plot arrays
Notes
-----
Uses extended femzip library and requires a license
for 'FEMUNZIPLIB_DYNA'. Please contact sidact if
required.
"""

# pylint: disable = too-many-arguments
Expand Down
Loading

0 comments on commit 079560e

Please sign in to comment.