Metadata-Version: 2.4
Name: PyPlatec
Version: 1.4.3
Summary: Plate tectonics simulation library
Home-page: https://github.com/Mindwerks/pyplatec
Author: Federico Tomassetti, Bret Curtis
Author-email: Federico Tomassetti <f.tomassetti@gmail.com>, Bret Curtis <psi29a@gmail.com>
Maintainer-email: Bret Curtis <psi29a@gmail.com>
License-Expression: LGPL-3.0-or-later
Project-URL: Homepage, https://github.com/Mindwerks/plate-tectonics
Project-URL: Repository, https://github.com/Mindwerks/plate-tectonics
Project-URL: Issues, https://github.com/Mindwerks/plate-tectonics/issues
Keywords: plate-tectonics,simulation,worldgen,geology
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: C++
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# PyPlatec - Python Bindings for Plate Tectonics Library

Python bindings for the plate-tectonics library - a C++ library to simulate plate tectonics.

## Installation

```bash
pip install PyPlatec
```

## Requirements

- Python 3.9 or higher
- No compiler needed when installing from PyPI (pre-built wheels available)

## Quick Start

```python
import platec

# Create a simulation with keyword arguments (recommended)
p = platec.create(
    seed=3,
    width=512,
    height=512,
    sea_level=0.65,
    erosion_period=60,
    folding_ratio=0.02,
    aggr_overlap_abs=1000000,
    aggr_overlap_rel=0.33,
    cycle_count=2,
    num_plates=10
)

# Run the simulation
while platec.is_finished(p) == 0:
    platec.step(p)

# Get the heightmap
hm = platec.get_heightmap(p)

# Clean up
platec.destroy(p)
```

## API Reference

### platec.create()

**Important:** All 10 parameters are required. You can use either positional or keyword arguments.

```python
platec.create(seed, width, height, sea_level, erosion_period, folding_ratio,
              aggr_overlap_abs, aggr_overlap_rel, cycle_count, num_plates)
```

**Parameters:**
- `seed` (int): Random seed for the simulation
- `width` (int): Map width in pixels
- `height` (int): Map height in pixels  
- `sea_level` (float): Sea level (0.0-1.0, typically 0.65)
- `erosion_period` (int): Erosion period (typically 60)
- `folding_ratio` (float): Folding ratio (typically 0.02)
- `aggr_overlap_abs` (int): Absolute overlap threshold (typically 1000000)
- `aggr_overlap_rel` (float): Relative overlap threshold (typically 0.33)
- `cycle_count` (int): Number of cycles (typically 2)
- `num_plates` (int): Number of plates (typically 10)

**Example with custom parameters:**

```python
import platec

# Keyword arguments make the code more readable
p = platec.create(
    seed=3,
    width=1000,
    height=800,
    sea_level=0.65,
    erosion_period=60,
    folding_ratio=0.02,
    aggr_overlap_abs=1000000,
    aggr_overlap_rel=0.33,
    cycle_count=2,
    num_plates=10
)

# Or use positional arguments if preferred
p = platec.create(3, 1000, 800, 0.65, 60, 0.02, 1000000, 0.33, 2, 10)
# Run simulation...
```

## Building from Source

```bash
python setup.py build
python setup.py install
```

For development:
```bash
pip install -e .
```

## For Maintainers: Creating a Release

See [RELEASE.md](RELEASE.md) for detailed instructions on:
- Building wheels with GitHub Actions
- Downloading built artifacts
- Publishing releases to PyPI with twine
- Testing with TestPyPI
- Building wheels for multiple platforms

Quick release process:
```bash
# 1. Update version in setup.py and pyproject.toml
# 2. Commit changes
git commit -am "Bump version to 1.4.2"

# 3. Create and push a tag
git tag v1.4.2
git push origin master
git push origin v1.4.2

# 4. Wait for GitHub Actions to build all wheels
# 5. Download artifacts from GitHub Release or Actions tab
# 6. Upload to PyPI: twine upload *.whl *.tar.gz
```

## License

LGPL-3.0-or-later - See LICENSE file in the repository root.

## Links

- [GitHub Repository](https://github.com/Mindwerks/plate-tectonics)
- [WorldEngine](https://github.com/Mindwerks/worldengine) - A world generator using this library
- [Original Project](http://sourceforge.net/projects/platec/)
