Metadata-Version: 2.4
Name: parq-blockmodel
Version: 0.4.1
Summary: A Python package for efficient storage, manipulation, and analysis of mining block models using Parquet files.
Author-email: Greg <11791585+elphick@users.noreply.github.com>
License-File: LICENSE
Requires-Python: <3.14,>=3.11
Requires-Dist: geopandas<2,>=1.1.1
Requires-Dist: numpy<2.1,>=1.25.2
Requires-Dist: parq-tools>=0.3.1
Requires-Dist: pyarrow>=16.0
Requires-Dist: pyvista>=0.44.2
Provides-Extra: all
Requires-Dist: df-eval>=0.1.4; extra == 'all'
Requires-Dist: imageio-ffmpeg<1,>=0.6.0; extra == 'all'
Requires-Dist: imageio<3,>=2.37.0; extra == 'all'
Requires-Dist: kaleido<2,>=1.1.0; extra == 'all'
Requires-Dist: pandera<0.21,>=0.19; extra == 'all'
Requires-Dist: plotly<7,>=6.1.1; extra == 'all'
Requires-Dist: plyfile>=1.0.0; extra == 'all'
Requires-Dist: rioxarray>=0.18.0; extra == 'all'
Requires-Dist: setuptools<81; extra == 'all'
Requires-Dist: tqdm>=4.67.1; extra == 'all'
Requires-Dist: ydata-profiling>=4.16.1; extra == 'all'
Provides-Extra: mesh
Requires-Dist: plyfile>=1.0.0; extra == 'mesh'
Provides-Extra: profiling
Requires-Dist: setuptools<81; extra == 'profiling'
Requires-Dist: ydata-profiling>=4.16.1; extra == 'profiling'
Provides-Extra: progress
Requires-Dist: tqdm>=4.67.1; extra == 'progress'
Provides-Extra: schema
Requires-Dist: df-eval>=0.1.4; extra == 'schema'
Requires-Dist: pandera<0.21,>=0.19; extra == 'schema'
Provides-Extra: temporal
Requires-Dist: imageio-ffmpeg<1,>=0.6.0; extra == 'temporal'
Requires-Dist: imageio<3,>=2.37.0; extra == 'temporal'
Requires-Dist: rioxarray>=0.18.0; extra == 'temporal'
Provides-Extra: viz
Requires-Dist: kaleido<2,>=1.1.0; extra == 'viz'
Requires-Dist: plotly<7,>=6.1.1; extra == 'viz'
Description-Content-Type: text/markdown

<h1 style="display: inline-flex; align-items: center; gap: 0.4rem; margin: 0;">
  <img src="https://raw.githubusercontent.com/elphick/parq-blockmodel/main/docs/_static/branding/parq-blockmodel.svg" alt="parq-blockmodel logo" width="72" style="display: block; margin-top: 20px;" />
  <span>parq-blockmodel</span>
</h1>

[![Run Tests](https://github.com/Elphick/parq-blockmodel/actions/workflows/build_and_test.yml/badge.svg?branch=main)](https://github.com/Elphick/parq-blockmodel/actions/workflows/build_and_test.yml)
[![PyPI](https://img.shields.io/pypi/v/parq-blockmodel.svg?logo=python&logoColor=white)](https://pypi.org/project/parq-blockmodel/)
![Coverage](https://raw.githubusercontent.com/elphick/parq-blockmodel/main/docs/_static/badges/coverage.svg)
[![Python Versions](https://img.shields.io/pypi/pyversions/parq-blockmodel.svg)](https://pypi.org/project/parq-blockmodel/)
[![License](https://img.shields.io/github/license/Elphick/parq-blockmodel.svg?logo=apache&logoColor=white)](https://pypi.org/project/parq-blockmodel/)
[![Publish Docs](https://github.com/Elphick/parq-blockmodel/actions/workflows/docs_to_gh_pages.yml/badge.svg?branch=main)](https://github.com/Elphick/parq-blockmodel/actions/workflows/docs_to_gh_pages.yml)
[![Open Issues](https://img.shields.io/github/issues/Elphick/parq-blockmodel.svg)](https://github.com/Elphick/parq-blockmodel/issues)
[![Open PRs](https://img.shields.io/github/issues-pr/Elphick/parq-blockmodel.svg)](https://github.com/Elphick/parq-blockmodel/pulls)


## Overview
A Python package for efficient storage, manipulation, and analysis of mining block models using Parquet files. 
parq-blockmodel provides tools for reading, writing, indexing, and transforming large-scale block model datasets, 
leveraging the performance of Apache Arrow and Parquet for scalable geoscience data workflows.

## Installation

Install the base package from PyPI:

```bash
pip install parq-blockmodel
```

Install the optional schema validation support when you want to validate block
model attributes with Pandera schemas or load schema definitions from YAML:

```bash
pip install "parq-blockmodel[schema]"
```

## Schema validation

`ParquetBlockModel` accepts an optional `schema=` argument on its main
constructors. You can pass either a Pandera `DataFrameSchema` object or a path
to a YAML schema file, then validate the resulting model in chunks:

```python
from pathlib import Path

from parq_blockmodel import ParquetBlockModel

pbm = ParquetBlockModel.from_parquet(
    Path("path/to/blockmodel.parquet"),
    schema=Path("schemas/blockmodel.schema.yaml"),
)

pbm.validate()
pbm.validate(sample_chunks=1)  # quick spot-check for large models
```

See the installation guide and user guide for more detail.