Skip to content

JothamWong/utilscripts

Repository files navigation

Utilscripts

Utility scripts to help automate some processes and are hopefully useful. Most scripts should use uv. Refer to uv's website for information, but it would suffice to install uv via their quick start instructions and do uv run {script_folder}/main.py with the correct input arguments.

This is also an attempt to understand how to better use uv to handle many packages within the same root directory.

uv notes

uv sync
uv sync --extra index-scraper
uv sync --extra all

Adding dependencies to just one tool.

# shared
uv add <pkg>
# optional, group
uv add --optional <group> <pkg>
# dev tooling
uv add --dev ruff

Installing each tool

# Install just the tool XYZ and its deps
uv tool install ".[index-scraper]"
uv tool install ".[tree-summary]"
# Install everything
uv tool install ".[all]"

It seems that this just handles the dependencies but still installs the tools into the bin directory. Using the tool would then crash as the dependencies are not installed. The alternative is to treat each tool as a separate pyproject.toml which does not seem ideal.

Ruff Commands

  1. Format all files.
uv run ruff format .
  1. Lint and auto -fix
uv run ruff check --fix .

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors