Skip to content

Commit 1cc8f31

Browse files
committed
docs: improve publishing guide with tox instructions and additional details
1 parent 1f79f3e commit 1cc8f31

1 file changed

Lines changed: 18 additions & 5 deletions

File tree

PUBLISHING.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Create accounts on both platforms:
1515

1616
The publish workflow uses GitHub environments with trusted publishing (no API tokens needed!).
1717

18-
#### Set up environments in GitHub:
18+
#### Set up environments in GitHub
1919

2020
1. Go to your repository Settings > Environments
2121
2. Create two environments:
@@ -26,9 +26,10 @@ The publish workflow uses GitHub environments with trusted publishing (no API to
2626
- Required reviewers (for production releases)
2727
- Wait timer (optional delay before deployment)
2828

29-
#### Configure Trusted Publishers:
29+
#### Configure Trusted Publishers
3030

3131
**For TestPyPI:**
32+
3233
1. Log in to https://test.pypi.org
3334
2. Go to Account Settings > Publishing
3435
3. Add a new pending publisher:
@@ -39,6 +40,7 @@ The publish workflow uses GitHub environments with trusted publishing (no API to
3940
- Environment: `testpypi`
4041

4142
**For PyPI:**
43+
4244
1. Log in to https://pypi.org
4345
2. Go to Account Settings > Publishing
4446
3. Add a new pending publisher:
@@ -61,13 +63,18 @@ The publish workflow uses GitHub environments with trusted publishing (no API to
6163
2. **Update changelog** (if exists) or create release notes
6264

6365
3. **Run tests locally**:
66+
67+
The `tox` package will run tests for all supported Python versions. Run this with `uv run tox`.
68+
6469
```bash
70+
uv run tox
6571
uv run pytest
6672
uv run ruff check .
6773
uv run mypy src/toon_format
6874
```
6975

7076
4. **Build and test locally**:
77+
7178
```bash
7279
# Clean previous builds
7380
rm -rf dist/ build/ *.egg-info
@@ -88,6 +95,7 @@ The publish workflow uses GitHub environments with trusted publishing (no API to
8895
### Step 2: Commit and Tag
8996

9097
1. **Commit version changes**:
98+
9199
```bash
92100
git add pyproject.toml src/toon_format/__init__.py
93101
git commit -m "Bump version to X.Y.Z"
@@ -131,7 +139,7 @@ Before publishing to production PyPI, test on TestPyPI:
131139

132140
### Step 5: Verify the Release
133141

134-
1. **Check PyPI**: https://pypi.org/project/toon_format/
142+
1. **Check PyPI**: [https://pypi.org/project/toon_format/](https://pypi.org/project/toon_format/)
135143
2. **Test installation**:
136144
```bash
137145
pip install toon_format
@@ -147,13 +155,15 @@ Before publishing to production PyPI, test on TestPyPI:
147155
### Build fails with "metadata missing"
148156

149157
This is usually a configuration issue in `pyproject.toml`. Verify:
158+
150159
- All required fields are present (name, version, description, etc.)
151160
- Project URLs are properly formatted
152161
- Author email is valid
153162

154163
### Trusted publishing fails
155164

156165
If the trusted publisher configuration fails:
166+
157167
1. Verify the environment name matches exactly
158168
2. Check that the repository owner and name are correct
159169
3. Ensure the workflow file path is correct (`publish.yml`)
@@ -162,6 +172,7 @@ If the trusted publisher configuration fails:
162172
### Package already exists on PyPI
163173

164174
PyPI doesn't allow overwriting published versions. You must:
175+
165176
1. Increment the version number
166177
2. Create a new tag
167178
3. Publish the new version
@@ -174,14 +185,15 @@ Follow [Semantic Versioning](https://semver.org/):
174185
- **MINOR version** (0.X.0): New functionality, backward compatible
175186
- **PATCH version** (0.0.X): Bug fixes, backward compatible
176187
177-
### Agreed Roadmap (from Discussion #18):
188+
### Agreed Roadmap (from Discussion #18)
178189
179190
- **0.8.x** - Initial code set, tests, documentation, migration from toon-llm
180191
- **0.9.x** - Serializer, spec compliance, publishing to PyPI (test and prod)
181192
- **1.0.0-rc.x** - Production readiness candidates
182193
- **1.0.0** - Official stable release 🎉
183194
184195
Examples:
196+
185197
- `0.9.0-beta.1` - First beta release for testing
186198
- `0.9.0-beta.2` - Second beta with fixes
187199
- `0.9.0` - First minor release with new features
@@ -192,7 +204,8 @@ Examples:
192204
193205
Before each release, verify:
194206
195-
- [ ] All tests pass (`uv run pytest`)
207+
- [ ] All tests pass for the latest stable Python version (`uv run pytest`)
208+
- [ ] All tests pass for **all** supported Python versions (`uv run tox`)
196209
- [ ] Linting passes (`uv run ruff check .`)
197210
- [ ] Type checking passes (`uv run mypy src/toon_format`)
198211
- [ ] Version updated in `pyproject.toml` and `src/toon_format/__init__.py`

0 commit comments

Comments
 (0)