uv-advanced-dependencies
Advanced uv dependencies: Git deps, path deps, editable installs, groups, extras, custom indexes. Use when the user mentions git+https deps, editable installs, or private indexes.
What this skill does
# UV Advanced Dependencies Quick reference for advanced dependency scenarios in UV projects. ## When to Use This Skill | Use this skill when... | Use a focused sibling instead when... | |---|---| | Pinning a dependency to a git URL, branch, or tag, or installing in editable mode | Adding a normal PyPI dependency — use uv-project-management | | Configuring `[tool.uv.sources]`, dependency groups, extras, or custom indexes | Sharing source declarations across workspace members — use uv-workspaces | | Setting up private package indexes or build-time constraints | Running an ephemeral script with `--with` deps — use uv-run | ## When This Skill Applies - Git repository dependencies - Local path dependencies - Editable installations - Dependency constraints - Custom package indexes - Dependency groups and extras - Build dependencies ## Quick Reference ### Git Dependencies ```bash # Add from Git repository uv add git+https://github.com/psf/requests uv add git+https://github.com/pallets/flask@main uv add git+ssh://[email protected]/user/[email protected] # Specific branch, tag, or commit uv add git+https://github.com/user/repo@feature-branch uv add git+https://github.com/user/[email protected] uv add git+https://github.com/user/repo@abc123 ``` ### Path Dependencies ```bash # Add from local path uv add --editable ./local-package uv add ../another-project uv add /absolute/path/to/package # Non-editable path uv add --no-editable ./local-package ``` ### Dependency Groups ```bash # Add to named group uv add --group docs sphinx mkdocs uv add --group test pytest pytest-cov # Install specific groups uv sync --group docs uv sync --group test --group docs # Install all groups uv sync --all-groups ``` ### Extras (Optional Dependencies) ```bash # Install package with extras uv add 'fastapi[all]' uv add 'sqlalchemy[postgresql,mypy]' # Define extras in pyproject.toml [project.optional-dependencies] dev = ["pytest", "ruff"] docs = ["mkdocs", "mkdocs-material"] ``` ### Constraint Files ```bash # Apply version constraints uv pip compile requirements.in --constraint constraints.txt # constraints.txt example: # numpy<2.0 # pandas==2.0.3 ``` ### Custom Indexes ```toml [tool.uv] index-url = "https://pypi.org/simple" extra-index-url = [ "https://custom.pypi.org/simple", ] ``` ## Git Dependencies in pyproject.toml ```toml [project] dependencies = [ "my-package", ] [tool.uv.sources] my-package = { git = "https://github.com/user/my-package" } # With branch my-package = { git = "https://github.com/user/my-package", branch = "main" } # With tag my-package = { git = "https://github.com/user/my-package", tag = "v1.0.0" } # With commit my-package = { git = "https://github.com/user/my-package", rev = "abc123" } ``` ## Path Dependencies in pyproject.toml ```toml [project] dependencies = [ "my-local-package", ] [tool.uv.sources] my-local-package = { path = "../my-local-package" } # Editable (default for paths) my-local-package = { path = "../my-local-package", editable = true } # Non-editable my-local-package = { path = "../my-local-package", editable = false } ``` ## Dependency Groups ```toml [dependency-groups] dev = [ "pytest>=7.0", "pytest-cov>=4.0", "ruff>=0.1.0", ] docs = [ "mkdocs-material>=9.0", "mkdocstrings[python]>=0.24", ] test = [ "pytest-asyncio>=0.21", "pytest-mock>=3.12", ] ``` ## URL Dependencies ```bash # Add from direct URL uv add https://files.pythonhosted.org/packages/.../requests-2.31.0.tar.gz # In pyproject.toml [tool.uv.sources] my-package = { url = "https://example.com/my-package-1.0.tar.gz" } ``` ## Private Package Indexes ```toml [tool.uv] # Primary index index-url = "https://pypi.org/simple" # Additional indexes extra-index-url = [ "https://${PRIVATE_TOKEN}@private.pypi.org/simple", ] # Find links find-links = [ "https://download.pytorch.org/whl/cu118", ] ``` ```bash # Set token via environment export PRIVATE_TOKEN="secret" uv sync ``` ## Build Dependencies ```toml [build-system] requires = [ "setuptools>=68", "wheel", "Cython>=3.0", ] build-backend = "setuptools.build_meta" ``` ## Common Patterns ### Development from Local Checkout ```bash # Clone dependency git clone https://github.com/user/lib.git ../lib # Add as editable cd my-project uv add --editable ../lib ``` ### Monorepo Path Dependencies ```toml [tool.uv.sources] my-core = { path = "packages/core" } my-utils = { path = "packages/utils" } ``` ### Mixed Sources ```toml [project] dependencies = [ "fastapi", # PyPI "my-lib", # Git "my-local", # Path ] [tool.uv.sources] my-lib = { git = "https://github.com/user/my-lib" } my-local = { path = "../my-local" } ``` ## Resolution Strategies ```toml [tool.uv] # Highest compatible (default) resolution = "highest" # Lowest compatible resolution = "lowest" # Lowest direct, highest transitive resolution = "lowest-direct" ``` ## See Also - `uv-project-management` - Basic dependency management - `uv-workspaces` - Workspace member dependencies - `python-packaging` - Build system configuration ## References - Official docs: https://docs.astral.sh/uv/concepts/dependencies/ - Detailed guide: See REFERENCE.md in this skill directory
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.