Skip to main content

cfd-io

I/O toolkit for structured CFD data: read, write, and convert between formats.

Test codecov DOI PyPI Docs License Python Ruff

Install

pip install cfd-io

Quick Start

from cfd_io import read_file, write_file, get_info

# inspect a file
info = get_info("flow.h5")
print(info.nx, info.ny, info.var_names)

# read data
grid, flow, attrs = read_file("flow.h5")

# write to a different format
write_file("flow.h5", grid, flow, attrs)

Features

  • Unified API: read_file / write_file dispatch by file extension
  • Format conversion: do_convert reads one format, writes another
  • File inspection: get_info returns structured metadata without loading data
  • CLI: cfd-io convert and cfd-io info for quick terminal use

CLI

# convert between formats
cfd-io convert grid.x grid.h5

# inspect a file
cfd-io info grid.h5

Testing

pytest tests/ --cov --cov-report=term-missing \
    --ignore=tests/test_tecplot_ascii.py \
    --ignore=tests/test_tecplot_binary.py \
    --ignore=tests/test_plt.py -q

Documentation

Full documentation: https://uahypersonics.github.io/cfd-io

Citation

If cfd-io contributes to published work, please cite the software release:

GitHub also provides machine-readable citation metadata via CITATION.cff in this repository.

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. Update the version in pyproject.toml
  2. Regenerate the API architecture diagram:
    pydeps src/cfd_io --noshow --max-bacon=4 --cluster -o docs/assets/architecture.svg
    
  3. Commit and push to main
  4. Tag and push:
    git tag -a vMAJOR.MINOR.PATCH -m "Release vMAJOR.MINOR.PATCH"
    git push origin vMAJOR.MINOR.PATCH
    

Use a signed tag when your GPG/SSH signing is configured:

git tag -s 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

GNU General Public License v3.0 or later. See LICENSE for the complete license terms.

Metadata

Release files for cfd-io 0.2.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cfd-io 0.2.8
File Size Uploaded Provenance
cfd_io-0.2.8.tar.gz 112.0 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for cfd-io 0.2.8
File Interpreter ABI Platform
cfd_io-0.2.8-py3-none-any.whl Python 3 none any Details

Total release size: 209.8 kB

Release files / cfd_io-0.2.8.tar.gz

Download URL cfd_io-0.2.8.tar.gz
Size 112.0 kB
Tags Source
SHA-256 checksum
How to use checksums
78575ce91b662192e464f3a4fec560fb07f11628ea250efde3a844ec8fffc633
BLAKE2b-256 checksum
How to use checksums
9a8228db1c66e7b98e5e4783431a576429c8b0167dbfeeabc5a3e2e1f6fbff54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / cfd_io-0.2.8-py3-none-any.whl

Download URL cfd_io-0.2.8-py3-none-any.whl
Size 97.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
748e013bc65b2b7a8aa9e73a467af11554b6cfa9637bc95641f313fbea608c44
BLAKE2b-256 checksum
How to use checksums
706c91b4eb0a95af49d04c22627594833adb1afc740a809d5362261801b70242
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Security for cfd-io 0.2.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cfd_io-0.2.8.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page