Skip to main content

Parsing of STDF file format to DataFrame with Python bindings

Project description

stupidf

stupidf is a library for limited parsing of STDF files. The STDF structure can be used directly in rust, or alternatively sent out to Python using the parse_stdf function.

STDF is the Standard Test Data Format and is commonly used for high-volume test of semiconductors in Automated Test Equipment (ATE) systems.

The purpose of the library is to quickly and efficiently parse STDF files (which are a fairly unfriendly binary linked list-based format) into more friendly polars DataFrame format.

Not all record types are implemented because they're not relevant for my purposes. Implementing new records is straight-forward, following the others.

Example

In rust

use stupidf::data::STDF;
use polars::prelude::*;

let verbose = false;
if let Ok(stdf) = STDF::from_fname(&fname, verbose) {
    let df: DataFrame = (&stdf.test_data).into();
    let df_fmti: DataFrame = (&stdf.test_data.test_information).into();
    println!("{df:#?}");
    println!("{df_fmti}");
    }

Also contains Python bindings to this functionality, e.g.

   import stupidf as sf
   stdf = sf.parse_stdf("my_stdf.stdf")
   stdf['df']

Installation

To install the rust CLI binary:

cargo install stupidf

To add the stupidf library to a rust project, add to the Cargol.toml:

[dependencies]
<... snip ...>
stupidf = "0.1.0"

or execute from the command line in your rust project

cargo add stupidf

To install the Python bindings and pre-built wheel (linux and win currently):

pip install stupidf

Building from source

The rust library can be compiled simply with

cargo build

The Python bindings can be made using maturin. Activate the desired virtualenv, then install maturin and use it to build the bindings

pip install maturin
maturin develop

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

stupidf-0.3.0-cp39-abi3-win_amd64.whl (4.4 MB view details)

Uploaded CPython 3.9+Windows x86-64

stupidf-0.3.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.0 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

File details

Details for the file stupidf-0.3.0-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: stupidf-0.3.0-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 4.4 MB
  • Tags: CPython 3.9+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.3

File hashes

Hashes for stupidf-0.3.0-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 f6ed1858e1e9fea566626408cdf0272ad990d60b9552b93f19145ee5bc4c1564
MD5 3e4a3416f278365db2eb9285410f16d2
BLAKE2b-256 31f85c7fe75cbfad56d777f3435a9d917d08771d51c2db3cdbbbf5a149b7293a

See more details on using hashes here.

File details

Details for the file stupidf-0.3.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for stupidf-0.3.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6c7873597c32d984645d20f8c7a1b765e75adbc3a6295b4c0692057edfa93ca6
MD5 382ecf6e6b0bb0bde978b80e5ba0ca9f
BLAKE2b-256 acb1b9140edf424730e72f5c2c4cb206ab940bc9cc28942d0653133d45682af9

See more details on using hashes here.

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