Metadata-Version: 2.4
Name: pme-toolkit
Version: 1.2.0
Summary: Python implementation of PME-toolkit with PME, PI-PME, and PD-PME workflows
Author-email: Andrea Serani <andrea.serani@cnr.it>
License: MIT
Project-URL: Homepage, https://cnr-inm-mao.github.io/pme-toolkit/
Project-URL: Documentation, https://cnr-inm-mao.github.io/pme-toolkit/
Project-URL: Repository, https://github.com/cnr-inm-mao/pme-toolkit
Project-URL: Issues, https://github.com/cnr-inm-mao/pme-toolkit/issues
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: numpy>=1.24
Requires-Dist: scipy>=1.10
Requires-Dist: matplotlib>=3.7
Provides-Extra: dev
Requires-Dist: pytest>=7.4; extra == "dev"

# PME-toolkit (Python)

Python implementation of **PME-toolkit** for **design-space dimensionality reduction** in parametric shape optimization.

Supports:

* **PME (Parametric Model Embedding)**
* **PI-PME (Physics-Informed PME)**
* **PD-PME (Physics-Driven PME)**
* analytical **backmapping** to original design variables

---

## Overview

The Python package provides a fully functional implementation of PME-based workflows using a **JSON-driven interface** for reproducible studies.

It is aligned with the MATLAB implementation and validated through **cross-language regression tests**.

---

## Installation

### From PyPI

```
pip install pme-toolkit
```

### From source (development mode)

```
pip install -e python/
```

---

## Command-line interface

Run a PME case:

```
pme-run tests/cases/test_glider.json
```

Run backmapping:

```
pme-back tests/cases/test_glider_back.json
```

The CLI:

* parses the JSON configuration
* executes the PME workflow
* writes outputs to the specified `outdir`
* ensures consistency with MATLAB results

---

## Programmatic usage

Example:

```
from pme_toolkit.model import fit_from_case

model = fit_from_case("tests/cases/test_glider.json")

print(model.nconf)
print(model.alpha_train.shape)
```

---

## Repository integration

The Python implementation is part of the full PME-toolkit repository:

* shared **JSON configuration format**
* shared **datasets**
* shared **benchmark definitions**
* validated against MATLAB through **regression testing**

---

## Testing

From repository root:

```
pytest tests/python -q
```

Test suite covers:

* configuration loading
* PME workflows
* backmapping
* regression against MATLAB reference

---

## Datasets

* lightweight test dataset:

  tests/data/

* benchmark datasets:

  databases/

---

## Status

The Python implementation is **fully functional** for PME, PI-PME, and PD-PME within the current scope.

It is actively maintained and serves as a **production-ready interface** for reproducible PME workflows.

