Skip to main content

Lightweight visualization CLI for structured CFD datasets

Project description

cfd-viz

Lightweight visualization CLI for structured CFD datasets.

Test codecov DOI PyPI Docs License Python Ruff

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:

  1. Commit and push to main
  2. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cfd_viz-0.1.4.tar.gz (19.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cfd_viz-0.1.4-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file cfd_viz-0.1.4.tar.gz.

File metadata

  • Download URL: cfd_viz-0.1.4.tar.gz
  • Upload date:
  • Size: 19.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cfd_viz-0.1.4.tar.gz
Algorithm Hash digest
SHA256 75f429de7aca79818d2c42430a06d05cbf017be54d9b30b955d452c35bc5c596
MD5 d4cdab94b194c6bd1cfd6d23fef39c2c
BLAKE2b-256 3e9e9151ffafab0f2debf6fa2c1c187e795f97facbc97e2613a14d9599c692b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for cfd_viz-0.1.4.tar.gz:

Publisher: publish.yml on uahypersonics/cfd-viz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cfd_viz-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: cfd_viz-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cfd_viz-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e8b7e063132edc32f68dd47c14567068261b84f999367da361069cee21123a6e
MD5 6f43ff0e6b485699c1be00f869fe7c77
BLAKE2b-256 bfae7267baa9cdf5b9c6774b6ba88bc421bcd20a81097c1f736760369a3f7e93

See more details on using hashes here.

Provenance

The following attestation bundles were made for cfd_viz-0.1.4-py3-none-any.whl:

Publisher: publish.yml on uahypersonics/cfd-viz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page