|
1 | 1 | # Release Steps for snakesee |
2 | 2 |
|
3 | | -This file contains instructions for release steps that were deferred during initial development. |
4 | | -**Do not check this file into version control.** |
5 | | - |
6 | | -## Prerequisites |
7 | | - |
8 | | -Before releasing, ensure: |
9 | | -- [ ] All tests pass: `pixi run check` |
10 | | -- [ ] Coverage meets 95% threshold |
11 | | -- [ ] Documentation builds: `pixi run docs` |
12 | | -- [ ] CHANGELOG.md is updated with release notes |
13 | | - |
14 | | ---- |
15 | | - |
16 | | -## 1. Make GitHub Repository Public |
17 | | - |
18 | | -1. Go to https://github.com/nh13/snakesee/settings |
19 | | -2. Scroll to "Danger Zone" section |
20 | | -3. Click "Change visibility" |
21 | | -4. Select "Make public" |
22 | | -5. Confirm by typing the repository name |
23 | | - |
24 | | ---- |
25 | | - |
26 | | -## 2. Configure PyPI Publishing |
27 | | - |
28 | | -### 2.1 Create PyPI Account and API Token |
29 | | - |
30 | | -1. Create account at https://pypi.org/account/register/ |
31 | | -2. Go to Account Settings > API tokens |
32 | | -3. Create a new token with scope "Entire account" (or project-specific after first upload) |
33 | | -4. Copy the token (starts with `pypi-`) |
34 | | - |
35 | | -### 2.2 Add PyPI Token to GitHub Secrets |
36 | | - |
37 | | -1. Go to https://github.com/nh13/snakesee/settings/secrets/actions |
38 | | -2. Click "New repository secret" |
39 | | -3. Name: `PYPI_API_TOKEN` |
40 | | -4. Value: paste your PyPI token |
41 | | -5. Click "Add secret" |
42 | | - |
43 | | -### 2.3 Test Publishing to TestPyPI (Optional but Recommended) |
44 | | - |
45 | | -1. Create account at https://test.pypi.org/account/register/ |
46 | | -2. Create API token at TestPyPI |
47 | | -3. Add as GitHub secret named `TEST_PYPI_API_TOKEN` |
48 | | -4. Modify `.github/workflows/publish.yml` to publish to TestPyPI first: |
49 | | - |
50 | | -```yaml |
51 | | -- name: Publish to TestPyPI |
52 | | - uses: pypa/gh-action-pypi-publish@release/v1 |
53 | | - with: |
54 | | - password: ${{ secrets.TEST_PYPI_API_TOKEN }} |
55 | | - repository-url: https://test.pypi.org/legacy/ |
56 | | -``` |
57 | | -
|
58 | | -5. Test installation: `pip install -i https://test.pypi.org/simple/ snakesee` |
59 | | - |
60 | | ---- |
61 | | - |
62 | | -## 3. Create First Release |
63 | | - |
64 | | -### 3.1 Update Version |
65 | | - |
66 | | -1. Update version in `pyproject.toml`: |
67 | | - ```toml |
68 | | - version = "0.1.0" |
69 | | - ``` |
70 | | - |
71 | | -2. Update version in `snakesee/__init__.py`: |
72 | | - ```python |
73 | | - __version__ = "0.1.0" |
74 | | - ``` |
75 | | - |
76 | | -### 3.2 Create CHANGELOG.md |
77 | | - |
78 | | -Create `CHANGELOG.md` in repository root: |
79 | | - |
80 | | -```markdown |
81 | | -# Changelog |
| 3 | +## Quick Reference: Release Checklist |
82 | 4 |
|
83 | | -All notable changes to this project will be documented in this file. |
| 5 | +```bash |
| 6 | +# 1. Bump version in pyproject.toml (single source of truth) |
| 7 | +# __init__.py reads it dynamically via importlib.metadata |
84 | 8 |
|
85 | | -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), |
86 | | -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
| 9 | +# 2. Commit the version bump |
| 10 | +git add pyproject.toml |
| 11 | +git commit -m "chore: bump version to X.Y.Z" |
| 12 | +git push origin main |
87 | 13 |
|
88 | | -## [0.1.0] - YYYY-MM-DD |
| 14 | +# 3. Create and push a tag (bare semver, NO 'v' prefix) |
| 15 | +git tag X.Y.Z |
| 16 | +git push origin X.Y.Z |
89 | 17 |
|
90 | | -### Added |
91 | | -- Initial release of snakesee |
92 | | -- Real-time TUI monitoring of Snakemake workflows |
93 | | -- Progress tracking with completion estimation |
94 | | -- Running and failed job displays |
95 | | -- Historical timing statistics per rule |
96 | | -- Vim-style keyboard navigation |
97 | | -- Multiple layout modes (full, compact, minimal) |
98 | | -- Job filtering by rule name |
99 | | -- Log file navigation for historical runs |
100 | | -- CLI commands: `snakesee watch` and `snakesee status` |
| 18 | +# 4. Verify |
| 19 | +# - PyPI: https://pypi.org/project/snakesee/ |
| 20 | +# - GitHub: https://github.com/nh13/snakesee/releases |
| 21 | +# - Install: pip install snakesee==X.Y.Z |
101 | 22 | ``` |
102 | 23 |
|
103 | | -### 3.3 Create Git Tag and GitHub Release |
104 | | - |
105 | | -```bash |
106 | | -# Ensure you're on main branch with latest changes |
107 | | -git checkout main |
108 | | -git pull origin main |
109 | | - |
110 | | -# Create annotated tag |
111 | | -git tag -a v0.1.0 -m "Release v0.1.0" |
| 24 | +CI automatically: |
| 25 | +1. Verifies the tag is on `main` |
| 26 | +2. Runs all tests (Python 3.11, 3.12, 3.13) |
| 27 | +3. Builds source distribution (`uv build --sdist`) |
| 28 | +4. Publishes to PyPI (OIDC authentication) |
| 29 | +5. Generates changelog via `git-cliff` |
| 30 | +6. Creates GitHub Release with changelog |
112 | 31 |
|
113 | | -# Push tag to GitHub |
114 | | -git push origin v0.1.0 |
115 | | -``` |
| 32 | +## Pre-release Checklist |
116 | 33 |
|
117 | | -This will trigger the `publish.yml` workflow which will: |
118 | | -1. Build the package |
119 | | -2. Publish to PyPI |
120 | | -3. Create a GitHub release |
| 34 | +Before releasing, ensure: |
| 35 | +- [ ] All tests pass: `pixi run check` or `uv run poe check-all` |
| 36 | +- [ ] Coverage meets 95% threshold |
| 37 | +- [ ] Documentation builds: `pixi run docs` |
| 38 | +- [ ] All PRs for this release are merged to `main` |
121 | 39 |
|
122 | | -### 3.4 Verify Release |
| 40 | +## Important Notes |
123 | 41 |
|
124 | | -1. Check PyPI: https://pypi.org/project/snakesee/ |
125 | | -2. Check GitHub releases: https://github.com/nh13/snakesee/releases |
126 | | -3. Test installation: `pip install snakesee` |
| 42 | +- **Tag format**: Use bare semver (`0.7.0`), NOT `v0.7.0`. The publish workflow |
| 43 | + triggers on tags matching `[0-9]+.[0-9]+.[0-9]+`. |
| 44 | +- **Version location**: Only update `pyproject.toml`. The `__init__.py` reads |
| 45 | + the version dynamically via `importlib.metadata.version("snakesee")`. |
| 46 | +- **Changelog**: Generated automatically by `git-cliff` from conventional commit |
| 47 | + messages. No manual CHANGELOG.md updates needed. |
| 48 | +- **Commit messages**: Use [Conventional Commits](https://www.conventionalcommits.org/) |
| 49 | + (`feat:`, `fix:`, `docs:`, `perf:`, `refactor:`, `chore:`, etc.) so git-cliff |
| 50 | + categorizes them correctly. |
127 | 51 |
|
128 | 52 | --- |
129 | 53 |
|
130 | | -## 4. Publish to Bioconda |
| 54 | +## First-time Setup (already completed) |
131 | 55 |
|
132 | | -### 4.1 Prerequisites |
| 56 | +These steps were done during initial project setup and are kept here for reference. |
133 | 57 |
|
134 | | -- Package must be published to PyPI first |
135 | | -- You need a GitHub account |
136 | | -- Fork the bioconda-recipes repository |
| 58 | +### PyPI Publishing |
137 | 59 |
|
138 | | -### 4.2 Create Bioconda Recipe |
| 60 | +Publishing uses OIDC token authentication (configured in `.github/workflows/publish.yml` |
| 61 | +with environment `pypi`). No API tokens need to be stored as secrets. |
139 | 62 |
|
140 | | -1. Fork https://github.com/bioconda/bioconda-recipes |
| 63 | +### Bioconda |
141 | 64 |
|
142 | | -2. Clone your fork: |
143 | | - ```bash |
144 | | - git clone https://github.com/YOUR_USERNAME/bioconda-recipes.git |
145 | | - cd bioconda-recipes |
146 | | - ``` |
147 | | - |
148 | | -3. Create recipe directory: |
149 | | - ```bash |
150 | | - mkdir -p recipes/snakesee |
151 | | - ``` |
152 | | - |
153 | | -4. Create `recipes/snakesee/meta.yaml`: |
154 | | - ```yaml |
155 | | - {% set name = "snakesee" %} |
156 | | - {% set version = "0.1.0" %} |
157 | | - |
158 | | - package: |
159 | | - name: {{ name|lower }} |
160 | | - version: {{ version }} |
161 | | - |
162 | | - source: |
163 | | - url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz |
164 | | - sha256: <SHA256_HASH_FROM_PYPI> |
165 | | - |
166 | | - build: |
167 | | - number: 0 |
168 | | - noarch: python |
169 | | - script: {{ PYTHON }} -m pip install . -vv |
170 | | - entry_points: |
171 | | - - snakesee = snakesee.cli:main |
172 | | - |
173 | | - requirements: |
174 | | - host: |
175 | | - - python >=3.11 |
176 | | - - pip |
177 | | - - hatchling |
178 | | - run: |
179 | | - - python >=3.11 |
180 | | - - rich >=13.0.0 |
181 | | - - defopt >=6.4.0 |
182 | | - |
183 | | - test: |
184 | | - imports: |
185 | | - - snakesee |
186 | | - commands: |
187 | | - - snakesee --help |
188 | | - |
189 | | - about: |
190 | | - home: https://github.com/nh13/snakesee |
191 | | - license: MIT |
192 | | - license_family: MIT |
193 | | - license_file: LICENSE |
194 | | - summary: A standalone TUI for monitoring Snakemake workflows |
195 | | - description: | |
196 | | - snakesee is a standalone terminal user interface (TUI) for monitoring |
197 | | - Snakemake workflow progress. It provides real-time progress tracking, |
198 | | - time estimation, and job status monitoring. |
199 | | - dev_url: https://github.com/nh13/snakesee |
200 | | - |
201 | | - extra: |
202 | | - recipe-maintainers: |
203 | | - - YOUR_GITHUB_USERNAME |
204 | | - ``` |
205 | | -
|
206 | | -5. Get SHA256 hash from PyPI: |
207 | | - ```bash |
208 | | - curl -sL https://pypi.org/pypi/snakesee/json | python -c "import sys, json; print(json.load(sys.stdin)['urls'][0]['digests']['sha256'])" |
209 | | - ``` |
210 | | - |
211 | | -### 4.3 Submit Pull Request |
212 | | - |
213 | | -1. Commit your recipe: |
214 | | - ```bash |
215 | | - git checkout -b add-snakesee |
216 | | - git add recipes/snakesee/ |
217 | | - git commit -m "Add snakesee recipe" |
218 | | - git push origin add-snakesee |
219 | | - ``` |
220 | | - |
221 | | -2. Open PR at https://github.com/bioconda/bioconda-recipes/compare |
222 | | - |
223 | | -3. Wait for CI checks and maintainer review |
| 65 | +To add or update the bioconda recipe: |
224 | 66 |
|
225 | | -4. Once merged, package will be available via: |
| 67 | +1. Fork https://github.com/bioconda/bioconda-recipes |
| 68 | +2. Create/update `recipes/snakesee/meta.yaml` with the new version and SHA256 hash: |
226 | 69 | ```bash |
227 | | - conda install -c bioconda snakesee |
| 70 | + curl -sL https://pypi.org/pypi/snakesee/json | \ |
| 71 | + python -c "import sys, json; print(json.load(sys.stdin)['urls'][0]['digests']['sha256'])" |
228 | 72 | ``` |
| 73 | +3. Submit PR to bioconda-recipes |
229 | 74 |
|
230 | | ---- |
231 | | - |
232 | | -## 5. Set Up Documentation Hosting |
233 | | - |
234 | | -### 5.1 Enable Read the Docs |
235 | | - |
236 | | -1. Go to https://readthedocs.org/ |
237 | | -2. Sign in with GitHub |
238 | | -3. Click "Import a Project" |
239 | | -4. Select `nh13/snakesee` |
240 | | -5. Configure: |
241 | | - - Name: `snakesee` |
242 | | - - Default branch: `main` |
243 | | - - Documentation type: `Mkdocs` |
244 | | - |
245 | | -The `.readthedocs.yml` file is already configured in the repository. |
246 | | - |
247 | | -### 5.2 Verify Documentation |
248 | | - |
249 | | -After enabling, documentation will be available at: |
250 | | -- https://snakesee.readthedocs.io/ |
251 | | - |
252 | | ---- |
253 | | - |
254 | | -## 6. Enable Codecov |
| 75 | +### Read the Docs |
255 | 76 |
|
256 | | -1. Go to https://codecov.io/ |
257 | | -2. Sign in with GitHub |
258 | | -3. Add the `nh13/snakesee` repository |
259 | | -4. Copy the Codecov token |
260 | | -5. Add as GitHub secret named `CODECOV_TOKEN` |
| 77 | +Documentation is hosted at https://snakesee.readthedocs.io/ and configured via |
| 78 | +`.readthedocs.yml` in the repository root. |
261 | 79 |
|
262 | | -The `codecov.yml` file and GitHub Actions workflow are already configured. |
| 80 | +### Codecov |
263 | 81 |
|
264 | | ---- |
265 | | - |
266 | | -## Quick Reference: Release Checklist |
267 | | - |
268 | | -For subsequent releases: |
269 | | - |
270 | | -```bash |
271 | | -# 1. Update version in pyproject.toml and __init__.py |
272 | | -# 2. Update CHANGELOG.md |
273 | | -# 3. Commit changes |
274 | | -git add -A |
275 | | -git commit -m "Prepare release v0.x.x" |
276 | | -git push origin main |
277 | | - |
278 | | -# 4. Create and push tag |
279 | | -git tag -a v0.x.x -m "Release v0.x.x" |
280 | | -git push origin v0.x.x |
281 | | - |
282 | | -# 5. Update bioconda recipe (if needed) |
283 | | -# - Update version and sha256 in meta.yaml |
284 | | -# - Submit PR to bioconda-recipes |
285 | | -``` |
| 82 | +Coverage reporting is configured via `codecov.yml` and the `CODECOV_TOKEN` GitHub secret. |
0 commit comments