# paml-tester

[![PyPI version](https://img.shields.io/pypi/v/paml-tester.svg)](https://pypi.org/project/paml-tester/)
[![Python](https://img.shields.io/pypi/pyversions/paml-tester.svg)](https://pypi.org/project/paml-tester/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

A minimal, zero-dependency Python utility library created to demonstrate
clean PyPI publishing with PEP 621 / setuptools.

---

## Installation

```bash
pip install paml-tester
```

---

## Quick Start

```python
from paml_tester import (
    reverse_string,
    is_palindrome,
    word_count,
    clamp,
    percentage,
    factorial,
    days_until,
    age_in_years,
)

# ── String helpers ──────────────────────────────
print(reverse_string("hello"))        # 'olleh'
print(is_palindrome("racecar"))       # True
print(word_count("one two three"))    # 3

# ── Math helpers ────────────────────────────────
print(clamp(150, 0, 100))             # 100
print(percentage(1, 4))               # 25.0
print(factorial(6))                   # 720

# ── Date helpers ────────────────────────────────
import datetime

print(days_until(datetime.date(2026, 12, 31)))   # days from today
print(age_in_years(datetime.date(2000, 6, 15)))  # e.g. 25
```

---

## API Reference

### String helpers

| Function | Description |
|---|---|
| `reverse_string(text)` | Reverse a string |
| `is_palindrome(text)` | Check if a string is a palindrome (case-insensitive) |
| `word_count(text)` | Count whitespace-separated words |

### Math helpers

| Function | Description |
|---|---|
| `clamp(value, low, high)` | Restrict a number to a range |
| `percentage(part, total, decimals=2)` | Compute what % part is of total |
| `factorial(n)` | Return n! for non-negative integers |

### Date helpers

| Function | Description |
|---|---|
| `days_until(target)` | Days from today to a target date |
| `age_in_years(birthdate)` | Full years elapsed since a birthdate |

---

## Project layout

```
paml_tester_pkg/
├── paml_tester/
│   ├── __init__.py
│   └── utils.py
├── pyproject.toml
├── README.md
└── LICENSE
```

---

## Building & publishing

```bash
# Install build tools (once)
pip install build twine

# Build wheel + sdist
python -m build

# Upload to PyPI (you need a PyPI account + API token)
twine upload dist/*
```

---

## License

MIT — see [LICENSE](LICENSE) for details.
