Skip to content

Commit

Permalink
Switch poetry to uv
Browse files Browse the repository at this point in the history
  • Loading branch information
kylebarron committed Oct 10, 2024
1 parent 755f893 commit 43e1080
Show file tree
Hide file tree
Showing 11 changed files with 1,493 additions and 4,803 deletions.
23 changes: 9 additions & 14 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,21 @@ jobs:
with:
python-version: "3.11"

- name: Install and configure Poetry
uses: snok/install-poetry@v1
- name: Install a specific version of uv
uses: astral-sh/setup-uv@v3
with:
version: 1.8.2
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
enable-cache: true
version: "0.4.x"

- name: Install dependencies
run: poetry install --no-interaction --no-root
run: uv sync

- name: Build python packages
run: |
# arro3-core needs to be first
poetry run maturin develop -m arro3-core/Cargo.toml
poetry run maturin develop -m arro3-compute/Cargo.toml
poetry run maturin develop -m arro3-io/Cargo.toml
- name: Install root project
run: poetry install --no-interaction
uv run maturin develop -m arro3-core/Cargo.toml
uv run maturin develop -m arro3-compute/Cargo.toml
uv run maturin develop -m arro3-io/Cargo.toml
- name: Deploy docs
env:
Expand All @@ -70,5 +65,5 @@ jobs:
# Only push docs if no letters in git tag after the first character
# (usually the git tag will have v as the first character)
if echo $VERSION | cut -c 1- | grep -q "[A-Za-z]"; then
poetry run mike deploy $VERSION latest --update-aliases --push
uv run mike deploy $VERSION latest --update-aliases --push
fi
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.11
12 changes: 6 additions & 6 deletions DEVELOP.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

```bash
rm -rf .venv
poetry install
uv sync
# Note: need to install core first because others depend on core
poetry run maturin develop -m arro3-core/Cargo.toml
poetry run maturin develop -m arro3-compute/Cargo.toml
poetry run maturin develop -m arro3-io/Cargo.toml
poetry run mkdocs serve
uv run maturin develop -m arro3-core/Cargo.toml
uv run maturin develop -m arro3-compute/Cargo.toml
uv run maturin develop -m arro3-io/Cargo.toml
uv run mkdocs serve
```

### Adding a new module
Expand All @@ -24,7 +24,7 @@ rustup toolchain install nightly
rustup target add --toolchain nightly wasm32-unknown-emscripten
```

Install maturin and pyodide-build
Install maturin and pyodide-build (choose a specific version of pyodide-build if desired)

```bash
pip install -U maturin
Expand Down
8 changes: 0 additions & 8 deletions arro3-compute/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,3 @@ features = ["pyo3/extension-module"]
module-name = "arro3.compute._compute"
python-source = "python"
strip = true

[tool.poetry]
name = "arro3-compute"
# Overwritten by version in Cargo.toml
version = "0.0.0"
description = ""
authors = []
packages = [{ include = "python/arro3/compute" }]
Loading

0 comments on commit 43e1080

Please sign in to comment.