lsd_viz icon indicating copy to clipboard operation
lsd_viz copied to clipboard

Enable running with uv

Open rrherr opened this issue 11 months ago • 1 comments

This PR enables running lsd_viz with uv:

uv run python lsdviz.py /path/to/your_song.mp3

This PR adds pyproject.toml which specifies the required dependencies and Python version (3.11). uv run automatically installs those requirements in an isolated virtual environment. If the user does not already have Python 3.11, then uv automatically downloads and installs it in isolation from other Python versions.

lsd_viz does not work in Python 3.12, because the following line raises SyntaxWarning: invalid escape sequence '\d'.

https://github.com/bmcfee/lsd_viz/blob/426f9e03e9bcf3418ce0c3937b1ed8f5f3a4f67b/lsdviz.py#L60

Instead of changing that line of code, I just used Python 3.11, which worked.

rrherr avatar Apr 02 '25 18:04 rrherr

Instead of changing that line of code, I just used Python 3.11, which worked.

This seems like a pretty heavyweight change - the proper fix is to make this explicitly into a raw string:

 m = re.search(r'(\d+)-(\d*)', range_header) 

bmcfee avatar Apr 04 '25 17:04 bmcfee