Metadata-Version: 2.4
Name: vcti-path-format-attributes
Version: 2.0.0
Summary: Domain vocabulary enums for file format classification — structures, content, and analysis categories
Author: Visual Collaboration Technologies Inc.
License-Expression: LicenseRef-Proprietary
Project-URL: Repository, https://github.com/vcollab/vcti-python-path-format-attributes
Project-URL: Changelog, https://github.com/vcollab/vcti-python-path-format-attributes/blob/main/CHANGELOG.md
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: <3.15,>=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: vcti-enum>=2.1.0
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Provides-Extra: lint
Requires-Dist: ruff; extra == "lint"
Provides-Extra: typecheck
Requires-Dist: mypy; extra == "typecheck"
Dynamic: license-file

# Path Format Attributes

Domain vocabulary enums for file format classification — structures, content, and analysis categories.

## Overview

This package is the shared taxonomy of the path-format ecosystem: it defines
the classification dimensions that format descriptors declare and that
identification rules filter on — how a file's data is organized, what it
contains, and which kind of analysis produced it. `Attribute` names the
dimensions; `FileStructure`, `FileContent` and `AnalysisType` hold the valid
values for them. Every member is a string enum whose value is its lowercase
name, so it can be used anywhere the plain string can. The vocabulary lives
in its own repository so that adding a dimension or value is a deliberate,
reviewed decision across all formats rather than an ad-hoc tag in one
descriptor.

## Installation

```bash
pip install "vcti-path-format-attributes>=2.0.0"
```

### In `pyproject.toml` dependencies

```toml
dependencies = [
    "vcti-path-format-attributes>=2.0.0",
]
```

---

## Quick Start

```python
from vcti.pathformat.attribute import (
    AnalysisType,
    Attribute,
    FileContent,
    FileStructure,
)

# Keys and values for a format descriptor's attributes
attributes = {
    Attribute.STRUCTURE: FileStructure.HDF5,
    Attribute.CONTENT: [FileContent.MESH, FileContent.SOLVER_OUTPUTS],
    Attribute.ANALYSIS_TYPE: AnalysisType.STRUCTURAL,
}

# Members are their lowercase strings: a str-keyed lookup finds them,
# and they compare equal to the strings a filter rule holds.
assert attributes["structure"] == "hdf5"

# Lookup by value (deserialization)
assert FileStructure("hdf5") is FileStructure.HDF5
```

---

## Enums

### Attribute

Attribute names for format descriptor metadata:

| Member | Value | Values from |
|--------|-------|-------------|
| `SOLVER` | `"solver"` | free-form string |
| `GENERATOR` | `"generator"` | free-form string |
| `STRUCTURE` | `"structure"` | `FileStructure` |
| `CONTENT` | `"content"` | `FileContent` (one or a list) |
| `ANALYSIS_TYPE` | `"analysis_type"` | `AnalysisType` |
| `SOLUTION_TYPE` | `"solution_type"` | free-form string |

Whether a format applies to files or to directories is not an attribute:
the format's evaluator declares it with the framework's `PathKind`
precondition (`check_path_kind`).

### FileStructure

| Member | Value |
|--------|-------|
| `ASCII` | `"ascii"` |
| `BINARY` | `"binary"` |
| `HDF5` | `"hdf5"` |
| `JSON` | `"json"` |
| `CSV` | `"csv"` |

### FileContent

| Member | Value |
|--------|-------|
| `MESH` | `"mesh"` |
| `SOLVER_INPUTS` | `"solver_inputs"` |
| `SOLVER_OUTPUTS` | `"solver_outputs"` |
| `FILTERED_DATA` | `"filtered_data"` |
| `SURFACE_3D_MODEL` | `"surface_3d_model"` |
| `SURFACE_3D_VIEWS` | `"surface_3d_views"` |

### AnalysisType

| Member | Value |
|--------|-------|
| `STRUCTURAL` | `"structural"` |
| `THERMAL` | `"thermal"` |
| `FLUID` | `"fluid"` |
| `CRASH` | `"crash"` |

---

## Dependencies

- [vcti-enum](https://pypi.org/project/vcti-enum/) (>=2.1.0) — value-generated string enums

## Documentation

| If you want to… | Read |
|---|---|
| Understand how the three path-format repositories fit together | [docs/ecosystem.md](docs/ecosystem.md) |
| Understand the design decisions | [docs/design.md](docs/design.md) |
| Add a member or a new classification dimension | [docs/extending.md](docs/extending.md) |
