Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,49 @@ pre-commit install

This ensures that every time you commit, all the hooks are executed automatically on the staged files.

### 2.3 Build a PLAID dataset from raw CSV data

PLAID provides a CLI entry point to build a dataset from a raw-data directory layout in one command:

```bash
plaid-build-dataset --input-dir="/path/to/raw/data" --output-dir="/path/to/plaid/output"
```

Equivalent module invocation:

```bash
python -m plaid.cli.build_dataset --input-dir="/path/to/raw/data" --output-dir="/path/to/plaid/output"
```

Expected raw-data layout (example):

```text
/path/to/raw/data
β”œβ”€β”€ input_scalars/
β”‚ β”œβ”€β”€ scalars_00000.csv
β”‚ β”œβ”€β”€ scalars_00001.csv
β”‚ └── ...
β”œβ”€β”€ output_scalars/
β”‚ β”œβ”€β”€ scalars_00000.csv
β”‚ β”œβ”€β”€ scalars_00001.csv
β”‚ └── ...
β”œβ”€β”€ field_1/
β”‚ β”œβ”€β”€ scalars_00000.csv
β”‚ β”œβ”€β”€ scalars_00001.csv
β”‚ └── ...
β”œβ”€β”€ field_2/
β”‚ β”œβ”€β”€ scalars_00000.csv
β”‚ β”œβ”€β”€ scalars_00001.csv
β”‚ └── ...
└── ...
```

Notes:
- Scalar files must contain one header row and one data row.
- Sample IDs are inferred from numeric filename suffixes (e.g. `scalars_00012.csv` -> id `12`) and must match across directories.
- Field directories are auto-detected (all subdirectories except `input_scalars` and `output_scalars`) unless passed explicitly via `--field-dirs`.
- Use `--overwrite` to replace an existing output directory.

## 3. Call for Contributions

The PLAID project welcomes your expertise and enthusiasm!
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ files=["LICENSE.txt"]
file="README.md"
content-type = "text/markdown"

[project.scripts]
plaid-build-dataset = "plaid.cli.build_dataset:main"

[tool.setuptools]
platforms = [
"Linux",
Expand Down
1 change: 1 addition & 0 deletions src/plaid/cli/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Command-line utilities for PLAID."""
Loading
Loading