Skip to content

Commit 71e1a6b

Browse files
teng-linclaude
andcommitted
fix: address review feedback and reorder release workflow
- Add Artifact.variant to deprecation list in CHANGELOG.md - Add Artifact.variant to deprecation table in stability.md - Restore Artifact.variant migration guide section - Reorder release workflow: TestPyPI verification before merge to main Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 94f1f9e commit 71e1a6b

3 files changed

Lines changed: 45 additions & 25 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ See [Migration Guide](docs/stability.md#migrating-from-v02x-to-v030) for upgrade
7272

7373
- **`Source.source_type`** - Use `.kind` property instead (returns `SourceType` str enum)
7474
- **`Artifact.artifact_type`** - Use `.kind` property instead (returns `ArtifactType` str enum)
75+
- **`Artifact.variant`** - Use `.kind`, `.is_quiz`, or `.is_flashcards` instead
7576
- **`SourceFulltext.source_type`** - Use `.kind` property instead
7677
- **`StudioContentType`** - Use `ArtifactType` (str enum) for user-facing code
7778

docs/releasing.md

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ Release Plan for vX.Y.Z:
2828
4. Commit changes
2929
5. ⏸️ CONFIRM: Create PR to main?
3030
6. Wait for CI to pass on PR
31-
7. Merge PR to main
32-
8. ⏸️ CONFIRM: Publish to TestPyPI?
33-
9. Verify TestPyPI package
31+
7. ⏸️ CONFIRM: Publish to TestPyPI?
32+
8. Verify TestPyPI package
33+
9. Merge PR to main
3434
10. ⏸️ CONFIRM: Create and push tag vX.Y.Z?
3535
11. Wait for PyPI publish
3636
12. Create GitHub release
@@ -173,23 +173,6 @@ Proceed with release preparation?
173173
- Type checking
174174
- Unit and integration tests (Python 3.10-3.14, all platforms)
175175

176-
### Merge to Main
177-
178-
- [ ] Once CI passes, merge the PR:
179-
```bash
180-
gh pr merge --squash --delete-branch
181-
```
182-
- [ ] Pull latest main (in main repo or update worktree):
183-
```bash
184-
git checkout main && git pull origin main
185-
```
186-
187-
### E2E Tests on Main (Optional)
188-
189-
- [ ] Go to **Actions****Nightly E2E**
190-
- [ ] Click **Run workflow**, select `main` branch
191-
- [ ] Wait for E2E tests to pass
192-
193176
---
194177

195178
## Package Verification
@@ -200,7 +183,7 @@ Proceed with release preparation?
200183

201184
- [ ] **⏸️ CONFIRM:** Ask user "Ready to publish to TestPyPI?"
202185
- [ ] Go to **Actions****Publish to TestPyPI**
203-
- [ ] Click **Run workflow**
186+
- [ ] Click **Run workflow**, select the **release/X.Y.Z** branch
204187
- [ ] Wait for upload to complete
205188
- [ ] Verify package appears: https://test.pypi.org/project/notebooklm-py/
206189

@@ -212,10 +195,24 @@ Proceed with release preparation?
212195
- [ ] Click **Run workflow** with **source**: `testpypi`
213196
- [ ] Wait for all tests to pass (unit, integration, E2E)
214197
- [ ] If verification fails:
215-
1. Create a new release branch with bumped patch version
216-
2. Fix issues
217-
3. Create new PR
218-
4. Merge and re-run **Publish to TestPyPI**
198+
1. Fix issues in the release worktree
199+
2. Bump patch version in `pyproject.toml`
200+
3. Update `CHANGELOG.md` with fix
201+
4. Commit, push, and re-run **Publish to TestPyPI**
202+
203+
---
204+
205+
## Merge to Main
206+
207+
- [ ] Once TestPyPI verification passes, merge the PR:
208+
```bash
209+
gh pr merge --squash --delete-branch
210+
```
211+
- [ ] Pull latest main (in main repo):
212+
```bash
213+
cd /path/to/notebooklm-py
214+
git pull origin main
215+
```
219216

220217
---
221218

docs/stability.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ The following are deprecated and will be removed in **v0.4.0**:
117117
|------------|-------------|-------|
118118
| `Source.source_type` | `Source.kind` | Returns `SourceType` str enum |
119119
| `Artifact.artifact_type` | `Artifact.kind` | Returns `ArtifactType` str enum |
120+
| `Artifact.variant` | `Artifact.kind` | Use `.is_quiz` / `.is_flashcards` |
120121
| `SourceFulltext.source_type` | `SourceFulltext.kind` | Returns `SourceType` str enum |
121122
| `StudioContentType` | `ArtifactType` | Str enum for user-facing code |
122123

@@ -183,6 +184,27 @@ if artifact.kind == "audio":
183184
**Available `ArtifactType` values:**
184185
`AUDIO`, `VIDEO`, `REPORT`, `QUIZ`, `FLASHCARDS`, `MIND_MAP`, `INFOGRAPHIC`, `SLIDE_DECK`, `DATA_TABLE`, `UNKNOWN`
185186

187+
#### 3. `Artifact.variant``Artifact.kind` or helpers
188+
189+
**Before (deprecated):**
190+
```python
191+
if artifact.artifact_type == 4 and artifact.variant == 2: # ⚠️ Deprecated
192+
print("This is a quiz")
193+
```
194+
195+
**After (recommended):**
196+
```python
197+
# Option 1: Use .kind
198+
if artifact.kind == ArtifactType.QUIZ:
199+
print("This is a quiz")
200+
201+
# Option 2: Use helper properties
202+
if artifact.is_quiz:
203+
print("This is a quiz")
204+
if artifact.is_flashcards:
205+
print("These are flashcards")
206+
```
207+
186208
#### Why These Changes?
187209

188210
1. **Stability**: The `.kind` property abstracts internal integer codes that Google may change

0 commit comments

Comments
 (0)