quadros 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.
Files changed (35) hide show
  1. quadros-0.1.0/.github/dependabot.yml +22 -0
  2. quadros-0.1.0/.github/workflows/ci.yml +185 -0
  3. quadros-0.1.0/.github/workflows/release.yml +94 -0
  4. quadros-0.1.0/.gitignore +17 -0
  5. quadros-0.1.0/LICENSE +201 -0
  6. quadros-0.1.0/PKG-INFO +120 -0
  7. quadros-0.1.0/README.md +89 -0
  8. quadros-0.1.0/assets/readme-banner-v1.jpg +0 -0
  9. quadros-0.1.0/assets/readme-banner-v1.md +57 -0
  10. quadros-0.1.0/configs/render_qp_comp_smoke.json +41 -0
  11. quadros-0.1.0/configs/render_scenes_example.json +101 -0
  12. quadros-0.1.0/docs/hpc-install.md +94 -0
  13. quadros-0.1.0/docs/native-stack.md +20 -0
  14. quadros-0.1.0/jfm_camera_view.pvcvbc +45 -0
  15. quadros-0.1.0/paraview.txt +34 -0
  16. quadros-0.1.0/pyproject.toml +64 -0
  17. quadros-0.1.0/save_state_Paraview_modes_new.pvsm +26067 -0
  18. quadros-0.1.0/save_state_Paraview_modes_velocity_cube_AND_sphere_side_by_side_final.pvsm +33525 -0
  19. quadros-0.1.0/save_state_Paraview_modes_velocity_cube_AND_sphere_side_by_side_final2.pvsm +11605 -0
  20. quadros-0.1.0/save_state_Paraview_modes_velocity_cube_AND_sphere_side_by_side_final2omr.pvsm +18028 -0
  21. quadros-0.1.0/save_state_Paraview_modes_velocity_cube_AND_sphere_side_by_side_final2omr__CUBE.pvsm +10655 -0
  22. quadros-0.1.0/save_state_Paraview_modes_velocity_cube_AND_sphere_side_by_side_final2omr__SPHERE.pvsm +9405 -0
  23. quadros-0.1.0/slurm/render_snapshots.sbatch +50 -0
  24. quadros-0.1.0/src/quadros/__init__.py +3 -0
  25. quadros-0.1.0/src/quadros/__main__.py +6 -0
  26. quadros-0.1.0/src/quadros/_legacy_extract_paraview_state.py +517 -0
  27. quadros-0.1.0/src/quadros/_legacy_render_nek_isosurface_views.py +2023 -0
  28. quadros-0.1.0/src/quadros/cli.py +176 -0
  29. quadros-0.1.0/src/quadros/encode.py +35 -0
  30. quadros-0.1.0/src/quadros/fields.py +166 -0
  31. quadros-0.1.0/src/quadros/manifests.py +40 -0
  32. quadros-0.1.0/src/quadros/paraview.py +15 -0
  33. quadros-0.1.0/src/quadros/render.py +84 -0
  34. quadros-0.1.0/tests/test_cli.py +562 -0
  35. quadros-0.1.0/uv.lock +1453 -0
@@ -0,0 +1,22 @@
1
+ version: 2
2
+ updates:
3
+ # Actions are pinned to commit SHAs rather than tags, which is what stops a
4
+ # mutable tag being repointed under us (the tj-actions/changed-files class of
5
+ # compromise). A pin only stays current if something bumps it, so that is this.
6
+ - package-ecosystem: github-actions
7
+ directory: /
8
+ schedule:
9
+ interval: weekly
10
+
11
+ # Without this, only the action pins are tracked and Python dependency drift is
12
+ # invisible: the dev-tool floors in pyproject.toml rot behind upstream releases.
13
+ - package-ecosystem: pip
14
+ directory: /
15
+ schedule:
16
+ interval: weekly
17
+ groups:
18
+ python-dev-tooling:
19
+ patterns:
20
+ - "ruff"
21
+ - "mypy"
22
+ - "pytest*"
@@ -0,0 +1,185 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ # Read-only token: nothing here pushes, comments or publishes.
10
+ permissions:
11
+ contents: read
12
+
13
+ # Actions are pinned to commit SHAs, not tags. A tag is mutable and can be
14
+ # repointed at new code under an unchanged name; a SHA cannot. Dependabot keeps
15
+ # the pins current, and the trailing comment keeps them readable.
16
+
17
+ env:
18
+ # VTK on a runner has no display. PyVista must be told before first import,
19
+ # or Plotter construction tries to open a window and dies.
20
+ PYVISTA_OFF_SCREEN: "true"
21
+
22
+ jobs:
23
+ lint:
24
+ runs-on: ubuntu-24.04
25
+ steps:
26
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
27
+
28
+ - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
29
+ with:
30
+ python-version: "3.14"
31
+
32
+ - name: Install uv
33
+ run: pip install uv
34
+
35
+ - name: Sync environment
36
+ run: uv sync
37
+
38
+ - name: Lint
39
+ run: uv run ruff check .
40
+
41
+ # uv.lock must stay consistent with pyproject.toml, or `uv sync` in the
42
+ # other jobs silently installs something the manifest no longer asks for.
43
+ - name: Lock file is in sync
44
+ run: uv lock --check
45
+
46
+ # The default install has no pymech. That is the normal case for anyone
47
+ # rendering a non-Nek format, and the Nek code path must degrade to a clear
48
+ # message rather than raising. Running the suite without the extra is what
49
+ # keeps that true.
50
+ test:
51
+ runs-on: ubuntu-24.04
52
+ strategy:
53
+ fail-fast: false
54
+ matrix:
55
+ python-version: ["3.11", "3.12", "3.13", "3.14"]
56
+
57
+ steps:
58
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
59
+
60
+ # VTK links against system GL and X libraries even when rendering
61
+ # offscreen. Without these, `import vtk` succeeds and the first Plotter
62
+ # fails, which is a confusing place to discover a missing .so.
63
+ # ffmpeg is not a rendering library but belongs in the same step: it is a
64
+ # hard check in `doctor`, because encoding a movie is half of what this
65
+ # tool does, and the ubuntu-24.04 runner image does not ship it.
66
+ - name: Install headless rendering libraries and ffmpeg
67
+ run: |
68
+ sudo apt-get update -qq
69
+ sudo apt-get install -y --no-install-recommends \
70
+ libgl1 libglx-mesa0 libxrender1 libxext6 xvfb \
71
+ libgl1-mesa-dri libglu1-mesa ffmpeg
72
+
73
+ - name: Set up Python ${{ matrix.python-version }}
74
+ uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
75
+ with:
76
+ python-version: ${{ matrix.python-version }}
77
+
78
+ - name: Install uv
79
+ run: pip install uv
80
+
81
+ # numpy dropped cp311 wheels at 2.5, so the 3.11 leg resolves to an older
82
+ # numpy than the rest of the matrix. That is expected, and is precisely
83
+ # why this leg exists rather than being assumed to work.
84
+ - name: Sync environment
85
+ run: uv sync --python ${{ matrix.python-version }}
86
+
87
+ # xvfb-run, not a bare invocation: doctor's render smoke test asks VTK for
88
+ # a real GL context. The runner has no display and no GPU, so without a
89
+ # virtual X server plus the Mesa software rasteriser the call segfaults
90
+ # (exit 139) rather than failing with a message. xvfb was already being
91
+ # installed here but never used.
92
+ - name: Run tests
93
+ run: |
94
+ xvfb-run -a uv run pytest -v | tee pytest-output.txt
95
+ {
96
+ echo "### Tests (Python ${{ matrix.python-version }}, no nek5000 extra)"
97
+ echo '```'
98
+ tail -n 15 pytest-output.txt
99
+ echo '```'
100
+ } >> "$GITHUB_STEP_SUMMARY"
101
+ shell: bash
102
+
103
+ # A hard gate, not a print. doctor once shipped calling a function that
104
+ # did not exist and died with NameError on every invocation; no test
105
+ # covered it. It must run, and it must not report failure merely because
106
+ # the optional Nek extra is absent.
107
+ - name: doctor runs and does not fail over an optional extra
108
+ run: |
109
+ xvfb-run -a uv run python -m quadros doctor | tee doctor.txt
110
+ grep -q "pyvista: ok" doctor.txt
111
+ grep -q "vtk: ok" doctor.txt
112
+ grep -q "pymech" doctor.txt
113
+ shell: bash
114
+
115
+ # The other half: with pymech installed, the Nek header reader must actually
116
+ # work. Without this job the dedicated Nek path is never exercised at all.
117
+ test-nek5000:
118
+ runs-on: ubuntu-24.04
119
+ steps:
120
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
121
+
122
+ # ffmpeg is not a rendering library but belongs in the same step: it is a
123
+ # hard check in `doctor`, because encoding a movie is half of what this
124
+ # tool does, and the ubuntu-24.04 runner image does not ship it.
125
+ - name: Install headless rendering libraries and ffmpeg
126
+ run: |
127
+ sudo apt-get update -qq
128
+ sudo apt-get install -y --no-install-recommends \
129
+ libgl1 libglx-mesa0 libxrender1 libxext6 xvfb \
130
+ libgl1-mesa-dri libglu1-mesa ffmpeg
131
+
132
+ - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
133
+ with:
134
+ python-version: "3.13"
135
+
136
+ - name: Install uv
137
+ run: pip install uv
138
+
139
+ - name: Sync environment with the Nek5000 extra
140
+ run: uv sync --extra nek5000
141
+
142
+ # A silent install failure would remove exactly the coverage this job
143
+ # exists to add, and the suite would still pass. Assert rather than hope.
144
+ - name: Require pymech to actually be importable
145
+ run: |
146
+ uv run --no-sync python - <<'PY'
147
+ import importlib.util
148
+ import sys
149
+
150
+ if importlib.util.find_spec("pymech.neksuite.field") is None:
151
+ sys.exit(
152
+ "FAIL: the nek5000 extra did not install pymech.neksuite.field.\n"
153
+ "This job exists so the Nek5000 code path is exercised; without "
154
+ "pymech it silently tests the same thing as the matrix above."
155
+ )
156
+ print("ok: pymech.neksuite.field importable")
157
+ PY
158
+ shell: bash
159
+
160
+ - name: Run tests
161
+ run: xvfb-run -a uv run --no-sync pytest -v
162
+
163
+ - name: doctor reports the extra as present
164
+ run: |
165
+ xvfb-run -a uv run --no-sync python -m quadros doctor | tee doctor.txt
166
+ grep -q "pymech (nek5000 extra): ok" doctor.txt
167
+ shell: bash
168
+
169
+ package:
170
+ runs-on: ubuntu-24.04
171
+ steps:
172
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
173
+
174
+ - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
175
+ with:
176
+ python-version: "3.14"
177
+
178
+ - name: Install uv
179
+ run: pip install uv
180
+
181
+ - name: Build
182
+ run: uv build
183
+
184
+ - name: Check package
185
+ run: uvx twine check dist/*
@@ -0,0 +1,94 @@
1
+ name: Release
2
+
3
+ # Publishes to PyPI via trusted publishing (OIDC) — no API token is stored.
4
+ # PyPI matches on owner / repo / workflow filename / environment, configured as:
5
+ # owner: openfluids | repo: quadros | workflow: release.yml | environment: (blank)
6
+ # Renaming this file breaks that match. The environment is left unset on PyPI, so
7
+ # `environment: pypi` below is not part of the match — it exists so an approval
8
+ # gate can be attached without touching either side.
9
+ #
10
+ # Tag-triggered so a release cannot happen without a tag recording which commit
11
+ # shipped.
12
+ on:
13
+ push:
14
+ tags: ["v*"]
15
+
16
+ # Least privilege by default. Only the jobs that need more ask for it.
17
+ permissions:
18
+ contents: read
19
+
20
+ # Actions are pinned to commit SHAs, not tags. A tag is mutable and can be
21
+ # repointed at new code under an unchanged name; a SHA cannot. Dependabot keeps
22
+ # the pins current, and the trailing comment keeps them readable.
23
+
24
+ jobs:
25
+ verify:
26
+ name: Verify tag and PyPI state
27
+ runs-on: ubuntu-24.04
28
+ steps:
29
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
30
+
31
+ # Guards against tagging v0.2.0 while pyproject.toml still says 0.1.0 —
32
+ # PyPI would accept the mismatch and the tag would lie about what shipped.
33
+ - name: Tag must match the packaged version
34
+ run: |
35
+ tag="${GITHUB_REF_NAME#v}"
36
+ pkg="$(python3 -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")"
37
+ if [ "$tag" != "$pkg" ]; then
38
+ echo "Tag v$tag does not match pyproject.toml version $pkg" >&2
39
+ exit 1
40
+ fi
41
+ echo "tag and packaged version agree: $pkg"
42
+
43
+ # PyPI refuses re-uploads of an existing version. Failing here says so in
44
+ # one line; failing in the publish step is an opaque 400 after a build.
45
+ - name: Refuse to republish an existing version
46
+ run: |
47
+ tag="${GITHUB_REF_NAME#v}"
48
+ code="$(curl -s -o /dev/null -w '%{http_code}' "https://pypi.org/pypi/quadros/$tag/json")"
49
+ if [ "$code" = "200" ]; then
50
+ echo "quadros $tag is already on PyPI; PyPI will not accept a re-upload." >&2
51
+ echo "Bump the version rather than re-releasing this one." >&2
52
+ exit 1
53
+ fi
54
+ echo "version $tag is free on PyPI (HTTP $code)"
55
+
56
+ publish:
57
+ name: Build and publish to PyPI
58
+ needs: [verify]
59
+ runs-on: ubuntu-24.04
60
+ environment: pypi
61
+ permissions:
62
+ # Required to mint the OIDC token PyPI verifies. Scoped to this job: the
63
+ # verify job has no reason to be able to mint a publishing token.
64
+ id-token: write
65
+ steps:
66
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
67
+
68
+ - uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
69
+
70
+ # No system GL libraries or xvfb here, unlike ci.yml: building an sdist and
71
+ # a pure-Python wheel never imports quadros, so the headless-rendering
72
+ # setup that the test jobs need is dead weight at release time.
73
+ - name: Build
74
+ run: uv build
75
+
76
+ - name: Check metadata
77
+ run: uvx twine check dist/*
78
+
79
+ - uses: pypa/gh-action-pypi-publish@ba38be9e461d3875417946c167d0b5f3d385a247 # v1.14.1
80
+
81
+ github-release:
82
+ name: Create the GitHub release
83
+ needs: [publish]
84
+ runs-on: ubuntu-24.04
85
+ # Creating a release writes to the repo, so this job -- and only this job --
86
+ # needs write access.
87
+ permissions:
88
+ contents: write
89
+ steps:
90
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
91
+ - name: Create release
92
+ env:
93
+ GH_TOKEN: ${{ github.token }}
94
+ run: gh release create "$GITHUB_REF_NAME" --title "$GITHUB_REF_NAME" --generate-notes
@@ -0,0 +1,17 @@
1
+ .venv/
2
+ __pycache__/
3
+ *.py[cod]
4
+ .pytest_cache/
5
+ *.egg-info/
6
+ dist/
7
+ build/
8
+ .DS_Store
9
+ frames/
10
+ logs/
11
+ manifests/
12
+ events/
13
+ movies/
14
+
15
+ # coverage
16
+ .coverage
17
+ htmlcov/
quadros-0.1.0/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 Ricardo A S Frantz
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
quadros-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,120 @@
1
+ Metadata-Version: 2.4
2
+ Name: quadros
3
+ Version: 0.1.0
4
+ Summary: Snapshot, frame, and video renderer for PyVista-based dense-flow visualization with Nek5000 support
5
+ Project-URL: Homepage, https://github.com/openfluids/quadros
6
+ Project-URL: Repository, https://github.com/openfluids/quadros
7
+ Project-URL: Issues, https://github.com/openfluids/quadros/issues
8
+ Author: Ricardo A S Frantz
9
+ License-Expression: Apache-2.0
10
+ License-File: LICENSE
11
+ Keywords: cfd,pyvista,slurm,video,visualization
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: License :: OSI Approved :: Apache Software License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Programming Language :: Python :: 3.14
22
+ Classifier: Topic :: Scientific/Engineering :: Visualization
23
+ Requires-Python: >=3.11
24
+ Requires-Dist: numpy
25
+ Requires-Dist: pillow
26
+ Requires-Dist: pyvista
27
+ Requires-Dist: vtk
28
+ Provides-Extra: nek5000
29
+ Requires-Dist: pymech; extra == 'nek5000'
30
+ Description-Content-Type: text/markdown
31
+
32
+ ![quadros banner](https://raw.githubusercontent.com/openfluids/quadros/main/assets/readme-banner-v1.jpg)
33
+
34
+ [![CI](https://github.com/openfluids/quadros/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/openfluids/quadros/actions/workflows/ci.yml)
35
+ [![Python](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2Fopenfluids%2Fquadros%2Fmain%2Fpyproject.toml&label=python)](pyproject.toml)
36
+ [![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
37
+
38
+ `quadros` is a Python CLI package for rendering snapshots into checked frame sets and videos. It can run locally, over SSH, inside containers, or from scheduler jobs without copying scripts into case directories. Nek5000 is the format with dedicated support; other VTK-readable formats are supported via PyVista.
39
+
40
+ ## Features
41
+
42
+ - Render one snapshot or a globbed case directory of snapshots (Nek5000 with dedicated support).
43
+ - Keep JSON render configs compatible with the original `auto_snp` workflow.
44
+ - Write manifests, logs, events, frames, and encoded movies under a run output directory.
45
+ - Inspect render manifests before deleting dense snapshots.
46
+ - Extract camera settings from ParaView `.pvsm` state files.
47
+ - Gate NekStab omega-R renders with explicit field aliases and a rebuild hint.
48
+
49
+ ## Install
50
+
51
+ ### With `uv` (recommended for local development)
52
+
53
+ ```bash
54
+ git clone https://github.com/openfluids/quadros.git
55
+ cd quadros
56
+ uv venv .venv
57
+ . .venv/bin/activate
58
+ uv pip install -e .
59
+ quadros doctor
60
+ ```
61
+
62
+ For development tools and tests:
63
+
64
+ ```bash
65
+ uv pip install -e . --group dev
66
+ python -m pytest
67
+ ```
68
+
69
+ ### With standard `venv` + `pip`
70
+
71
+ ```bash
72
+ git clone https://github.com/openfluids/quadros.git
73
+ cd quadros
74
+ python -m venv .venv
75
+ . .venv/bin/activate
76
+ python -m pip install --upgrade pip
77
+ python -m pip install -e .
78
+ quadros doctor
79
+ ```
80
+
81
+ For development tools and tests:
82
+
83
+ ```bash
84
+ python -m pip install -e . pytest build twine
85
+ python -m pytest
86
+ ```
87
+
88
+ For a cluster/native rendering setup, see `docs/native-stack.md`.
89
+
90
+ ## CLI
91
+
92
+ ```bash
93
+ quadros doctor
94
+ quadros render snapshot.f00001 --config configs/render_scenes_example.json
95
+ quadros render-many --case-dir /path/to/case --pattern 'sphere0.f*' --config render.json
96
+ quadros inspect manifest.json
97
+ quadros encode --frames frames/ --out movies/movie.mp4
98
+ quadros extract-camera qp_comp.pvsm --out camera.json
99
+ ```
100
+
101
+ By default, render outputs are written in loco under `SNAPSHOT_PARENT/quadros` for `render` and `CASE_DIR/quadros` for `render-many`. Use `--out` only when you intentionally want a different output root.
102
+
103
+ `--check` enables an omega-R preflight gate for configs that declare `field_aliases` for `omR*`/omega fields. If the configured payload is absent, the command points the operator to rebuild the NekStab case with `ifvox = .true.` and `mks <CASE>`.
104
+
105
+ ## Package layout
106
+
107
+ - `src/quadros/` — importable package and public CLI entrypoint.
108
+ - `configs/` — JSON render config examples compatible with the original workflow.
109
+ - `slurm/render_snapshots.sbatch` — generic Slurm starter template; copy it and add cluster-specific account, partition, module, or container directives as needed.
110
+ - `tests/` — packaging and CLI smoke tests.
111
+ - `docs/` — native-stack notes and operating guidance.
112
+ - `PLAN.md` — source migration plan.
113
+
114
+ ## Validation
115
+
116
+ ```bash
117
+ python -m compileall src tests
118
+ python -m quadros --help
119
+ quadros doctor
120
+ ```