Skip to content

samblouir/SyntheticTableGen

Repository files navigation

Synthetic Table Gen

Composite Synthesis Package

Authors: Sam Blouir and Defne Circi

A Python package for generating synthetic data tables related to composite materials. This package includes:

  • Large lists of fillers, matrices, properties, and units
  • Random row generators producing domain-specific synthetic data
  • A schema-based architecture for easy addition of new table types
  • Tools for formatting ASCII tables and JSON output
  • Utilities for optionally merging or omitting certain fields/units

Table of Contents

  1. Features
  2. Installation
  3. Usage Examples
  4. Generating a Distribution Package
  5. Uploading to PyPI
  6. Project Structure
  7. Contributing
  8. License

Features

  • Rich Data Lists: Definitions of historical/trade synonyms for fillers, matrices, properties, and units
  • Random Generators: Schemas and row-generating functions for consistent, randomized test data
  • Flexible Output: Display tables with random alignment/case/delimiters or export to JSON with custom key naming
  • Schema-based: Each table type is described by a schema that lists columns and references a row-generation function

Installation

Standard Local Install

pip install git+https://github.com/samblouir/synthetic_table_gen

Local (Editable) Install

git clone https://github.com/samblouir/synthetic_table_gen.git
cd synthetic_table_gen
pip install -e .

This installs the package in “editable” mode so changes to the code immediately reflect in the installed package.


Usage Examples

After installation, you can import and use:

import numpy as np
from synthetic_table_gen.main import generate_table_with_json_labels

rng = np.random.default_rng(seed=42)
output_str = generate_table_with_json_labels("composite_fixed_props", n_rows=5, rng=rng)
print(output_str)

You can also run:

python -m synthetic_table_gen.main

Project Structure

synthetic_table_gen/
├── __init__.py
├── data_lists.py
├── generators.py
├── main.py
├── schemas.py
├── synthetic_labels.py
├── utils.py
├── EXAMPLE.md
└── README.md
example.py

Contributing

Please open an issue, send us a message, or send a pull request!


License

Apache 2.0 Cite our paper!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages