# Releasing qrmfold to PyPI

This repo is configured as a PEP 621 package (see `pyproject.toml`).

## Suggested release flow

- Make sure `main` is clean: commit + push any pending work.
- Update the version in `pyproject.toml` (`[project].version`).
- Commit the version bump (optionally add a git tag like `v0.6.3`).
- Build distributions (`python -m build`).
- Upload to TestPyPI, sanity-check install.
- Upload the same `dist/*` artifacts to PyPI.

## 1) Pre-flight

- Ensure tests pass.
- Bump the version in `pyproject.toml` (`[project].version`).

## 2) Build

From the repository root:

```bash
python -m pip install -U build twine
python -m build
```

This should create `dist/*.whl` and `dist/*.tar.gz`.

## 3) Upload (TestPyPI first)

Create an account + token:
- https://test.pypi.org/

Then:

```bash
twine upload --repository testpypi dist/*
```

Install from TestPyPI (often needs `--extra-index-url`):

```bash
python -m pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple qrmfold
```

## 4) Upload to PyPI

Create an account + token:
- https://pypi.org/

Upload:

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

Now users can install via:

```bash
python -m pip install qrmfold
```

## Notes

- If the name `qrmfold` is already taken on PyPI, you’ll need to change `[project].name`.
- For local dev dependencies, use:

```bash
python -m pip install -e ".[dev]"
```
