Skip to content

Conversation

@r33drichards
Copy link
Contributor

No description provided.

Claude and others added 9 commits October 25, 2025 06:02
Consolidates 7 individual PyPI publish workflows into bump-version.yml
to create a single entry point for versioning and publishing Python packages.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Extract version from pyproject.toml after bumping and expose as job output
for downstream publish job.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Map service names to package metadata (package_name, base_package_name,
is_lume_package, tag_prefix) for use in publish job.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Create package-specific tags (e.g., agent-v0.1.0) after bumping version
to trigger downstream publish workflows.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Call pypi-reusable-publish.yml after version bump to publish package
to PyPI in the same workflow run.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Use 'uses:' at job level, not 'steps:', to call reusable workflow.
Convert is_lume_package string to boolean.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
All publish logic now consolidated in bump-version.yml which calls
pypi-reusable-publish.yml directly.

Deleted workflows:
- pypi-publish-agent.yml
- pypi-publish-computer.yml
- pypi-publish-computer-server.yml
- pypi-publish-core.yml
- pypi-publish-mcp-server.yml
- pypi-publish-som.yml
- pypi-publish-pylume.yml

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Update references to reflect consolidated bump-version workflow that now
handles both version bumping and PyPI publishing in a single execution.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Update version extraction to support both static versions in pyproject.toml
and dynamic versions from source files (e.g., __init__.py for pylume).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
secrets:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

set-env-variables:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo what is this?

secrets:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

set-env-variables:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo what is this

PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

set-env-variables:
needs: [prepare, publish]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo what is this

secrets:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

set-env-variables:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this

Vibe Kanban and others added 10 commits October 28, 2025 07:11
…branch? (vibe-kanban c7707de2)

r33drichards commented 3 days ago
.github/workflows/pypi-publish-agent.yml
    secrets:
      PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

  set-env-variables:
Member
Author
@r33drichards r33drichards 3 days ago
todo what is this?

@r33drichards	Reply...
r33drichards
r33drichards commented 3 days ago
.github/workflows/pypi-publish-computer-server.yml
    secrets:
      PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

  set-env-variables:
Member
Author
@r33drichards r33drichards 3 days ago
todo what is this

@r33drichards	Reply...
r33drichards
r33drichards commented 3 days ago
.github/workflows/pypi-publish-computer.yml
      PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

  set-env-variables:
    needs: [prepare, publish]
Member
Author
@r33drichards r33drichards 3 days ago
todo what is this

@r33drichards	Reply...
r33drichards
r33drichards commented 3 days ago
.github/workflows/pypi-publish-mcp-server.yml
    secrets:
      PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

  set-env-variables:
Member
Author
@r33drichards r33drichards 3 days ago
what is this
what were these   set-env-variables: doing and is it preserved on thi…
## Summary

I've successfully rewritten the bash release notes generation script into a **testable, maintainable Python script** that reads from sources of truth. Here's what was created:

### Created Files

1. **`.github/scripts/generate_release_notes.py`** - Main Python script
   - Reads versions from `pyproject.toml` files (source of truth)
   - Handles both static and dynamic versioning (e.g., pylume)
   - Automatically resolves dependency versions from the monorepo
   - Generates package-specific release notes with proper formatting
   - Fully documented with docstrings and type hints

2. **`.github/scripts/tests/test_generate_release_notes.py`** - Comprehensive test suite
   - 15 unit tests covering all functionality
   - Tests for all package types
   - Tests for version detection (static and dynamic)
   - Tests for dependency resolution
   - Tests for error handling
   - **All tests pass ✓**

3. **`.github/scripts/README_RELEASE_NOTES.md`** - Complete documentation
   - Usage examples
   - Integration guide for GitHub Actions
   - How it works explanations
   - Adding new packages guide
   - Troubleshooting section

4. **`.github/scripts/example_workflow_usage.yml`** - Integration examples
   - Shows how to replace the old bash approach
   - GitHub Actions workflow examples
   - Migration checklist

### Key Features

✅ **Source of Truth**: Reads versions directly from `pyproject.toml` files
✅ **Testable**: 15 comprehensive unit tests
✅ **Handles Dynamic Versioning**: Works with pylume's `__version__` in `__init__.py`
✅ **Auto-resolves Dependencies**: Gets dependency versions from monorepo
✅ **Maintainable**: Clear Python code vs 100+ lines of bash conditionals
✅ **Extensible**: Easy to add new packages and sections
✅ **Error Handling**: Clear error messages for missing versions/packages

### Usage Examples

```bash
# Generate release notes (auto-detects version)
python3 .github/scripts/generate_release_notes.py cua-agent

# With specific version
python3 .github/scripts/generate_release_notes.py cua-agent --version 0.4.35

# Save to file
python3 .github/scripts/generate_release_notes.py cua-agent --output release_notes.md

# Run tests
python3 .github/scripts/tests/test_generate_release_notes.py -v
```

### Tested Output Examples

**cua-agent** (with extras):
- Dependencies: cua-computer v0.4.10, cua-som v0.1.3
- Multiple installation options (anthropic, som, all)

**pylume** (dynamic versioning):
- Reads version from `__init__.py`
- Includes lume binary dependency placeholder

**cua-mcp-server** (complex):
- Usage section
- Claude Desktop integration instructions
- JSON configuration example

All actual package versions are read from the real `pyproject.toml` files in your monorepo!
Replace the 100+ line bash script with a call to the new Python script that:
- Reads versions from pyproject.toml (source of truth)
- Handles both static and dynamic versioning
- Auto-resolves dependency versions from monorepo
- Is fully tested with 15 unit tests
- Is maintainable and extensible

Changes:
- Reduced release notes step from ~100 lines to 11 lines
- Call generate_release_notes.py with package name and version
- For pylume, inject LUME_VERSION from binary download step
- All package-specific content now managed in Python config

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Changes:
- Fix workflow file reference (test-scripts.yml -> test-validation-script.yml)
- Run tests on all branches, not just main (better for feature branches)
- Fix typo in workflow name (valididation -> validation)

This ensures that release notes generator tests run automatically:
- On all pull requests that modify .github/scripts/**
- On all pushes that modify .github/scripts/**

The workflow will discover and run all 15 tests in test_generate_release_notes.py

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
…e7e-rewrite-this-to

Resolved merge conflict in pypi-reusable-publish.yml by:
- Removing the "Extract dependency versions from pyproject.toml" step
- Keeping the "Generate Release Notes" step that uses the new Python script

The Python script (generate_release_notes.py) is superior because it:
- Reads actual versions from dependency packages (source of truth)
- Rather than parsing version constraints from dependencies list
- Provides more accurate version information

Conflict resolution:
- HEAD: New Python-based release notes generator
- feature/consolidate-publish-workflows: Inline Python script to extract dependency versions
- Resolution: Use HEAD's approach (Python script) as it's more maintainable and accurate

All tests pass (15/15) ✓

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Perfect! Let me create a summary of what was created:
- Add Claude Code hooks to run isort, black, and ruff checks on edits
- Format generate_release_notes.py with black
- Format test_generate_release_notes.py with black
- Update uv.lock after installing dependencies

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Fixed formatting in markdown files and notebook to comply with prettier standards. Added package-lock.json for npm dependencies.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@r33drichards r33drichards marked this pull request as ready for review October 29, 2025 17:37
@jamesmurdza jamesmurdza marked this pull request as draft October 30, 2025 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant