add inline dependencies#269
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds PEP 723-style inline script metadata to main.py so tools like uv can resolve and install the script’s Python dependencies automatically when running the script.
Changes:
- Added a
# /// scriptinline metadata block declaringtqdm,requests, andInquirerPyas dependencies.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # dependencies = [ | ||
| # "tqdm", | ||
| # "requests", | ||
| # "InquirerPy" |
There was a problem hiding this comment.
The inline # /// script metadata is parsed as TOML (PEP 723 style). In a TOML array, items must be comma-separated; as written, the dependencies = [ block is invalid and tools like uv run --script will fail to parse it. Add commas between the dependency strings (a trailing comma is also fine).
| # "InquirerPy" | |
| # "InquirerPy", |
| # /// script | ||
| # dependencies = [ | ||
| # "tqdm", | ||
| # "requests", | ||
| # "InquirerPy" | ||
| # ] | ||
| # /// |
There was a problem hiding this comment.
This introduces a second source of truth for runtime dependencies (inline here and also in requirements.txt). That duplication can drift over time and cause confusing install/runtime mismatches. Consider either generating/deriving one from the other, or documenting which one is authoritative (and when each should be updated).
| # /// script | |
| # dependencies = [ | |
| # "tqdm", | |
| # "requests", | |
| # "InquirerPy" | |
| # ] | |
| # /// |
Commented out additional dependencies in the script.
This commit adds inline dependencies which allows for tools like uv to create and manage the venv for you when run like this:
Docs of uv on the topic