Merge pull request #508 from corrscope/uv2

Switch from Poetry to uv project manager
pull/509/head
nyanpasu64 2025-05-17 00:39:47 -07:00 zatwierdzone przez GitHub
commit 38814dd711
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
7 zmienionych plików z 1100 dodań i 1316 usunięć

Wyświetl plik

@ -35,7 +35,7 @@ assignees: ''
- OS: <!-- e.g. Windows 10 x64 -->
- Corrscope version:
- How you installed corrscope: <!-- official Windows binaries, pip, poetry, etc. -->
- How you installed corrscope: <!-- official Windows binaries, pip, uv, poetry, etc. -->
- How you obtained FFmpeg: <!-- Linux package manager, in-app download, etc., unknown -->
## Additional context

Wyświetl plik

@ -16,6 +16,7 @@
- When opening missing file via CLI, show dialog rather than crashing (#499)
- Fix saving global settings after opening config in Unicode folder (#507)
- Save config files atomically (#507)
- Switch from Poetry to uv project manager (#508)
## 0.10.1

Wyświetl plik

@ -62,13 +62,13 @@ On other platforms, follow the regular pip or pipx installation instructions, bu
### Running from Source Code (cross-platform, dev master)
Install Python 3.8 or above, and Poetry. My preference is to run `pipx install poetry`. You can alternatively use the Poetry installer via `curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python`, but in the past, updating via `poetry self update` has broken and left me with no Poetry at all, requiring reinstalling.
Install Python 3.8 or above, and [uv](https://docs.astral.sh/uv/getting-started/installation/).
```shell
cd path/to/corrscope
poetry install -E qt5 # --develop is implied
# On M1 Mac, instead run `poetry install -E qt6`.
poetry run corr (args)
uv sync --extra qt5
# On M1 Mac, instead run `uv sync --extra qt5`.
uv run corr (args)
```
### Installing on Android (experimental)
@ -95,18 +95,18 @@ More help is available at the [help site](https://corrscope.github.io/corrscope/
## Command-line Tutorial
1. Create YAML:
- `corrscope split*.wav --audio master.wav -w`
- `corr split*.wav --audio master.wav -w`
- Specify all channels on the command line.
- `-a` or `--audio` specifies master audio track.
- Creates file `master.yaml`.
1. Edit `master.yaml` to change settings.
2. Edit `master.yaml` to change settings.
1. Play (requires ffmpeg):
- `corrscope master.yaml -p/--play`
3. Play (requires ffmpeg):
- `corr master.yaml -p/--play`
1. Render and encode video (requires ffmpeg)
- `corrscope master.yaml -r/--render file.mp4` (other file extensions supported)
4. Render and encode video (requires ffmpeg)
- `corr master.yaml -r/--render file.mp4` (other file extensions supported)
## Mac-specific Issues

Wyświetl plik

@ -8,7 +8,7 @@ branches:
only:
- master
image: Visual Studio 2019
image: Visual Studio 2022
shallow_clone: true
environment:
matrix:
@ -22,34 +22,35 @@ environment:
cache:
- '%LOCALAPPDATA%\pypoetry\Cache -> .appveyor\clear-caches'
- '%USERPROFILE%\.poetry -> .appveyor\clear-caches'
# \cache\repositories\pypi\
# \virtualenvs\xyz-py3.x\
- '%LOCALAPPDATA%\uv\cache -> .appveyor\clear-caches'
# - '.venv -> .appveyor\clear-caches'
install:
# needed? to fix `appveyor` command
- 'set PATH=C:\Program Files\AppVeyor\BuildAgent\;%PATH%'
- 'curl -sSL https://install.python-poetry.org | %py% -'
- 'set PATH=%APPDATA%\Python\Scripts;%PATH%'
- powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
- 'set Path=%USERPROFILE%\.local\bin;%Path%'
# Prevents: "The current Python version (2.7.15) is not supported by the project (^3.6)"
- 'set PATH=%pydir%;%pydir%\bin;%pydir%\Scripts;%PATH%'
- 'poetry install -v -E qt5' # don't pass --no-dev
- 'uv sync --extra qt5' # don't pass --no-dev
build_script:
- exit
test_script:
- 'poetry run black --check .'
- 'poetry run pytest --tb=short'
- 'uv run black --check .'
- 'uv run pytest --tb=short'
after_test:
# Run 32-bit PyInstaller to make CI complete faster.
# pyinstaller used to get stuck for minutes on 32-bit builds, but it no longer happens.
- 'poetry build'
- 'poetry run pyinstaller corrscope.spec -y'
- 'uv build'
- 'uv run pyinstaller corrscope.spec -y'
artifacts:
- path: 'dist\*'
- path: 'dist\corrscope-*' # exclude dist\.gitignore
on_finish:
- 'uv cache prune --ci'

1243
poetry.lock wygenerowano

Plik diff jest za duży Load Diff

Wyświetl plik

@ -1,64 +1,58 @@
# Right now, `pip install [--editable] .` and `pipx install .` work,
# but `pipx install --editable .` fails with message
# "No apps associated with package UNKNOWN or its dependencies."
[build-system]
requires = ["poetry_core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.poetry]
[project]
name = "corrscope"
version = "0.11.0-pre"
description = "Python program to render wave files into oscilloscope views, featuring advanced correlation-based triggering algorithm"
license = "BSD-2-Clause"
authors = ["nyanpasu64 <nyanpasu64@tuta.io>"]
# maintainers =
authors = [{ name = "nyanpasu64", email = "nyanpasu64@tuta.io" }]
requires-python = "~=3.10"
readme = "README.md"
# homepage =
repository = "https://github.com/corrscope/corrscope/"
documentation = "https://corrscope.github.io/corrscope/"
license = "BSD-2-Clause"
[tool.poetry.dependencies]
python = "^3.10"
"ruamel.yaml" = "^0.17"
numpy = ">=1.21,<3.0"
click = "^8.0.1"
matplotlib = "^3.5"
attrs = ">=21.2.0"
appdirs = "^1.4.4"
atomicwrites = "^1.4.0"
colorspacious = "^1.1.2"
QtPy = "^2.0.1"
PyQt5 = {version = "^5.15", optional = true}
PyQt5-Qt5 = {version = "^5.15,<5.15.11", optional = true}
PyQt6 = {version = "^6.2", optional = true}
appnope = {platform = "darwin", version = "^0.1.3"}
# https://packaging.python.org/en/latest/specifications/version-specifiers/#version-specifiers
dependencies = [
"ruamel.yaml>=0.17,<0.19",
"numpy>=1.21,<3.0",
"click>=8.0.1,<9",
"matplotlib~=3.5",
"attrs>=21.2.0",
"appdirs>=1.4.4,<2",
"atomicwrites>=1.4.0,<2",
"colorspacious>=1.1.2,<2",
"QtPy>=2.0.1,<3",
"appnope>=0.1.3,<0.2 ; sys_platform == 'darwin'",
]
[tool.poetry.extras]
qt5 = ["PyQt5", "PyQt5-Qt5"]
qt6 = ["PyQt6"]
[project.optional-dependencies]
qt5 = [
"PyQt5~=5.15",
"PyQt5-Qt5~=5.15,<5.15.11",
]
qt6 = ["PyQt6~=6.2"]
[tool.poetry.dev-dependencies]
pytest = "^8"
pytest-mock = "^3.6.1"
hypothesis = "^6.14.0"
delayed-assert = "^0.3.5"
[project.urls]
Repository = "https://github.com/corrscope/corrscope/"
Documentation = "https://corrscope.github.io/corrscope/"
# Note: PyInstaller 4.5 and below claim to support all Python versions,
# and 4.6 and above have maximum Python versions.
# When upgrading the version of Python (not PyInstaller) used to create binaries,
# increase the `python = ""` bound.
pyinstaller = {version = "^6.3", python = "<3.13"}
[project.scripts]
corr = "corrscope.cli:main"
#pefile = {version = "^2021.5.24", platform = "win32"}
pytest-cases = "^3.6.1"
black = "^22"
[tool.poetry.scripts]
corr = 'corrscope.cli:main'
[dependency-groups]
dev = [
"pytest>=8,<9",
"pytest-mock>=3.6.1,<4",
"hypothesis>=6.14.0,<7",
"delayed-assert>=0.3.5,<0.4",
"pyinstaller~=6.3 ; python_version < '3.13'",
"pytest-cases>=3.6.1,<4",
"black>=22,<23",
]
[tool.black]
line-length = 88
py36 = true
exclude = 'utils/scipy/'
exclude = '''
utils/scipy/ |
/(\.eggs|\.git|\.hg|\.mypy_cache|\.nox|\.tox|\.venv|\.svn|_build|buck-out|build|dist)/'''

1031
uv.lock 100644

Plik diff jest za duży Load Diff