Skip to content

switch from pixi to uv #75

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

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
47 changes: 18 additions & 29 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.8.1
- uses: astral-sh/setup-uv@v3
with:
pixi-version: v0.27.1
frozen: true
cache: true
environments: dev
activate-environment: dev
- run: ruff check
enable-cache: true
cache-dependency-glob: "uv.lock"
- run: uv sync
- run: uv run ruff check
if: success() || failure()
- run: ruff format --check
- run: uv run ruff format --check
if: success() || failure()

##
Expand All @@ -31,14 +29,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.8.1
- uses: astral-sh/setup-uv@v3
with:
pixi-version: v0.27.1
frozen: true
cache: true
environments: extra
activate-environment: extra
- run: pyright
enable-cache: true
cache-dependency-glob: "uv.lock"
- run: uv sync
- run: uv run pyright
if: success() || failure()

##
Expand Down Expand Up @@ -72,18 +68,11 @@ jobs:

steps:
- uses: actions/checkout@v4

- name: Inject (python / pytorch) test deps into pixi.toml / pyproject.toml
run: |
sed -i 's/python = "3.9"/python = "${{ matrix.python }}.*"/' pixi.toml
sed -i 's/torch>=2.0.0/torch~=${{ matrix.pytorch }}/' pyproject.toml

- uses: prefix-dev/setup-pixi@v0.8.1
- name: Override pytorch version
run: sed -i 's/constraint-dependencies = \["torch>=2.1.1"\]/constraint-dependencies = \["torch==${{ matrix.pytorch }}"\]/' pyproject.toml
- uses: astral-sh/setup-uv@v3
with:
pixi-version: v0.27.1
locked: false
frozen: false
cache: false
environments: default
activate-environment: default
- run: pytest tests/test_ci.py
enable-cache: true
cache-dependency-glob: "uv.lock"
- run: uv sync --python ${{ matrix.python }}
- run: uv run pytest tests/test_ci.py
17 changes: 6 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.8.1
- uses: astral-sh/setup-uv@v3
with:
pixi-version: v0.27.1
frozen: true
cache: true
environments: dev
activate-environment: dev
- run: python -m build
- run: twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
enable-cache: true
cache-dependency-glob: "uv.lock"
- run: uv sync
- run: uv build
- run: uv publish
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.9.20
2,351 changes: 0 additions & 2,351 deletions pixi.lock

This file was deleted.

28 changes: 0 additions & 28 deletions pixi.toml

This file was deleted.

17 changes: 12 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,25 @@ classifiers = [
]
requires-python = ">=3.9"
dependencies = [
"cloudpickle>=3.0.0",
"fabric>=3.0.0",
"torch>=2.0.0",
"cloudpickle>=3.0",
"fabric>=3.2",
"torch>=2.0,<2.5",
# torch.distributed depends on numpy
"numpy<2", # numpy>=2 requires torch>=2.3
"numpy>=1.26.0; python_version == '3.12'",
"numpy>=1.20", # numpy>=2 requires torch>=2.3
]

[project.urls]
Repository = "https://github.com/apoorvkh/torchrunx.git"
Documentation = "https://torchrunx.readthedocs.io"

[tool.uv]
constraint-dependencies = ["torch>=2.1.1"] # https://github.com/pytorch/pytorch/issues/100974
dev-dependencies = ["ruff==0.7.0", "pyright==1.1.385", "pytest==8.3.3"]
environments = ["sys_platform == 'linux'"]
managed = true
python-preference = "only-managed"
resolution = "lowest-direct"

## Development tools

[tool.ruff]
Expand Down
Loading
Loading