Metadata-Version: 2.5
Name: mrkwatkins-oakemu
Version: 0.0.47
Summary: Python wrappers for the OakEmu project.
Project-URL: Documentation, https://mrkwatkins.github.io/OakEmu-Python/
Project-URL: Homepage, https://www.mrkwatkins.co.uk
Project-URL: Repository, https://github.com/MrKWatkins/OakEmu-Python
Author-email: MrKWatkins <mrkwatkins@gmail.com>
License-Expression: GPL-3.0-only
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Requires-Python: <3.16,>=3.13
Requires-Dist: numpy>=2.5.4
Requires-Dist: pythonnet>=3.2.1
Description-Content-Type: text/markdown

# OakEmu-Python

[![Build Status](https://github.com/MrKWatkins/OakEmu-Python/actions/workflows/build.yml/badge.svg)](https://github.com/MrKWatkins/OakEmu-Python/actions/workflows/build.yml)
[![PyPI - Version](https://img.shields.io/pypi/v/mrkwatkins-oakemu)](https://pypi.org/project/mrkwatkins-oakemu/)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/mrkwatkins-oakemu)](https://pypi.org/project/mrkwatkins-oakemu/)

> Python wrappers for the [OakEmu](https://github.com/MrKWatkins/OakEmu) project.

[Documentation](https://mrkwatkins.github.io/OakEmu-Python/) · [Python API](https://mrkwatkins.github.io/OakEmu-Python/api/)

## Local development

Use Python 3.13–3.15, uv and the .NET 10 runtime.

```sh
uv sync --locked
uv run coverage run --branch --source=src,scripts --m pytest --junitxml=test-results.xml
uv run ruff check
uv run ruff format --check
uv run ty check
```

## Preview documentation

With uv and Docker installed, run `python3 docs/preview.py`, or select **Preview documentation** in a JetBrains IDE.
Open <http://localhost:5173/OakEmu-Python/>. Restart the preview after editing source or documentation.
The API is generated statically from Python source; previewing it does not load .NET. Generated output under `artifacts/` is ignored.

## Releases

**Build and Test** validates Python 3.13, 3.14 and 3.15, with documentation validated on Python 3.14.
**Release** builds and tests before publishing packages and documentation. Either publication can be disabled;
turn packages off to update documentation without uploading another PyPI version. No release tag is created for a docs-only run.
A blank release version increments the latest stable Git tag's minor version, starting from `0.0.0` before the first tagged release.
For the first docs-only deployment after this port, set `api-ref` to `main`: the historical `v0.0.45` source predates
the corrected public exports and API docstrings. After the next package release, leave it blank.

The package version is derived from Git tags using `hatch-vcs`; there is no fixed version to update in `pyproject.toml`.
Local builds between releases receive a development version. Release builds use the workflow-selected version.

Configure GitHub Pages to use **GitHub Actions**. For package publication, configure a PyPI Trusted Publisher for this repository,
workflow `release.yml` and environment `github-pages`; no long-lived `PYPI_API_KEY` is used.

## Update emulator assemblies

Run `uv run python scripts/update_assemblies.py` to build the sibling OakEmu checkout in Release mode and copy its referenced runtime dependencies. Formatting stays for HTML dumps; optional VYaml configuration APIs and unrelated build tooling are omitted. The script removes JetBrains annotations and replaces the old bundle, including dependencies that have been removed or renamed. Dependency versions come from OakEmu's central NuGet configuration; there are no separate version numbers to maintain here.

Run the tests before releasing the refreshed package. Projects such as OakEmu-RL that bundle additional assemblies must use the corresponding OakEmu-Python release.
