Skip to content

Commit 615c176

Browse files
committed
poetry -> uv
1 parent af62fc2 commit 615c176

File tree

3 files changed

+125
-151
lines changed

3 files changed

+125
-151
lines changed

.github/workflows/main.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,29 +38,26 @@ jobs:
3838
if: matrix.os == 'macos-latest'
3939
run: sh install/install_openadapt.sh
4040

41-
- name: Install poetry
42-
uses: snok/install-poetry@v1
43-
with:
44-
version: 1.5.1
45-
virtualenvs-create: true
46-
virtualenvs-in-project: true
41+
- name: Install uv
42+
run: pip install uv
4743

4844
- name: Cache deps
4945
id: cache-deps
5046
uses: actions/cache@v2
5147
with:
52-
path: .venv
53-
key: pydeps-${{ hashFiles('**/poetry.lock') }}
48+
path: .uv
49+
key: pydeps-${{ hashFiles('**/pyproject.toml') }}
5450

55-
- run: poetry install --no-interaction --no-root
51+
- name: Install dependencies
5652
if: steps.cache-deps.outputs.cache-hit != 'true'
53+
run: uv install
5754

5855
- name: Activate virtualenv
5956
run: source .venv/bin/activate
6057
if: steps.cache-deps.outputs.cache-hit == 'true'
6158

6259
- name: Check formatting with Black
63-
run: poetry run black --preview --check . --exclude '/(alembic|\.cache|\.venv|venv|contrib|__pycache__)/'
60+
run: uv run black --preview --check . --exclude '/(alembic|\.cache|\.uv|venv|contrib|__pycache__)/'
6461

6562
- name: Run Flake8
66-
run: poetry run flake8 --exclude=alembic,.venv,venv,contrib,.cache,.git
63+
run: uv run flake8 --exclude=alembic,.venv,venv,contrib,.cache,.git

.github/workflows/release-and-publish.yml

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ jobs:
3939
python-version: '3.10'
4040
- name: Install dependencies
4141
run: |
42-
pip install poetry
43-
poetry install
42+
pip install uv
43+
uv install
4444
brew install nvm
45-
poetry run postinstall
45+
uv run python scripts/postinstall
4646
brew install [email protected]
4747
- name: Build MacOS executable
4848
run: |
49-
poetry run python -m openadapt.build
49+
uv run python -m openadapt.build
5050
cd dist
5151
zip -r ../OpenAdapt.app.zip OpenAdapt.app
5252
mv OpenAdapt.dmg ..
@@ -82,16 +82,16 @@ jobs:
8282
node-version: 21
8383
- name: Install dependencies
8484
run: |
85-
pip install poetry
86-
poetry install
85+
pip install uv
86+
uv install
8787
cd openadapt/app/dashboard
8888
npm install
8989
cd ../../../
9090
pip install wheel
91-
poetry run postinstall
91+
uv run python scripts/postinstall.py
9292
- name: Build Windows executable
9393
run: |
94-
poetry run python -m openadapt.build
94+
uv run python -m openadapt.build
9595
cd dist
9696
7z a -tzip ../OpenAdapt.zip OpenAdapt
9797
move OpenAdapt_Installer.exe ..
@@ -190,8 +190,8 @@ jobs:
190190
- name: Install the latest version of the project
191191
run: |
192192
git pull
193-
pip install poetry
194-
poetry install
193+
pip install uv
194+
uv install
195195
- name: Download macOS executable
196196
uses: actions/download-artifact@v4
197197
with:
@@ -238,12 +238,9 @@ jobs:
238238
uses: actions/setup-python@v5
239239
with:
240240
python-version: '3.10'
241+
- name: Install uv
242+
run: pip install uv
241243
- name: Publish to PyPI
242244
env:
243-
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
244-
run: |
245-
pip install poetry
246-
poetry install
247-
poetry config pypi-token.pypi $PYPI_TOKEN
248-
poetry build
249-
poetry publish --no-interaction --skip-existing
245+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
246+
run: uv publish

pyproject.toml

Lines changed: 103 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -1,141 +1,122 @@
1-
[tool.poetry]
1+
[project]
2+
authors = [
3+
{name = "Richard Abrich", email = "[email protected]"},
4+
]
5+
requires-python = "<3.14,>=3.10"
6+
dependencies = [
7+
"alembic==1.8.1",
8+
"black<25.0.0,>=24.8.0",
9+
"pygetwindow<0.0.5; sys_platform == \"win32\"",
10+
"pywin32==306; sys_platform == \"win32\"",
11+
"xcffib==1.5.0; sys_platform == \"linux\"",
12+
"ascii-magic==2.3.0",
13+
"bokeh==2.4.3",
14+
"clipboard==0.0.4",
15+
"deepdiff[optimize]<7.0.0,>=6.3.0",
16+
"ascii-magic==2.3.0",
17+
"dictalchemy3==1.0.0",
18+
"fire==0.4.0",
19+
"ipdb==0.13.11",
20+
"loguru==0.6.0",
21+
"matplotlib==3.6.2",
22+
"mss==6.1.0",
23+
"openai<2.0.0,>=1.51.0",
24+
"pandas==2.0.0",
25+
"presidio-analyzer==2.2.32",
26+
"presidio-anonymizer==2.2.32",
27+
"pytesseract==0.3.7",
28+
"pytest==7.1.3",
29+
"rapidocr-onnxruntime==1.2.3",
30+
"scikit-learn==1.2.2",
31+
"scipy<2.0.0,>=1.11.0",
32+
"torch<3.0.0,>=2.0.0",
33+
"tqdm==4.64.0",
34+
"transformers==4.29.2",
35+
"python-dotenv==1.0.0",
36+
"pyinstaller==6.11.0",
37+
"setuptools-lint<1.0.0,>=0.6.0",
38+
"sphinx==7.0.1",
39+
"spacy<4.0.0,>=3.5.3",
40+
"fuzzywuzzy==0.18.0",
41+
"segment-anything<2.0,>=1.0",
42+
"torchvision<1.0.0,>=0.15.2",
43+
"sumy==0.11.0",
44+
"nltk==3.8.1",
45+
"pillow<11.0.0,>=10.4.0",
46+
"pywinauto<1.0.0,>=0.6.8; sys_platform == \"win32\"",
47+
"flake8<7.0.0,>=6.0.0",
48+
"flake8-docstrings<2.0.0,>=1.7.0",
49+
"moviepy==1.0.3",
50+
"python-levenshtein<1.0.0,>=0.21.1",
51+
"magic-wormhole==0.12.0",
52+
"pyside6<7.0.0.0,>=6.5.1.1",
53+
"flake8-annotations<4.0.0,>=3.0.1",
54+
"pre-commit<4.0.0,>=3.3.3",
55+
"pympler<2.0.0,>=1.0.1",
56+
"psutil<6.0.0,>=5.9.5",
57+
"sentry-sdk<2.0.0,>=1.28.1",
58+
"gitpython<4.0.0,>=3.1.32",
59+
"pyobjc-framework-avfoundation<10.0,>=9.2; sys_platform == \"darwin\"",
60+
"fastapi<1.0.0,>=0.111.1",
61+
"screen-recorder-sdk<2.0.0,>=1.3.0; sys_platform == \"win32\"",
62+
"pyaudio<1.0.0,>=0.2.13; sys_platform == \"win32\"",
63+
"oa-atomacos==3.2.0; sys_platform == \"darwin\"",
64+
"presidio-image-redactor<1.0.0,>=0.0.48",
65+
"pywebview<5.0.0,>=4.2.2",
66+
"click<9.0.0,>=8.1.6",
67+
"spacy-transformers<2.0.0,>=1.2.5",
68+
"boto3<2.0.0,>=1.28.30",
69+
"botocore<2.0.0,>=1.31.30",
70+
"easyocr<2.0.0,>=1.7.0",
71+
"spacy-curated-transformers<1.0.0,>=0.2.0",
72+
"anthropic<1.0.0,>=0.34.2",
73+
"orjson<4.0.0,>=3.9.15",
74+
"replicate<1.0.0,>=0.25.0",
75+
"gradio-client==0.15.0",
76+
"google-generativeai<1.0.0,>=0.5.0",
77+
"uvicorn[standard]<1.0.0,>=0.30.0",
78+
"ultralytics<9.0.0,>=8.1.47",
79+
"imagehash<5.0.0,>=4.3.1",
80+
"pydantic-settings<3.0.0,>=2.2.1",
81+
"pyqt-toast-notification<2.0.0,>=1.1.0",
82+
"pudb<2025.0,>=2024.1",
83+
"sounddevice<1.0.0,>=0.4.6",
84+
"soundfile<1.0.0,>=0.12.1",
85+
"posthog<4.0.0,>=3.5.0",
86+
"wheel<1.0.0,>=0.43.0",
87+
"cython<4.0.0,>=3.0.10",
88+
"av<13.0.0,>=12.3.0",
89+
"beautifulsoup4<5.0.0,>=4.12.3",
90+
"dtaidistance<3.0.0,>=2.3.12",
91+
"tokencost<1.0.0,>=0.1.12",
92+
"numba<1.0.0,>=0.60.0",
93+
"llvmlite<1.0.0,>=0.43.0",
94+
"ell-ai<1.0.0,>=0.0.14",
95+
"pynput<2.0.0,>=1.7.7",
96+
"multiprocessing-utils<1.0,>=0.4",
97+
]
298
name = "openadapt"
399
version = "0.43.1"
4100
description = "GUI Process Automation with Transformers"
5-
authors = [
6-
'OpenAdapt.AI Team <[email protected]>',
7-
]
8101
classifiers = [
9102
"Programming Language :: Python :: 3",
10103
"Operating System :: OS Independent",
11104
]
12-
13105
readme = "README.md"
14106

15-
repository = "https://github.com/mldsai/openadapt"
107+
[project.urls]
108+
"Bug Tracker" = "https://github.com/OpenAdaptAI/OpenAdapt/issues"
16109
homepage = "https://openadapt.ai/"
110+
repository = "https://github.com/OpenAdaptAI/OpenAdapt"
17111

18-
[tool.poetry.urls]
19-
"Bug Tracker" = "https://github.com/MLDSAI/OpenAdapt/issues"
20-
21-
[tool.poetry.dependencies]
22-
python = ">=3.10,<3.14"
23-
alembic = "1.8.1"
24-
black = "^24.8.0"
25-
pygetwindow = { version = "<0.0.5", markers = "sys_platform == 'win32'" }
26-
pywin32 = { version = "306", markers = "sys_platform == 'win32'" }
27-
xcffib = { version = "1.5.0", markers = "sys_platform == 'linux'" }
28-
ascii-magic = "2.3.0"
29-
bokeh = "2.4.3"
30-
clipboard = "0.0.4"
31-
deepdiff = { extras = ["optimize"], version = "^6.3.0" }
32-
ascii_magic = "2.3.0"
33-
dictalchemy3 = "1.0.0"
34-
fire = "0.4.0"
35-
ipdb = "0.13.11"
36-
loguru = "0.6.0"
37-
matplotlib = "3.6.2"
38-
mss = "6.1.0"
39-
openai = "^1.51.0"
40-
pandas = "2.0.0"
41-
presidio_analyzer = "2.2.32"
42-
presidio_anonymizer = "2.2.32"
43-
pytesseract = "0.3.7"
44-
pytest = "7.1.3"
45-
rapidocr-onnxruntime = "1.2.3"
46-
scikit-learn = "1.2.2"
47-
scipy = "^1.11.0"
48-
torch = "^2.0.0"
49-
tqdm = "4.64.0"
50-
transformers = "4.29.2"
51-
python-dotenv = "1.0.0"
52-
pyinstaller = "6.11.0"
53-
setuptools-lint = "^0.6.0"
54-
sphinx = "7.0.1"
55-
spacy = "^3.5.3"
56-
fuzzywuzzy = "0.18.0"
57-
segment-anything = "^1.0"
58-
torchvision = "^0.15.2"
59-
sumy = "0.11.0"
60-
nltk = "3.8.1"
61-
pillow = "^10.4.0"
62-
pywinauto = { version = "^0.6.8", markers = "sys_platform == 'win32'" }
63-
flake8 = "^6.0.0"
64-
flake8-docstrings = "^1.7.0"
65-
moviepy = "1.0.3"
66-
python-levenshtein = "^0.21.1"
67-
magic-wormhole = "0.12.0"
68-
pyside6 = "^6.5.1.1"
69-
flake8-annotations = "^3.0.1"
70-
pre-commit = "^3.3.3"
71-
pympler = "^1.0.1"
72-
psutil = "^5.9.5"
73-
sentry-sdk = "^1.28.1"
74-
gitpython = "^3.1.32"
75-
pyobjc-framework-avfoundation = { version = "^9.2", markers = "sys_platform == 'darwin'" }
76-
fastapi = "^0.111.1"
77-
screen-recorder-sdk = { version = "^1.3.0", markers = "sys_platform == 'win32'" }
78-
pyaudio = { version = "^0.2.13", markers = "sys_platform == 'win32'" }
79-
oa-atomacos = { version = "3.2.0", markers = "sys_platform == 'darwin'" }
80-
presidio-image-redactor = "^0.0.48"
81-
pywebview = "^4.2.2"
82-
click = "^8.1.6"
83-
spacy-transformers = "^1.2.5"
84-
boto3 = "^1.28.30"
85-
botocore = "^1.31.30"
86-
easyocr = "^1.7.0"
87-
spacy-curated-transformers = "^0.2.0"
88-
anthropic = "^0.34.2"
89-
orjson = "^3.9.15"
90-
replicate = "^0.25.0"
91-
gradio-client = "0.15.0"
92-
google-generativeai = "^0.5.0"
93-
uvicorn = {version = "^0.30.0", extras = ["standard"]}
94-
ultralytics = "^8.1.47"
95-
imagehash = "^4.3.1"
96-
pydantic-settings = "^2.2.1"
97-
pyqt-toast-notification = "^1.1.0"
98-
pudb = "^2024.1"
99-
sounddevice = "^0.4.6"
100-
soundfile = "^0.12.1"
101-
posthog = "^3.5.0"
102-
103-
wheel = "^0.43.0"
104-
cython = "^3.0.10"
105-
av = "^12.3.0"
106-
beautifulsoup4 = "^4.12.3"
107-
dtaidistance = "^2.3.12"
108-
tokencost = "^0.1.12"
109-
numba = "^0.60.0"
110-
llvmlite = "^0.43.0"
111-
ell-ai = "^0.0.14"
112-
pynput = "^1.7.7"
113-
multiprocessing-utils = "^0.4"
114-
[tool.pytest.ini_options]
115-
filterwarnings = [
116-
# suppress warnings starting from "setuptools>=67.3"
117-
"ignore:Deprecated call to `pkg_resources\\.declare_namespace\\('.*'\\):DeprecationWarning",
118-
"ignore:pkg_resources is deprecated as an API",
119-
]
120-
121-
[build-system]
122-
requires = ["poetry-core"]
123-
build-backend = "poetry.core.masonry.api"
124-
125-
[tool.isort]
126-
profile = "black"
127-
group_by_package = true
128-
from_first = true
129-
130-
[tool.poetry.scripts]
112+
[project.scripts]
131113
visualize = "openadapt.visualize:main"
132114
record = "openadapt.record:start"
133115
replay = "openadapt.replay:start"
134116
app = "openadapt.app.tray:_run"
135117
reset = "openadapt.scripts.reset_db:reset_db"
136118
capture = "openadapt.capture:test"
137119
postinstall = "scripts.postinstall:main"
138-
139120
[tool.black]
140121
line-length = 88
141122
extend-exclude = '''
@@ -151,13 +132,12 @@ extend-exclude = '''
151132

152133
[tool.semantic_release]
153134
version_variable = ["openadapt/__init__.py:__version__"]
154-
version_toml = ["pyproject.toml:tool.poetry.version"]
155135
major_on_zero = false
156136
branch = "main"
157137
commit_subject = "chore(release): v{version}"
158138
commit_version_number = true
159-
upload_to_PyPI = false
139+
upload_to_PyPI = true
160140
upload_to_release = true
161141
upload_to_repository = false
162142
repository_url = "https://upload.pypi.org/legacy/"
163-
build_command = "pip install poetry && poetry env use python3.10 && poetry build"
143+
build_command = "uv publish"

0 commit comments

Comments
 (0)