Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace poetry with uv #931

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update install scripts to use uv
  • Loading branch information
abrichr committed Dec 31, 2024
commit f400be3614a661c5373d3e990532aabf6f63cac6
1 change: 0 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:
env:
REPO: ${{ github.event.pull_request.head.repo.full_name }}
BRANCH: ${{ github.event.pull_request.head.ref }}
SKIP_POETRY_SHELL: 1

steps:
- name: Checkout code
Expand Down
12 changes: 6 additions & 6 deletions install/install_openadapt.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -358,14 +358,14 @@ Install-VCRedist
# OpenAdapt Setup
RunAndCheck "git clone -q https://github.com/MLDSAI/OpenAdapt.git" "clone git repo"
Set-Location .\OpenAdapt
RunAndCheck "pip install poetry" "Run ``pip install poetry``"
RunAndCheck "poetry install" "Run ``poetry install``"
RunAndCheck "poetry run postinstall" "Install other dependencies" -SkipCleanup:$true
RunAndCheck "pip install uv" "Run ``pip install uv``"
RunAndCheck "uv install" "Run ``uv install``"
RunAndCheck "uv run python scripts/postinstall.py" "Install other dependencies" -SkipCleanup:$true
RunAndCheck "cd openadapt"
RunAndCheck "poetry run alembic upgrade head" "Run ``alembic upgrade head``" -SkipCleanup:$true
RunAndCheck "uv run alembic upgrade head" "Run ``alembic upgrade head``" -SkipCleanup:$true
RunAndCheck "cd .."
RunAndCheck "poetry run pytest" "Run ``Pytest``" -SkipCleanup:$true
RunAndCheck "uv run pytest" "Run ``Pytest``" -SkipCleanup:$true
Write-Host "OpenAdapt installed Successfully!" -ForegroundColor Green
Start-Process powershell -Verb RunAs -ArgumentList "-NoExit", "-Command", "Set-Location -Path '$pwd'; poetry shell"
Start-Process powershell -Verb RunAs -ArgumentList "-NoExit", "-Command", "Set-Location -Path '$pwd';"

################################ SCRIPT ###################################
13 changes: 5 additions & 8 deletions install/install_openadapt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,11 @@ RunAndCheck "git clone $REPO_URL" "Clone git repo"
cd OpenAdapt
RunAndCheck "git checkout $BRANCH" "Checkout branch $BRANCH"

RunAndCheck "pip3.10 install poetry" "Install Poetry"
RunAndCheck "poetry install" "Install Python dependencies"
RunAndCheck "poetry run postinstall" "Install other dependencies"
RunAndCheck "pip3.10 install uv " "Install uv"
RunAndCheck "uv install" "Install Python dependencies"
RunAndCheck "uv run python scripts/postinstall.py" "Install other dependencies"
RunAndCheck "cd openadapt"
RunAndCheck "poetry run alembic upgrade head" "Update database"
RunAndCheck "uv run alembic upgrade head" "Update database"
RunAndCheck "cd .."
RunAndCheck "poetry run pytest" "Run tests"
if [ -z "$SKIP_POETRY_SHELL" ]; then
RunAndCheck "poetry shell" "Activate virtual environment"
fi
RunAndCheck "uv run pytest" "Run tests"
echo OpenAdapt installed successfully!
Loading