Metadata-Version: 2.4
Name: farms-foo
Version: 0.1.4
Summary: A sample package for learning PyPI deployment and testing
Author: farmsim
License-Expression: Apache-2.0
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Requires-Dist: build>=1.0; extra == "dev"
Requires-Dist: twine>=4.0; extra == "dev"

# farms-foo

A sample Python package for learning PyPI deployment and testing for FARMS.

## Install

```bash
pip install farms-foo
```

## Usage

```python
from farms_foo import hello

print(hello("world"))  # "Hello, world!"
```

## Development

```bash
# Create a virtual environment and install dev dependencies
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

# Run tests
pytest


## Building

### Local build

```bash
python -m build
```

This compiles Cython extensions and produces a wheel for your current platform + Python version, along with a source distribution.

```bash
# Build both (default)
python -m build

# Only sdist
python -m build --sdist

# Only wheel
python -m build --wheel

# Skip the isolated build environment (use your current venv)
python -m build --no-isolation
```

### Cross-platform wheels (CI only)

cibuildwheel runs in GitHub Actions to build wheels across Linux, macOS, and Windows for multiple Python versions. It requires each Python version to be installed, so it's designed for CI — not local use.

To test it locally, you can limit it to your installed Python:

```bash
pip install cibuildwheel
CIBW_BUILD="cp312-*" cibuildwheel --output-dir wheelhouse
```

Replace `cp312` with whichever Python version you have installed.

### Check before uploading

```bash
twine check dist/*
```

## Publishing

### TestPyPI (practice)

```bash
twine upload --repository testpypi dist/*
pip install --index-url https://test.pypi.org/simple/ farms-foo
```

### PyPI

```bash
twine upload dist/*
```

### CI/CD (automated)

The GitHub Actions workflow handles this automatically:

1. **On push/PR to main** — builds wheels on Ubuntu, macOS, and Windows across Python 3.9, 3.11, 3.12
2. **On GitHub Release** — publishes all wheels + sdist to PyPI via trusted publishing

To trigger a release:

```bash
git tag v0.1.0
git push origin v0.1.0
```

Then create a Release on GitHub from that tag.
