pyvista-frd-reader 0.1.0__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.
- pyvista_frd_reader-0.1.0/.clang-format +7 -0
- pyvista_frd_reader-0.1.0/.gitattributes +25 -0
- pyvista_frd_reader-0.1.0/.github/dependabot.yml +9 -0
- pyvista_frd_reader-0.1.0/.github/workflows/ci_cd.yml +135 -0
- pyvista_frd_reader-0.1.0/.github/workflows/native.yml +613 -0
- pyvista_frd_reader-0.1.0/.gitignore +23 -0
- pyvista_frd_reader-0.1.0/.pre-commit-config.yaml +44 -0
- pyvista_frd_reader-0.1.0/LICENSE +21 -0
- pyvista_frd_reader-0.1.0/MANIFEST.in +10 -0
- pyvista_frd_reader-0.1.0/PKG-INFO +229 -0
- pyvista_frd_reader-0.1.0/README.rst +202 -0
- pyvista_frd_reader-0.1.0/benchmarks/read_speed.py +128 -0
- pyvista_frd_reader-0.1.0/cpp/CMakeLists.txt +147 -0
- pyvista_frd_reader-0.1.0/cpp/include/pvfrd/pvfrd.h +303 -0
- pyvista_frd_reader-0.1.0/cpp/src/api.cpp +404 -0
- pyvista_frd_reader-0.1.0/cpp/src/derived.cpp +155 -0
- pyvista_frd_reader-0.1.0/cpp/src/frd.h +146 -0
- pyvista_frd_reader-0.1.0/cpp/src/parse.cpp +606 -0
- pyvista_frd_reader-0.1.0/cpp/src/text.h +323 -0
- pyvista_frd_reader-0.1.0/cpp/tests/fuzz_parse.cpp +79 -0
- pyvista_frd_reader-0.1.0/cpp/tests/fuzz_replay.cpp +57 -0
- pyvista_frd_reader-0.1.0/cpp/tests/test_api.cpp +414 -0
- pyvista_frd_reader-0.1.0/cpp/tests/test_derived.cpp +313 -0
- pyvista_frd_reader-0.1.0/cpp/tests/test_exceptions.cpp +296 -0
- pyvista_frd_reader-0.1.0/cpp/tests/test_parse.cpp +734 -0
- pyvista_frd_reader-0.1.0/cpp/tests/test_text.cpp +352 -0
- pyvista_frd_reader-0.1.0/cpp/third_party/fast_float/fast_float.h +4523 -0
- pyvista_frd_reader-0.1.0/cpp/tools/frd_dump.cpp +117 -0
- pyvista_frd_reader-0.1.0/doc/divergences.md +191 -0
- pyvista_frd_reader-0.1.0/doc/history.md +92 -0
- pyvista_frd_reader-0.1.0/doc/parity.md +318 -0
- pyvista_frd_reader-0.1.0/doc/releasing.md +103 -0
- pyvista_frd_reader-0.1.0/pyproject.toml +123 -0
- pyvista_frd_reader-0.1.0/setup.cfg +4 -0
- pyvista_frd_reader-0.1.0/setup.py +200 -0
- pyvista_frd_reader-0.1.0/src/pyvista_frd/__init__.py +58 -0
- pyvista_frd_reader-0.1.0/src/pyvista_frd/_capi.py +651 -0
- pyvista_frd_reader-0.1.0/src/pyvista_frd/_version.py +24 -0
- pyvista_frd_reader-0.1.0/src/pyvista_frd/reader.py +279 -0
- pyvista_frd_reader-0.1.0/src/pyvista_frd_reader.egg-info/PKG-INFO +229 -0
- pyvista_frd_reader-0.1.0/src/pyvista_frd_reader.egg-info/SOURCES.txt +122 -0
- pyvista_frd_reader-0.1.0/src/pyvista_frd_reader.egg-info/dependency_links.txt +1 -0
- pyvista_frd_reader-0.1.0/src/pyvista_frd_reader.egg-info/requires.txt +6 -0
- pyvista_frd_reader-0.1.0/src/pyvista_frd_reader.egg-info/scm_file_list.json +118 -0
- pyvista_frd_reader-0.1.0/src/pyvista_frd_reader.egg-info/scm_version.json +8 -0
- pyvista_frd_reader-0.1.0/src/pyvista_frd_reader.egg-info/top_level.txt +1 -0
- pyvista_frd_reader-0.1.0/tests/__init__.py +0 -0
- pyvista_frd_reader-0.1.0/tests/conformance/__init__.py +0 -0
- pyvista_frd_reader-0.1.0/tests/conformance/ref_frd.py +514 -0
- pyvista_frd_reader-0.1.0/tests/conformance/test_bytes_and_str.py +176 -0
- pyvista_frd_reader-0.1.0/tests/conformance/test_corpus_parity.py +304 -0
- pyvista_frd_reader-0.1.0/tests/conformance/test_diagnostics_parity.py +128 -0
- pyvista_frd_reader-0.1.0/tests/conftest.py +112 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/broadcast.frd +16 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/comprehensive.frd +44 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/coverage_edge_cases.frd +16 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/duplicate_names.frd +24 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/elements/BE2.frd +9 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/elements/BE3.frd +10 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/elements/HE20.frd +27 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/elements/HE8.frd +15 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/elements/PE15.frd +22 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/elements/PE6.frd +13 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/elements/PY13.frd +20 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/elements/PY5.frd +12 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/elements/QU4.frd +11 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/elements/QU8.frd +15 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/elements/TE10.frd +17 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/elements/TE4.frd +11 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/elements/TR3.frd +10 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/elements/TR6.frd +13 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/empty.frd +1 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/generated/README.md +27 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/generated/beam2.frd +91 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/generated/beam3.frd +152 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/generated/hex20.frd +152 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/generated/hex8.frd +221 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/generated/quad4.frd +91 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/generated/quad8.frd +152 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/generated/src/beam2.inp +23 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/generated/src/beam3.inp +24 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/generated/src/hex20.inp +50 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/generated/src/hex8.inp +57 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/generated/src/quad4.inp +26 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/generated/src/quad8.inp +31 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/generated/src/tet10.inp +34 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/generated/src/tet4.inp +43 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/generated/src/tri3.inp +24 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/generated/src/tri6.inp +28 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/generated/src/wedge15.inp +41 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/generated/src/wedge6.inp +29 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/generated/tet10.frd +101 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/generated/tet4.frd +169 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/generated/tri3.frd +81 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/generated/tri6.frd +127 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/generated/wedge15.frd +127 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/generated/wedge6.frd +81 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/glued.frd +16 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/glued_ids_short.frd +15 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/long_format.frd +15 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/mesh.frd +2703 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/mock.frd +47 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/mock_cr.frd +1 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/mock_crlf.frd +47 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/nan_coords.frd +18 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/no_steps.frd +4 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/pyramids.frd +22 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/ragged.frd +16 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/signed_zero.frd +18 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/unparseable_block.frd +14 -0
- pyvista_frd_reader-0.1.0/tests/fixtures/unsorted_nodes.frd +18 -0
- pyvista_frd_reader-0.1.0/tests/test_fixture_bytes.py +145 -0
- pyvista_frd_reader-0.1.0/tests/test_mutation_harness.py +74 -0
- pyvista_frd_reader-0.1.0/tests/test_reader.py +505 -0
- pyvista_frd_reader-0.1.0/tests/test_sweep_tool.py +117 -0
- pyvista_frd_reader-0.1.0/tools/bench_corpus.py +146 -0
- pyvista_frd_reader-0.1.0/tools/check_dist.sh +48 -0
- pyvista_frd_reader-0.1.0/tools/check_readme_c.py +94 -0
- pyvista_frd_reader-0.1.0/tools/check_version.py +111 -0
- pyvista_frd_reader-0.1.0/tools/check_wheel.py +61 -0
- pyvista_frd_reader-0.1.0/tools/fetch_corpus.py +123 -0
- pyvista_frd_reader-0.1.0/tools/generate_fixtures.py +279 -0
- pyvista_frd_reader-0.1.0/tools/mutate.py +396 -0
- pyvista_frd_reader-0.1.0/tools/sweep_external.py +367 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# FRD fixtures are data, not source. Git must hand them back byte for byte.
|
|
2
|
+
#
|
|
3
|
+
# This is not housekeeping. tests/fixtures/mock_cr.frd and mock_crlf.frd exist
|
|
4
|
+
# to prove the reader handles a lone CR and a CRLF the way Python's text mode
|
|
5
|
+
# does, and without an attribute here git classifies them by guesswork: as of
|
|
6
|
+
# writing, mock_crlf.frd is stored `i/crlf` and considered *text*. A clone with
|
|
7
|
+
# core.autocrlf=true -- which is what the Git for Windows installer sets by
|
|
8
|
+
# default -- or core.autocrlf=input normalises CRLF to LF on the way into the
|
|
9
|
+
# index, which turns that fixture into a byte-for-byte copy of mock.frd.
|
|
10
|
+
#
|
|
11
|
+
# The reason that is worth an attribute rather than a note is what the suite
|
|
12
|
+
# would do next. test_newline_variants_read_identically compares the three
|
|
13
|
+
# encodings against each other, so once they are all LF it passes *because*
|
|
14
|
+
# the fixtures were destroyed. The gate reports green at exactly the moment
|
|
15
|
+
# its subject stops existing. tests/test_fixture_bytes.py is the other half of
|
|
16
|
+
# this: it asserts the endings are still there, so the trivial pass is caught
|
|
17
|
+
# even if this line is ever removed.
|
|
18
|
+
#
|
|
19
|
+
# `binary` is -text -diff: no end-of-line conversion in either direction, and
|
|
20
|
+
# no textual diff. Losing the diff is a real cost when reviewing a hand-written
|
|
21
|
+
# fixture; it is the smaller cost.
|
|
22
|
+
*.frd binary
|
|
23
|
+
|
|
24
|
+
# Same reasoning, for anything a future fixture generator emits.
|
|
25
|
+
*.dat binary
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
# The Python tier: style, and the conformance sweep that grades this reader
|
|
4
|
+
# against PyVista's.
|
|
5
|
+
#
|
|
6
|
+
# The C++ tier, the wheels and the release live in native.yml, next to the
|
|
7
|
+
# jobs that build the artefacts they publish.
|
|
8
|
+
|
|
9
|
+
on:
|
|
10
|
+
pull_request:
|
|
11
|
+
workflow_dispatch:
|
|
12
|
+
schedule:
|
|
13
|
+
# Weekly, for the mutation sweep below. Nothing else here needs a timer.
|
|
14
|
+
- cron: "17 4 * * 1"
|
|
15
|
+
push:
|
|
16
|
+
tags:
|
|
17
|
+
- "*"
|
|
18
|
+
branches:
|
|
19
|
+
- main
|
|
20
|
+
|
|
21
|
+
concurrency:
|
|
22
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
23
|
+
cancel-in-progress: true
|
|
24
|
+
|
|
25
|
+
jobs:
|
|
26
|
+
style:
|
|
27
|
+
name: Style
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
timeout-minutes: 10
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/checkout@v7
|
|
32
|
+
- uses: actions/setup-python@v7
|
|
33
|
+
with:
|
|
34
|
+
python-version: "3.13"
|
|
35
|
+
- uses: pre-commit/action@v3.0.1
|
|
36
|
+
|
|
37
|
+
unit_testing:
|
|
38
|
+
name: Conformance (${{ matrix.os }}, py${{ matrix.python-version }}, vtk ${{ matrix.vtk-version }})
|
|
39
|
+
runs-on: ${{ matrix.os }}
|
|
40
|
+
timeout-minutes: 40
|
|
41
|
+
strategy:
|
|
42
|
+
fail-fast: false
|
|
43
|
+
matrix:
|
|
44
|
+
# Three platforms, because the ctypes binding declares the C structs
|
|
45
|
+
# by hand and nothing about that is checked by a compiler. A field in
|
|
46
|
+
# the wrong order or an int where an int64 belongs produces plausible
|
|
47
|
+
# garbage, and only on the platform whose alignment rules differ from
|
|
48
|
+
# the one the binding was written on. Linux alone cannot see it.
|
|
49
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
50
|
+
python-version: ["3.13"]
|
|
51
|
+
vtk-version: ["latest"]
|
|
52
|
+
include:
|
|
53
|
+
# VTK changed its linear-wedge node order at 9.7, and this reader
|
|
54
|
+
# picks its PE6 permutation from the installed version. Both sides
|
|
55
|
+
# of that boundary have to be exercised, or the branch that is not
|
|
56
|
+
# this runner's default never runs at all.
|
|
57
|
+
- os: ubuntu-latest
|
|
58
|
+
vtk-version: "9.3.1"
|
|
59
|
+
python-version: "3.11"
|
|
60
|
+
- os: ubuntu-latest
|
|
61
|
+
vtk-version: "9.6.2"
|
|
62
|
+
python-version: "3.12"
|
|
63
|
+
# The oldest interpreter the package claims to support.
|
|
64
|
+
- os: ubuntu-latest
|
|
65
|
+
vtk-version: "latest"
|
|
66
|
+
python-version: "3.10"
|
|
67
|
+
|
|
68
|
+
steps:
|
|
69
|
+
- uses: actions/checkout@v7
|
|
70
|
+
with:
|
|
71
|
+
fetch-depth: 0
|
|
72
|
+
|
|
73
|
+
- uses: actions/setup-python@v7
|
|
74
|
+
with:
|
|
75
|
+
python-version: ${{ matrix.python-version }}
|
|
76
|
+
cache: "pip"
|
|
77
|
+
cache-dependency-path: pyproject.toml
|
|
78
|
+
|
|
79
|
+
- name: Install
|
|
80
|
+
run: |
|
|
81
|
+
python -m pip install --upgrade pip
|
|
82
|
+
pip install .[tests]
|
|
83
|
+
|
|
84
|
+
- name: Pin VTK
|
|
85
|
+
if: matrix.vtk-version != 'latest'
|
|
86
|
+
run: pip install vtk==${{ matrix.vtk-version }}
|
|
87
|
+
|
|
88
|
+
- name: Report what is actually installed
|
|
89
|
+
# Printed because the matrix says what was *asked for*. A resolver
|
|
90
|
+
# that quietly gave this runner a different VTK would otherwise make
|
|
91
|
+
# the wedge-order coverage above a claim rather than a fact.
|
|
92
|
+
shell: bash
|
|
93
|
+
run: |
|
|
94
|
+
python -c "
|
|
95
|
+
import pyvista as pv, pyvista_frd
|
|
96
|
+
from pyvista_frd.reader import _default_wedge_order
|
|
97
|
+
print('pyvista', pv.__version__)
|
|
98
|
+
print('vtk', pv.vtk_version_info)
|
|
99
|
+
print('wedge order', _default_wedge_order())
|
|
100
|
+
print('library', pyvista_frd.library_path())"
|
|
101
|
+
|
|
102
|
+
- name: Test
|
|
103
|
+
run: pytest -v --color=yes
|
|
104
|
+
|
|
105
|
+
- name: The sweep tools must still run
|
|
106
|
+
# tools/sweep_external.py and tools/bench_corpus.py are aimed at a
|
|
107
|
+
# corpus that cannot live here -- CalculiX's regression suite is GPL
|
|
108
|
+
# and 251 MB -- so nothing in CI would otherwise execute them, and a
|
|
109
|
+
# tool nobody runs is a tool that has already broken. Pointed at the
|
|
110
|
+
# fixture corpus they are cheap, and they still exercise every path
|
|
111
|
+
# that matters: both readers, the bit-exact comparison, the
|
|
112
|
+
# both-decline branch, and the skip reporting.
|
|
113
|
+
run: |
|
|
114
|
+
python tools/sweep_external.py tests/fixtures --json /tmp/sweep.json
|
|
115
|
+
python tools/bench_corpus.py tests/fixtures --repeats 1
|
|
116
|
+
|
|
117
|
+
mutation:
|
|
118
|
+
name: Mutation sweep
|
|
119
|
+
# Nineteen builds of the core, so not on every pull request: it would
|
|
120
|
+
# serialise the merge queue for a signal that changes only when the tests
|
|
121
|
+
# do. Weekly, and on request.
|
|
122
|
+
if: github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'
|
|
123
|
+
runs-on: ubuntu-latest
|
|
124
|
+
timeout-minutes: 90
|
|
125
|
+
steps:
|
|
126
|
+
- uses: actions/checkout@v7
|
|
127
|
+
- uses: actions/setup-python@v7
|
|
128
|
+
with:
|
|
129
|
+
python-version: "3.13"
|
|
130
|
+
- name: Install
|
|
131
|
+
run: |
|
|
132
|
+
python -m pip install --upgrade pip
|
|
133
|
+
pip install .[tests]
|
|
134
|
+
- name: Every planted defect must redden something
|
|
135
|
+
run: python tools/mutate.py
|