feat: convert to UV shebang scripts with PEP 723 metadata#9
Open
ddlaws0n wants to merge 1 commit intoPleasePrompto:masterfrom
Open
feat: convert to UV shebang scripts with PEP 723 metadata#9ddlaws0n wants to merge 1 commit intoPleasePrompto:masterfrom
ddlaws0n wants to merge 1 commit intoPleasePrompto:masterfrom
Conversation
BREAKING CHANGE: Replace manual venv management with UV shebang scripts - Add UV shebang with inline dependencies to all entry point scripts - ask_question.py: patchright==1.55.2, python-dotenv==1.0.0 - auth_manager.py: patchright==1.55.2, python-dotenv==1.0.0 - notebook_manager.py: python-dotenv==1.0.0 - cleanup_manager.py: no dependencies - Remove run.py wrapper (no longer needed) - Remove setup_environment.py (replaced by UV auto-install) - Remove requirements.txt (dependencies now inline) - Update all documentation for new command patterns - SKILL.md: New "Running Scripts" section with UV examples - README.md: UV installation prerequisite and updated examples - CHANGELOG.md: v2.0.0 with comprehensive migration guide - api_reference.md: Updated all command examples - Remove sys.path manipulation from scripts (UV handles imports) Benefits: - Simpler installation (no manual venv setup) - Faster execution (UV dependency caching, ~0.09s cached) - Self-documenting (dependencies visible in scripts) - Modern Python standard (PEP 723) Migration: - Install UV: curl -LsSf https://astral.sh/uv/install.sh | sh - Old: python scripts/run.py script.py - New: ./scripts/script.py (or uv run scripts/script.py) Tested on macOS Sonoma: - Direct execution verified: ./scripts/*.py - Explicit uv verified: uv run scripts/*.py - Dependency caching verified (instant second run) - Import resolution verified - All scripts functional (auth, notebook, cleanup, ask) Windows/Linux testing needed (documented in PR). Closes PleasePrompto#8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Converts the NotebookLM skill from manual
.venv/requirements.txtmanagement to modernuvshebang scripts with PEP 723 inline metadata.Related Issue: Closes #8
Breaking Changes
This is a v2.0.0 breaking change:
Before:
python scripts/run.py ask_question.py --question "..."After:
Migration Required:
curl -LsSf https://astral.sh/uv/install.sh | shChanges
Added
ask_question.py- patchright==1.55.2, python-dotenv==1.0.0auth_manager.py- patchright==1.55.2, python-dotenv==1.0.0notebook_manager.py- python-dotenv==1.0.0cleanup_manager.py- no dependenciesRemoved
scripts/run.py- No longer needed with UV shebangscripts/setup_environment.py- Replaced by UV automatic setuprequirements.txt- Dependencies now inline in scriptsChanged
Benefits
Testing
✅ Tested on macOS Sonoma:
./scripts/*.pyworksuv run scripts/*.pyworksWindows testers:
Linux testers:
Please verify:
Migration Guide
See CHANGELOG.md for detailed migration instructions.
Quick migration:
References
Code Statistics
Before:
After:
Commit: cbf346d