foamlib 0.8.2__py3-none-any.whl → 0.8.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- foamlib/__init__.py +1 -1
- foamlib/_files/_parsing.py +5 -4
- foamlib/_files/_serialization.py +1 -1
- foamlib/_files/_types.py +1 -1
- {foamlib-0.8.2.dist-info → foamlib-0.8.3.dist-info}/METADATA +6 -5
- {foamlib-0.8.2.dist-info → foamlib-0.8.3.dist-info}/RECORD +8 -8
- {foamlib-0.8.2.dist-info → foamlib-0.8.3.dist-info}/WHEEL +1 -1
- {foamlib-0.8.2.dist-info → foamlib-0.8.3.dist-info}/licenses/LICENSE.txt +0 -0
foamlib/__init__.py
CHANGED
foamlib/_files/_parsing.py
CHANGED
@@ -89,7 +89,7 @@ def _parse_ascii_field(
|
|
89
89
|
s = re.sub(ignore.re, " ", s)
|
90
90
|
s = s.replace("(", " ").replace(")", " ")
|
91
91
|
|
92
|
-
return np.fromstring(s, sep=" ").reshape(-1, *tensor_kind.shape)
|
92
|
+
return np.fromstring(s, sep=" ").reshape(-1, *tensor_kind.shape) # type: ignore [return-value]
|
93
93
|
|
94
94
|
|
95
95
|
def _unpack_binary_field(
|
@@ -99,7 +99,7 @@ def _unpack_binary_field(
|
|
99
99
|
assert float_size in (4, 8)
|
100
100
|
|
101
101
|
dtype = np.float32 if float_size == 4 else float
|
102
|
-
return np.frombuffer(b, dtype=dtype).reshape(-1, *tensor_kind.shape)
|
102
|
+
return np.frombuffer(b, dtype=dtype).reshape(-1, *tensor_kind.shape) # type: ignore [return-value]
|
103
103
|
|
104
104
|
|
105
105
|
def _tensor_list(
|
@@ -223,9 +223,10 @@ _TENSOR = (
|
|
223
223
|
| _tensor(TensorKind.SYMM_TENSOR)
|
224
224
|
| _tensor(TensorKind.TENSOR)
|
225
225
|
)
|
226
|
-
_IDENTIFIER =
|
226
|
+
_IDENTIFIER = Forward()
|
227
|
+
_IDENTIFIER <<= Combine(
|
227
228
|
Word(_IDENTCHARS, _IDENTBODYCHARS, exclude_chars="()")
|
228
|
-
+ Opt(Literal("(") +
|
229
|
+
+ Opt(Literal("(") + _IDENTIFIER + Literal(")"))
|
229
230
|
)
|
230
231
|
_DIMENSIONED = (Opt(_IDENTIFIER) + _DIMENSIONS + _TENSOR).set_parse_action(
|
231
232
|
lambda tks: Dimensioned(*reversed(tks.as_list()))
|
foamlib/_files/_serialization.py
CHANGED
foamlib/_files/_types.py
CHANGED
@@ -79,7 +79,7 @@ class Dimensioned:
|
|
79
79
|
|
80
80
|
def __post_init__(self) -> None:
|
81
81
|
if is_sequence(self.value):
|
82
|
-
self.value = np.asarray(self.value, dtype=float)
|
82
|
+
self.value = np.asarray(self.value, dtype=float) # type: ignore [assignment]
|
83
83
|
else:
|
84
84
|
assert isinstance(self.value, (int, float, np.ndarray))
|
85
85
|
self.value = float(self.value)
|
@@ -1,11 +1,12 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: foamlib
|
3
|
-
Version: 0.8.
|
3
|
+
Version: 0.8.3
|
4
4
|
Summary: A Python interface for interacting with OpenFOAM
|
5
5
|
Project-URL: Homepage, https://github.com/gerlero/foamlib
|
6
6
|
Project-URL: Repository, https://github.com/gerlero/foamlib
|
7
7
|
Project-URL: Documentation, https://foamlib.readthedocs.io
|
8
8
|
Author-email: "Gabriel S. Gerlero" <ggerlero@cimec.unl.edu.ar>
|
9
|
+
License-File: LICENSE.txt
|
9
10
|
Classifier: Development Status :: 4 - Beta
|
10
11
|
Classifier: Framework :: AsyncIO
|
11
12
|
Classifier: Intended Audience :: Developers
|
@@ -31,7 +32,7 @@ Requires-Dist: pyparsing<4,>=3.1.2
|
|
31
32
|
Requires-Dist: typing-extensions<5,>=4; python_version < '3.11'
|
32
33
|
Provides-Extra: dev
|
33
34
|
Requires-Dist: mypy<2,>=1; extra == 'dev'
|
34
|
-
Requires-Dist: pytest-asyncio<0.
|
35
|
+
Requires-Dist: pytest-asyncio<0.26,>=0.21; extra == 'dev'
|
35
36
|
Requires-Dist: pytest-cov; extra == 'dev'
|
36
37
|
Requires-Dist: pytest<9,>=7; extra == 'dev'
|
37
38
|
Requires-Dist: ruff; extra == 'dev'
|
@@ -43,12 +44,12 @@ Requires-Dist: sphinx<9,>=5; extra == 'docs'
|
|
43
44
|
Provides-Extra: lint
|
44
45
|
Requires-Dist: ruff; extra == 'lint'
|
45
46
|
Provides-Extra: test
|
46
|
-
Requires-Dist: pytest-asyncio<0.
|
47
|
+
Requires-Dist: pytest-asyncio<0.26,>=0.21; extra == 'test'
|
47
48
|
Requires-Dist: pytest-cov; extra == 'test'
|
48
49
|
Requires-Dist: pytest<9,>=7; extra == 'test'
|
49
50
|
Provides-Extra: typing
|
50
51
|
Requires-Dist: mypy<2,>=1; extra == 'typing'
|
51
|
-
Requires-Dist: pytest-asyncio<0.
|
52
|
+
Requires-Dist: pytest-asyncio<0.26,>=0.21; extra == 'typing'
|
52
53
|
Requires-Dist: pytest-cov; extra == 'typing'
|
53
54
|
Requires-Dist: pytest<9,>=7; extra == 'typing'
|
54
55
|
Description-Content-Type: text/markdown
|
@@ -1,4 +1,4 @@
|
|
1
|
-
foamlib/__init__.py,sha256=
|
1
|
+
foamlib/__init__.py,sha256=ZODAE7gaDlcc4N4EKtrB1AyZz5tuAbw9rgkfSM-WKew,452
|
2
2
|
foamlib/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
3
|
foamlib/_cases/__init__.py,sha256=_A1TTHuQfS9FH2_33lSEyLtOJZGFHZBco1tWJCVOHks,358
|
4
4
|
foamlib/_cases/_async.py,sha256=onECxRLQCF7Kd-GeuLqH_Xv3gbMMhKOSbFaUG5Ttgmk,7822
|
@@ -11,10 +11,10 @@ foamlib/_cases/_util.py,sha256=tK4SM5WT3eEgGsFLnidIySbom1qowBAua9z13gipKJk,1518
|
|
11
11
|
foamlib/_files/__init__.py,sha256=q1vkjXnjnSZvo45jPAICpWeF2LZv5V6xfzAR6S8fS5A,96
|
12
12
|
foamlib/_files/_files.py,sha256=5sxtHQuN25w1gszZBpSMOaF--KOJy2HLmM6CScLof9s,15331
|
13
13
|
foamlib/_files/_io.py,sha256=BGbbm6HKxL2ka0YMCmHqZQZ1R4PPQlkvWWb4FHMAS8k,2217
|
14
|
-
foamlib/_files/_parsing.py,sha256=
|
15
|
-
foamlib/_files/_serialization.py,sha256=
|
16
|
-
foamlib/_files/_types.py,sha256=
|
17
|
-
foamlib-0.8.
|
18
|
-
foamlib-0.8.
|
19
|
-
foamlib-0.8.
|
20
|
-
foamlib-0.8.
|
14
|
+
foamlib/_files/_parsing.py,sha256=1lwXdcsYrHXONbNbLYkl9wvwFBCcBt3-eVJUVcL3pIM,13055
|
15
|
+
foamlib/_files/_serialization.py,sha256=Tp3Sx5Kav4Bh1K98FAYiN0O7hBVizu8eP-sDC_ZDmfc,5176
|
16
|
+
foamlib/_files/_types.py,sha256=m-fFjJnS4sFSavDsijlXpAfEhnbh10RBumSHAT0GOgQ,3408
|
17
|
+
foamlib-0.8.3.dist-info/METADATA,sha256=wJxGTASnWb3zZmfB0UWPdytUbVs13sJ8TogpaQJ8Pik,7968
|
18
|
+
foamlib-0.8.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
19
|
+
foamlib-0.8.3.dist-info/licenses/LICENSE.txt,sha256=5Dte9TUnLZzPRs4NQzl-Jc2-Ljd-t_v0ZR5Ng5r0UsY,35131
|
20
|
+
foamlib-0.8.3.dist-info/RECORD,,
|
File without changes
|