Lightweight visualization CLI for structured CFD datasets
Project description
cfd-viz
Lightweight visualization CLI for structured CFD datasets.
Install
pip install cfd-viz
Quick Start
CLI
# display a mesh
cfd-viz mesh grid.su2
# skip every other grid line for dense meshes
cfd-viz mesh grid.su2 --skip 4
# save to file instead of displaying
cfd-viz mesh grid.su2 --skip 2 --output mesh.png
# display a filled contour
cfd-viz contour solution.h5 --field pres
# save contour to file
cfd-viz contour solution.h5 --field pres --output pres.png
Python API
from cfd_io import read_file
from cfd_viz.mesh import plot_mesh
from cfd_viz.contour import plot_contour
ds = read_file("grid.su2")
plot_mesh(ds.grid.x, ds.grid.y, skip=2)
ds = read_file("solution.h5")
plot_contour(ds.grid.x, ds.grid.y, ds.flow["pres"].data, field_name="pres")
Testing
pytest tests/ -q
Code Style
This project follows established Python community conventions so that contributors can focus on the physics rather than inventing formatting rules.
| Convention | What it covers | Reference |
|---|---|---|
| PEP 8 | Code formatting, naming, whitespace | Python standard style guide |
| PEP 257 | Docstring structure (triple-quoted, imperative mood) | Python standard docstring conventions |
| Google style | Docstring sections (Args, Returns, Raises) |
Google Python style guide |
| Ruff | Automated linting and formatting | Enforces PEP 8 compliance automatically |
| typing / TYPE_CHECKING | Type hints for IDE support and static analysis | Python standard library |
Versioning & Releasing
This project uses Semantic Versioning (vMAJOR.MINOR.PATCH):
- MAJOR (
v1.0.0,v2.0.0): Breaking API changes - MINOR (
v0.3.0,v0.4.0): New features, backward-compatible - PATCH (
v0.3.1,v0.3.2): Bug fixes, minor corrections
To publish a new version to PyPI:
- Commit and push to
main - Tag and push:
git tag -a vMAJOR.MINOR.PATCH -m "Release vMAJOR.MINOR.PATCH" git push origin vMAJOR.MINOR.PATCH
The GitHub Actions workflow will automatically build and publish to PyPI via Trusted Publishing.
License
BSD-3-Clause. See LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cfd_viz-0.1.3.tar.gz.
File metadata
- Download URL: cfd_viz-0.1.3.tar.gz
- Upload date:
- Size: 19.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f18641bf8a4ff27ef3a3be3073663bee9d0f1cb577ae5db3240b69a82583299
|
|
| MD5 |
32c5d43547f0ddf2783b0990faa85673
|
|
| BLAKE2b-256 |
c7eda99549ea5ac4572e155665a6280864471be91ca892004bce7e93a298890c
|
Provenance
The following attestation bundles were made for cfd_viz-0.1.3.tar.gz:
Publisher:
publish.yml on uahypersonics/cfd-viz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cfd_viz-0.1.3.tar.gz -
Subject digest:
7f18641bf8a4ff27ef3a3be3073663bee9d0f1cb577ae5db3240b69a82583299 - Sigstore transparency entry: 1208950623
- Sigstore integration time:
-
Permalink:
uahypersonics/cfd-viz@24fc58517218998a672e1e218fddcc16f9abad59 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/uahypersonics
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@24fc58517218998a672e1e218fddcc16f9abad59 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cfd_viz-0.1.3-py3-none-any.whl.
File metadata
- Download URL: cfd_viz-0.1.3-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a2d31bce2ec7f0fd84b8e8943237021354095221510cc96add8a585a28dcc12
|
|
| MD5 |
5ace430fa93cffdda182b3f1c8908e56
|
|
| BLAKE2b-256 |
748b7d2170c8f66868128f3b4b092d5e6347858229b6fcd535dfe8202a197d57
|
Provenance
The following attestation bundles were made for cfd_viz-0.1.3-py3-none-any.whl:
Publisher:
publish.yml on uahypersonics/cfd-viz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cfd_viz-0.1.3-py3-none-any.whl -
Subject digest:
1a2d31bce2ec7f0fd84b8e8943237021354095221510cc96add8a585a28dcc12 - Sigstore transparency entry: 1208951130
- Sigstore integration time:
-
Permalink:
uahypersonics/cfd-viz@24fc58517218998a672e1e218fddcc16f9abad59 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/uahypersonics
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@24fc58517218998a672e1e218fddcc16f9abad59 -
Trigger Event:
push
-
Statement type: