Metadata-Version: 2.4
Name: pyfatiguepro
Version: 0.1.0
Summary: Physics-informed fatigue-life prediction library with FEA ingestion, proprietary data validation, ML, SHAP, FastAPI, Docker, and CI/CD.
Author-email: RAVINDRANADH BOBBILI <ravindranadhb@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/RAVINDRANADHBOBBILI/pyfatiguepro
Keywords: fatigue,materials science,FEA,machine learning,SHAP,FastAPI,PyPI,Basquin,Coffin-Manson,Paris Law
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.23
Requires-Dist: pandas>=1.5
Requires-Dist: scipy>=1.9
Requires-Dist: scikit-learn>=1.2
Requires-Dist: joblib>=1.2
Requires-Dist: fastapi>=0.100
Requires-Dist: uvicorn>=0.22
Requires-Dist: pydantic>=2.0
Requires-Dist: python-multipart>=0.0.6
Requires-Dist: matplotlib>=3.7
Provides-Extra: explain
Requires-Dist: shap>=0.42; extra == "explain"
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"
Provides-Extra: notebook
Requires-Dist: jupyter; extra == "notebook"
Requires-Dist: notebook; extra == "notebook"
Dynamic: license-file

# PyFatiguePro

**Physics-informed fatigue-life prediction library for engineering and aeroengine alloys.**

PyFatiguePro combines classical fatigue mechanics, FEA result ingestion, proprietary experimental data validation, machine learning, SHAP explainability, uncertainty estimation, REST API deployment, Docker, tests, and CI/CD.

## Features

- Basquin S-N high-cycle fatigue model
- Coffin-Manson strain-life low-cycle fatigue model
- Paris Law crack-growth integration
- Goodman and Gerber mean-stress corrections
- Von Mises multiaxial stress calculation
- FEA CSV ingestion from Abaqus/ANSYS-style exports
- FEA hotspot feature extraction
- Proprietary-data validation and anonymization
- Dataset provenance registry
- Scalable ML training using Random Forest / HistGradientBoosting / GPR
- Batch prediction for large CSV files
- Uncertainty estimation
- SHAP explainability support
- Sensitivity analysis
- FastAPI REST API
- Docker deployment
- GitHub Actions CI/CD

## Data disclaimer

This package does not ship proprietary or unpublished fatigue datasets. It provides safe workflows to validate, anonymize, and train models on your own internal/proprietary fatigue-test data.

Synthetic examples are demonstration-only and must not be advertised as physical-test validation.

## Installation after PyPI upload

```bash
pip install pyfatiguepro
```

## Local development install

```bash
pip install -e ".[dev,explain]"
```

## Quick example

```python
from pyfatiguepro.core import fit_basquin, basquin_life

stress = [760, 700, 650, 600, 550]
cycles = [1e4, 3e4, 8e4, 2e5, 7e5]

fit = fit_basquin(stress, cycles)
print(fit)

predicted = basquin_life(625, fit["sigma_f_prime"], fit["b"])
print(predicted)
```

## Train demo model

```bash
python examples/train_demo.py
```

This creates `model.joblib`.

## Run API

```bash
uvicorn pyfatiguepro.api:app --host 0.0.0.0 --port 8002
```

Open:

```text
http://127.0.0.1:8002/docs
```

## Docker

```bash
docker build -t pyfatiguepro .
docker run -p 8002:8002 pyfatiguepro
```

## PyPI upload

```bash
python -m pip install --upgrade build twine
python -m build
twine check dist/*
twine upload --repository testpypi dist/*
twine upload dist/*
```

After successful real PyPI upload:

```bash
pip install pyfatiguepro
```
