tecio-python 0.3.0__tar.gz → 0.3.1__tar.gz

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.
Files changed (45) hide show
  1. {tecio_python-0.3.0/tecio_python.egg-info → tecio_python-0.3.1}/PKG-INFO +1 -1
  2. {tecio_python-0.3.0 → tecio_python-0.3.1}/pyproject.toml +1 -1
  3. {tecio_python-0.3.0 → tecio_python-0.3.1}/tecio/__init__.py +57 -6
  4. tecio_python-0.3.1/tecio/_constants.py +345 -0
  5. {tecio_python-0.3.0 → tecio_python-0.3.1}/tecio/_dat_read.py +81 -86
  6. {tecio_python-0.3.0 → tecio_python-0.3.1}/tecio/_dat_write.py +13 -4
  7. {tecio_python-0.3.0 → tecio_python-0.3.1}/tecio/_io.py +3 -23
  8. {tecio_python-0.3.0 → tecio_python-0.3.1}/tecio/_meta.py +4 -2
  9. {tecio_python-0.3.0 → tecio_python-0.3.1}/tecio/_plt_read.py +75 -81
  10. {tecio_python-0.3.0 → tecio_python-0.3.1}/tecio/_plt_write.py +8 -4
  11. {tecio_python-0.3.0 → tecio_python-0.3.1}/tecio/_reader.py +49 -49
  12. {tecio_python-0.3.0 → tecio_python-0.3.1}/tecio/_szl_read.py +33 -38
  13. {tecio_python-0.3.0 → tecio_python-0.3.1}/tecio/_szl_write.py +3 -3
  14. {tecio_python-0.3.0 → tecio_python-0.3.1}/tecio/_utils.py +120 -0
  15. {tecio_python-0.3.0 → tecio_python-0.3.1}/tecio/_writer.py +1 -1
  16. {tecio_python-0.3.0 → tecio_python-0.3.1}/tecio/cli/tec2mat.py +1 -1
  17. {tecio_python-0.3.0 → tecio_python-0.3.1}/tecio/cli/tecaux.py +1 -1
  18. {tecio_python-0.3.0 → tecio_python-0.3.1}/tecio/cli/tecextract.py +1 -2
  19. {tecio_python-0.3.0 → tecio_python-0.3.1}/tecio/cli/tecfix.py +1 -2
  20. {tecio_python-0.3.0 → tecio_python-0.3.1}/tecio/cli/tecmerge.py +1 -1
  21. {tecio_python-0.3.0 → tecio_python-0.3.1}/tecio/cli/teconvert.py +1 -1
  22. {tecio_python-0.3.0 → tecio_python-0.3.1}/tecio/cli/tecscale.py +1 -2
  23. {tecio_python-0.3.0 → tecio_python-0.3.1}/tecio/cli/tecslice.py +2 -3
  24. tecio_python-0.3.1/tecio/libtecio.py +3896 -0
  25. {tecio_python-0.3.0 → tecio_python-0.3.1}/tecio/plugins/paraview/TecplotTecioReader.py +6 -2
  26. {tecio_python-0.3.0 → tecio_python-0.3.1/tecio_python.egg-info}/PKG-INFO +1 -1
  27. {tecio_python-0.3.0 → tecio_python-0.3.1}/tecio_python.egg-info/SOURCES.txt +2 -0
  28. {tecio_python-0.3.0 → tecio_python-0.3.1}/tests/test_cli.py +1 -1
  29. {tecio_python-0.3.0 → tecio_python-0.3.1}/tests/test_io.py +1 -1
  30. {tecio_python-0.3.0 → tecio_python-0.3.1}/tests/test_libtecio.py +2 -2
  31. {tecio_python-0.3.0 → tecio_python-0.3.1}/tests/test_read.py +1 -1
  32. {tecio_python-0.3.0 → tecio_python-0.3.1}/tests/test_write.py +2 -2
  33. {tecio_python-0.3.0 → tecio_python-0.3.1}/LICENSE +0 -0
  34. {tecio_python-0.3.0 → tecio_python-0.3.1}/NOTICE +0 -0
  35. {tecio_python-0.3.0 → tecio_python-0.3.1}/README.md +0 -0
  36. {tecio_python-0.3.0 → tecio_python-0.3.1}/setup.cfg +0 -0
  37. {tecio_python-0.3.0 → tecio_python-0.3.1}/tecio/_containers.py +0 -0
  38. {tecio_python-0.3.0 → tecio_python-0.3.1}/tecio/cli/__init__.py +0 -0
  39. {tecio_python-0.3.0 → tecio_python-0.3.1}/tecio/cli/tecdump.py +0 -0
  40. {tecio_python-0.3.0 → tecio_python-0.3.1}/tecio/cli/tecstats.py +0 -0
  41. /tecio_python-0.3.0/tecio/libtecio.py → /tecio_python-0.3.1/tecio/old_libtecio.py +0 -0
  42. {tecio_python-0.3.0 → tecio_python-0.3.1}/tecio_python.egg-info/dependency_links.txt +0 -0
  43. {tecio_python-0.3.0 → tecio_python-0.3.1}/tecio_python.egg-info/entry_points.txt +0 -0
  44. {tecio_python-0.3.0 → tecio_python-0.3.1}/tecio_python.egg-info/requires.txt +0 -0
  45. {tecio_python-0.3.0 → tecio_python-0.3.1}/tecio_python.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tecio-python
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: Python interface for reading and writing Tecplot data files
5
5
  Project-URL: Homepage, https://github.com/meersman/tecio
6
6
  Project-URL: Documentation, https://meersman.github.io/tecio/
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "tecio-python"
7
- version = "0.3.0"
7
+ version = "0.3.1"
8
8
  description = "Python interface for reading and writing Tecplot data files"
9
9
 
10
10
  readme = "README.md"
@@ -9,9 +9,22 @@ from importlib import metadata
9
9
  try:
10
10
  __version__ = metadata.version("tecio")
11
11
  except metadata.PackageNotFoundError:
12
- __version__ = "0.3.0"
12
+ __version__ = "0.3.1"
13
13
 
14
14
  from . import cli, libtecio
15
+ from ._constants import (
16
+ Boolean,
17
+ DataPacking,
18
+ DataType,
19
+ Debug,
20
+ FaceNeighborMode,
21
+ FeCellShape,
22
+ FileFormat,
23
+ FileType,
24
+ ValueLocation,
25
+ VarStatus,
26
+ ZoneType,
27
+ )
15
28
  from ._containers import VariableList, ZoneList
16
29
  from ._dat_read import TecplotDatReader
17
30
  from ._dat_write import TecplotDatWriter
@@ -33,11 +46,11 @@ from ._writer import TecplotWriter
33
46
  # Ensure these display as their canonical public name in docs and help(),
34
47
  # rather than the private module they're actually defined in.
35
48
  open.__module__ = "tecio"
36
- AppendWrite.__module__ = "tecio"
37
- AppendReadWrite.__module__ = "tecio"
38
- ZoneList.__module__ = "tecio"
39
- VariableList.__module__ = "tecio"
40
49
  for _cls in (
50
+ AppendWrite,
51
+ AppendReadWrite,
52
+ ZoneList,
53
+ VariableList,
41
54
  TecplotReader,
42
55
  TecplotZoneReader,
43
56
  TecplotOrderedZoneReader,
@@ -51,6 +64,17 @@ for _cls in (
51
64
  TecplotSzlWriter,
52
65
  TecplotPltWriter,
53
66
  TecplotDatWriter,
67
+ Boolean,
68
+ DataPacking,
69
+ DataType,
70
+ Debug,
71
+ FaceNeighborMode,
72
+ FeCellShape,
73
+ FileFormat,
74
+ FileType,
75
+ ValueLocation,
76
+ VarStatus,
77
+ ZoneType,
54
78
  ):
55
79
  _cls.__module__ = "tecio"
56
80
  del _cls
@@ -76,5 +100,32 @@ __all__ = [
76
100
  "TecplotSzlWriter",
77
101
  "TecplotPltWriter",
78
102
  "TecplotDatWriter",
79
- "__version__",
103
+ "Boolean",
104
+ "DataPacking",
105
+ "DataType",
106
+ "Debug",
107
+ "FaceNeighborMode",
108
+ "FeCellShape",
109
+ "FileFormat",
110
+ "FileType",
111
+ "ValueLocation",
112
+ "VarStatus",
113
+ "ZoneType",
80
114
  ]
115
+
116
+ _STANDARD_MODULE_ATTRIBUTES = (
117
+ "__name__",
118
+ "__file__",
119
+ "__path__",
120
+ "__doc__",
121
+ "__all__",
122
+ "__package__",
123
+ "__version__",
124
+ "__cached__",
125
+ "__spec__",
126
+ )
127
+
128
+
129
+ # Only public API visible to user
130
+ def __dir__() -> list:
131
+ return sorted((*_STANDARD_MODULE_ATTRIBUTES, *__all__))
@@ -0,0 +1,345 @@
1
+ """Tecplot meaningful integers.
2
+
3
+ The TecIO library often uses integers with special meanings (zone types, data types,
4
+ data locations). The same values are used both for writing (``tec*142`` functions) and
5
+ for SZL reading and writing (``tec_*`` functions). Where available, the equivalent
6
+ keyword used in Tecplot ASCII files is exposed as a class property, returning the
7
+ corresponding int value.
8
+ """
9
+
10
+ from __future__ import annotations
11
+
12
+ from enum import Enum
13
+
14
+ __all__ = [
15
+ "Boolean",
16
+ "DataPacking",
17
+ "DataType",
18
+ "Debug",
19
+ "FaceNeighborMode",
20
+ "FeCellShape",
21
+ "FileFormat",
22
+ "FileType",
23
+ "ValueLocation",
24
+ "VarStatus",
25
+ "ZoneType",
26
+ ]
27
+
28
+
29
+ class FileFormat(Enum):
30
+ """Binary data format selector.
31
+
32
+ .. list-table::
33
+ :header-rows: 1
34
+ :widths: 25 10 65
35
+
36
+ * - Attribute
37
+ - Value
38
+ - Description
39
+ * - ``PLT``
40
+ - ``0``
41
+ - Classic PLT binary format.
42
+ * - ``SZPLT``
43
+ - ``1``
44
+ - SZL subzone-loadable format.
45
+ """
46
+
47
+ PLT = 0
48
+ SZPLT = 1
49
+
50
+
51
+ class FileType(Enum):
52
+ """Tecplot file type.
53
+
54
+ .. list-table::
55
+ :header-rows: 1
56
+ :widths: 25 10 65
57
+
58
+ * - Attribute
59
+ - Value
60
+ - Description
61
+ * - ``FULL``
62
+ - ``0``
63
+ - Contains both grid and solution data.
64
+ * - ``GRID``
65
+ - ``1``
66
+ - Grid coordinates only.
67
+ * - ``SOLUTION``
68
+ - ``2``
69
+ - Solution variables only.
70
+ """
71
+
72
+ FULL = 0
73
+ GRID = 1
74
+ SOLUTION = 2
75
+
76
+
77
+ class ZoneType(Enum):
78
+ """Tecplot zone type.
79
+
80
+ .. list-table::
81
+ :header-rows: 1
82
+ :widths: 25 10 65
83
+
84
+ * - Attribute
85
+ - Value
86
+ - Description
87
+ * - ``ORDERED``
88
+ - ``0``
89
+ - Structured IJK grid.
90
+ * - ``FELINESEG``
91
+ - ``1``
92
+ - Finite-element line segments.
93
+ * - ``FETRIANGLE``
94
+ - ``2``
95
+ - Finite-element triangles.
96
+ * - ``FEQUADRILATERAL``
97
+ - ``3``
98
+ - Finite-element quadrilaterals.
99
+ * - ``FETETRAHEDRON``
100
+ - ``4``
101
+ - Finite-element tetrahedra.
102
+ * - ``FEBRICK``
103
+ - ``5``
104
+ - Finite-element hexahedra.
105
+ * - ``FEPOLYGON``
106
+ - ``6``
107
+ - Finite-element polygons (face-based).
108
+ * - ``FEPOLYHEDRON``
109
+ - ``7``
110
+ - Finite-element polyhedra (face-based).
111
+ * - ``FEMIXED``
112
+ - ``8``
113
+ - Mixed finite-element types.
114
+ """
115
+
116
+ ORDERED = 0
117
+ FELINESEG = 1
118
+ FETRIANGLE = 2
119
+ FEQUADRILATERAL = 3
120
+ FETETRAHEDRON = 4
121
+ FEBRICK = 5
122
+ FEPOLYGON = 6
123
+ FEPOLYHEDRON = 7
124
+ FEMIXED = 8
125
+
126
+
127
+ class FeCellShape(Enum):
128
+ """Unstructured cell shape category.
129
+
130
+ .. list-table::
131
+ :header-rows: 1
132
+ :widths: 25 10 65
133
+
134
+ * - Attribute
135
+ - Value
136
+ - Description
137
+ * - ``BAR``
138
+ - ``0``
139
+ - 2D two-node element.
140
+ * - ``TRIANGLE``
141
+ - ``1``
142
+ - 2D three-node element.
143
+ * - ``QUADRILATERAL``
144
+ - ``2``
145
+ - 2D four-node element.
146
+ * - ``TETRAHEDRON``
147
+ - ``3``
148
+ - 3D four-node element.
149
+ * - ``HEXAHEDRON``
150
+ - ``4``
151
+ - 3D six-node element.
152
+ * - ``PYRAMID``
153
+ - ``5``
154
+ - 3D five-node element.
155
+ * - ``PRISM``
156
+ - ``6``
157
+ - 3D eight-node element.
158
+ """
159
+
160
+ BAR = 0
161
+ TRIANGLE = 1
162
+ QUADRILATERAL = 2
163
+ TETRAHEDRON = 3
164
+ HEXAHEDRON = 4
165
+ PYRAMID = 5
166
+ PRISM = 6
167
+
168
+
169
+ class FaceNeighborMode(Enum):
170
+ """Boundary face-sharing mode between zones.
171
+
172
+ .. list-table::
173
+ :header-rows: 1
174
+ :widths: 35 10 55
175
+
176
+ * - Attribute
177
+ - Value
178
+ - Description
179
+ * - ``LOCAL_ONE_TO_ONE``
180
+ - ``0``
181
+ - Each face has at most one local neighbor.
182
+ * - ``LOCAL_ONE_TO_MANY``
183
+ - ``1``
184
+ - Each face may have multiple local neighbors (hanging nodes).
185
+ * - ``GLOBAL_ONE_TO_ONE``
186
+ - ``2``
187
+ - Each face has at most one neighbor in any zone.
188
+ * - ``GLOBAL_ONE_TO_MANY``
189
+ - ``3``
190
+ - Each face may have multiple neighbors in any zone (hanging nodes).
191
+ """
192
+
193
+ LOCAL_ONE_TO_ONE = 0
194
+ LOCAL_ONE_TO_MANY = 1
195
+ GLOBAL_ONE_TO_ONE = 2
196
+ GLOBAL_ONE_TO_MANY = 3
197
+
198
+
199
+ class ValueLocation(Enum):
200
+ """Data value location within a cell.
201
+
202
+ .. list-table::
203
+ :header-rows: 1
204
+ :widths: 25 10 65
205
+
206
+ * - Attribute
207
+ - Value
208
+ - Description
209
+ * - ``CELL_CENTERED``
210
+ - ``0``
211
+ - Values stored at cell centres.
212
+ * - ``NODAL``
213
+ - ``1``
214
+ - Values stored at grid nodes.
215
+ """
216
+
217
+ CELL_CENTERED = 0
218
+ NODAL = 1
219
+
220
+
221
+ class DataPacking(Enum):
222
+ """Zone data packing order for ASCII (``.dat``) files.
223
+
224
+ Controls whether data is laid out variable-by-variable or point-by-point
225
+ in the ASCII file. The ``DATAPACKING`` keyword in a zone header takes one
226
+ of these two values.
227
+
228
+ .. list-table::
229
+ :header-rows: 1
230
+ :widths: 25 10 65
231
+
232
+ * - Attribute
233
+ - Value
234
+ - Description
235
+ * - ``POINT``
236
+ - ``0``
237
+ - One row per node/cell containing all variable values.
238
+ * - ``BLOCK``
239
+ - ``1``
240
+ - One contiguous block per variable containing all node/cell values.
241
+ Tecplot default; faster for variable-at-a-time access patterns.
242
+ """
243
+
244
+ POINT = 0
245
+ BLOCK = 1
246
+
247
+
248
+ class DataType(Enum):
249
+ """On-disk storage type for variable data.
250
+
251
+ .. list-table::
252
+ :header-rows: 1
253
+ :widths: 25 10 65
254
+
255
+ * - Attribute
256
+ - Value
257
+ - Description
258
+ * - ``FLOAT``
259
+ - ``1``
260
+ - 32-bit IEEE floating point.
261
+ * - ``DOUBLE``
262
+ - ``2``
263
+ - 64-bit IEEE floating point.
264
+ * - ``INT32``
265
+ - ``3``
266
+ - 32-bit signed integer.
267
+ * - ``INT16``
268
+ - ``4``
269
+ - 16-bit signed integer.
270
+ * - ``BYTE``
271
+ - ``5``
272
+ - 8-bit unsigned integer.
273
+ """
274
+
275
+ FLOAT = 1
276
+ DOUBLE = 2
277
+ INT32 = 3
278
+ INT16 = 4
279
+ BYTE = 5
280
+
281
+
282
+ class VarStatus(Enum):
283
+ """Variable active/passive flag.
284
+
285
+ .. list-table::
286
+ :header-rows: 1
287
+ :widths: 25 10 65
288
+
289
+ * - Attribute
290
+ - Value
291
+ - Description
292
+ * - ``ACTIVE``
293
+ - ``0``
294
+ - Variable has data in this zone.
295
+ * - ``PASSIVE``
296
+ - ``1``
297
+ - Variable has no data in this zone.
298
+ """
299
+
300
+ ACTIVE = 0
301
+ PASSIVE = 1
302
+
303
+
304
+ class Boolean(Enum):
305
+ """Boolean flag for C function arguments.
306
+
307
+ .. list-table::
308
+ :header-rows: 1
309
+ :widths: 25 10 65
310
+
311
+ * - Attribute
312
+ - Value
313
+ - Description
314
+ * - ``FALSE``
315
+ - ``0``
316
+ - Logical false.
317
+ * - ``TRUE``
318
+ - ``1``
319
+ - Logical true.
320
+ """
321
+
322
+ FALSE = 0
323
+ TRUE = 1
324
+
325
+
326
+ class Debug(Enum):
327
+ """Debug flag for C function arguments.
328
+
329
+ .. list-table::
330
+ :header-rows: 1
331
+ :widths: 25 10 65
332
+
333
+ * - Attribute
334
+ - Value
335
+ - Description
336
+ * - ``FALSE``
337
+ - ``0``
338
+ - Debug output disabled.
339
+ * - ``TRUE``
340
+ - ``1``
341
+ - Debug output enabled.
342
+ """
343
+
344
+ FALSE = 0
345
+ TRUE = 1