Skip to main content

Lightweight visualization CLI for structured CFD datasets

Project description

cfd-viz

Lightweight visualization CLI for structured CFD datasets.

Test codecov 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.3.tar.gz (19.2 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.3-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

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

Hashes for cfd_viz-0.1.3.tar.gz
Algorithm Hash digest
SHA256 7f18641bf8a4ff27ef3a3be3073663bee9d0f1cb577ae5db3240b69a82583299
MD5 32c5d43547f0ddf2783b0990faa85673
BLAKE2b-256 c7eda99549ea5ac4572e155665a6280864471be91ca892004bce7e93a298890c

See more details on using hashes here.

Provenance

The following attestation bundles were made for cfd_viz-0.1.3.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.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

Hashes for cfd_viz-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1a2d31bce2ec7f0fd84b8e8943237021354095221510cc96add8a585a28dcc12
MD5 5ace430fa93cffdda182b3f1c8908e56
BLAKE2b-256 748b7d2170c8f66868128f3b4b092d5e6347858229b6fcd535dfe8202a197d57

See more details on using hashes here.

Provenance

The following attestation bundles were made for cfd_viz-0.1.3-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