Skip to content

Commit 54ebb75

Browse files
committed
Update project
1 parent 35e838a commit 54ebb75

File tree

9 files changed

+1043
-1407
lines changed

9 files changed

+1043
-1407
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: |

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
|test-main| |test-dev|
66

7-
.. |test-main| image:: https://github.com/open-lasso-python/lasso-python/actions/workflows/test-runner.yml/badge.svg?branch=main
7+
.. |test-main| image:: https://github.com/open-lasso-python/lasso-python/actions/workflows/ci-cd.yml/badge.svg?branch=main
88
:target: https://github.com/open-lasso-python/lasso-python/actions/workflows/test-runner.yml
99

10-
.. |test-dev| image:: https://github.com/open-lasso-python/lasso-python/actions/workflows/test-runner.yml/badge.svg?branch=dev
10+
.. |test-dev| image:: https://github.com/open-lasso-python/lasso-python/actions/workflows/ci-cd.yml/badge.svg?branch=dev
1111
:target: https://github.com/open-lasso-python/lasso-python/actions/workflows/test-runner.yml
1212

1313
This python library is designed for general purpose usage in the field of

lasso/dimred/hashing_sphere.py

Lines changed: 2 additions & 2 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 == np.float32
3636

3737
# partition latitude
3838
n_alpha = 145
@@ -143,7 +143,7 @@ def sphere_hashing(
143143
assert len(bin_numbers[0] == len(field))
144144
# check data types
145145
assert bin_numbers.dtype == np.int
146-
assert bin_counts.dtype == np.float
146+
assert bin_counts.dtype == np.float32
147147

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

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=np.float32)
391391

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

poetry.lock

Lines changed: 987 additions & 1323 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
@@ -15,20 +15,21 @@ 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",
19+
"Programming Language :: Python :: 3.12",
1820
]
1921
packages = [
2022
{ include = "lasso" }
2123
]
2224

2325
[tool.poetry.dependencies]
2426
# We need to support at least 3.8 because of pandas and limit to 3.11 because of
25-
# scipy.
27+
# numpy.
2628
python = "^3.8, <3.12"
2729
h5py = "^3.7.0"
2830
scipy = "^1.9.1"
2931
numpy = "^1.23.3"
3032
plotly = "^5.10.0"
31-
matplotlib = "^3.6.0"
3233
attrs = "^22.1.0"
3334
psutil = "^5.9.2"
3435
rich = "^12.5.1"

requirements.txt

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

setup.py

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

test/read_write_test.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
from lasso.dyna import D3plot
2+
3+
filelist = [
4+
"/home/codie/programming/python/d3plot-test-data/jmaestre2/d3plot",
5+
"/home/codie/programming/python/d3plot-test-data/mattb5/d3plot.fz",
6+
"/home/codie/programming/python/d3plot-test-data/walzen/stich/d3plot",
7+
"/home/codie/programming/python/d3plot-test-data/walzen/transport/d3plot",
8+
"/home/codie/programming/python/d3plot-test-data/femzipped/d3plot1.fz",
9+
"/home/codie/programming/python/d3plot-test-data/devendra/d3plot",
10+
"/home/codie/programming/python/d3plot-test-data/kracker1/022_021_Validierung_anfang_fehlerfreig",
11+
"/home/codie/programming/python/d3plot-test-data/kracker1/r_022_021_Validierung_anfang_fehlerfreig",
12+
"/home/codie/programming/python/d3plot-test-data/kracker1/z_r_022_021_Validierung_anfang_fehlerfreig",
13+
"/home/codie/programming/python/d3plot-test-data/plotcompress/cpr_d3plot",
14+
"/home/codie/programming/python/d3plot-test-data/mattb1/LASSO_P1_0_DROP_-_FIX_BR192407.d3plot",
15+
"/home/codie/programming/python/d3plot-test-data/mattb3/d3plot.fz",
16+
"/home/codie/programming/python/d3plot-test-data/fau3/COFDC3_P1_2A_FC_THOR50_8WP_AVS1-1G6B2_Relax_GR200249.d3plot",
17+
"/home/codie/programming/python/d3plot-test-data/mattb4/LASSO_P1_0_DROP_-_FIX_BR200993.d3plot",
18+
"/home/codie/programming/python/d3plot-test-data/mattb4/LASSO_P1_0_DROP_-_FIX_BR200993_modif.d3plot",
19+
]
20+
21+
def main():
22+
for filepath in filelist:
23+
print(60*"=")
24+
print(filepath)
25+
26+
d3plot = D3plot(filepath)
27+
d3plot.write_d3plot("/tmp/d3plot_test")
28+
d3plot2 = D3plot("/tmp/d3plot_test")
29+
30+
header_diff, arr_diff = d3plot.compare(d3plot2)
31+
32+
print("---------- HEADER DIFF -----------")
33+
for name, msg in header_diff.items():
34+
print(name, msg)
35+
print("---------- ARRAY DIFF -----------")
36+
for name, msg in arr_diff.items():
37+
print(name, msg)
38+
39+
if __name__ == "__main__":
40+
main()

0 commit comments

Comments
 (0)