This repository contains the scripts used by Bob's Universal and Very Intelligent System.
Feel free to reuse anything, but proceed with caution.
If you find something I could be doing a better way, please drop me an email at [email protected]. I always appreciate any opportunity to learn. Thank you!
- python
- uv
No installation is required. The scripts are self-bootstrapping using uv.
Just make sure uv is installed and available in your PATH.
This can be automated if you create a post-merge hook (assuming scripts are cloned to home directory):
-
Create
post-mergein.git/hooks#!/bin/bash cd ~/scripts echo "Updating scripts" uv cache clean buvis-pybase uv run --reinstall-package buvis-pybase --script bin/update-scripts cd -
-
Make it executable:
chmod +x .git/hooks/post-merge
-
Create
post-mergein.git/hooks#!/bin/sh exec powershell.exe -ExecutionPolicy Bypass -File "$(dirname "$0")/post-merge.ps1"
-
Create
post-merge.ps1in.git/hooks$originalLocation = Get-Location Set-Location $env:USERPROFILE\scripts Write-Host "Updating scripts" uv cache clean buvis-pybase uv run --reinstall-package buvis-pybase --script bin/update-scripts Set-Location $originalLocation
Anything in ./bin folder can be executed and ideally provides usage instructions. It is a good idea to add the bin folder to your system path to make the scripts available anywhere.
The scripts use PEP 723 inline metadata to declare their dependencies.
When you run a script, uv will automatically create an isolated environment and install the required dependencies (including buvis-pybase) if they are missing.
You can use uv to create and manage virtual environments if needed, but for running scripts, uv run handles it automatically.
uv manages Python versions automatically. You can specify the version in .python-version or via uv python install.
The scripts are using buvis-pybase, doogat-core and doogat-integrations which I'm also developing.
To work with local versions, run start-dev.
To switch back to released versions, run finish-dev.
To test a dev version of buvis-pybase published to test.pypi.org, update pyproject.toml:
dependencies = ["buvis-pybase==0.6.0.dev0"] # pin to dev version
[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
explicit = true
[tool.uv.sources]
buvis-pybase = { index = "testpypi" }To switch back to production, remove [[tool.uv.index]] and [tool.uv.sources] sections and use normal version spec.
Run uv sync after switching.