Skip to content

Commit f4b9dca

Browse files
authored
Merge branch 'main' into copy_file_tests
2 parents 847c42e + 44dd40b commit f4b9dca

File tree

53 files changed

+6816
-8816
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+6816
-8816
lines changed

.devcontainer/Dockerfile

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,13 @@
1-
FROM mcr.microsoft.com/devcontainers/python:1-3.11-bookworm
1+
ARG UV_VERSION=latest
22

33

4-
RUN \
5-
apt update && apt install bash-completion -y && \
6-
pip install pre-commit && \
7-
curl -sSL https://install.python-poetry.org | POETRY_HOME=/home/vscode/.local python3 -
4+
FROM ghcr.io/astral-sh/uv:$UV_VERSION AS uv
85

96

10-
RUN \
11-
echo >> /home/vscode/.bashrc && \
12-
# add completions to bashrc
13-
# see how ubuntu does it for reference:
14-
# https://git.launchpad.net/ubuntu/+source/base-files/tree/share/dot.bashrc
15-
# https://stackoverflow.com/a/68566555
16-
echo 'if [ -f /etc/bash_completion ] && ! shopt -oq posix; then' >> /home/vscode/.bashrc && \
17-
echo ' . /etc/bash_completion' >> /home/vscode/.bashrc && \
18-
echo 'fi' >> /home/vscode/.bashrc && \
19-
echo >> /home/vscode/.bashrc && \
20-
echo '. <(poetry completions)' >> /home/vscode/.bashrc
7+
FROM mcr.microsoft.com/vscode/devcontainers/base:debian
8+
9+
ENV PYTHONDONTWRITEBYTECODE=True \
10+
PYTHONUNBUFFERED=True \
11+
UV_LINK_MODE=copy
12+
13+
COPY --from=uv --chown=vscode: /uv /uvx /bin/
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
echo "Running post-create-command.sh"
22

33
pre-commit install
4-
poetry install --all-extras
4+
uv sync --all-extras

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
66
"build": {
77
// Path is relative to the devcontainer.json file.
8-
// We prebuild the image to get poetry into the image
8+
// We prebuild the image to get uv into the image
99
// This saves the user a bit of time, when re-opening containers
1010
"dockerfile": "Dockerfile"
1111
},
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "4.13.2"
2+
".": "4.14.1"
33
}

.github/CONTRIBUTING.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,12 @@ We recommend following these steps:
2323

2424
You need to have the following tools available to you:
2525
- `make` - You'll need a GNU Make for common developer activities
26-
- `poetry` - This is the primary package manager for the project
27-
- `pyenv` **Recommended**: For installing python versions for your system.
28-
Poetry infers the current latest version from what it can find on the `PATH` so you are still fine if you don't use `pyenv`.
26+
- `uv` - This is the primary package manager for the project
2927

3028
### Build and test
3129

3230

33-
- Run `make install` to get `poetry` to install all dependencies and set up `pre-commit`
31+
- Run `make install` to get `uv` to install all dependencies and set up `pre-commit`
3432
- **Recommended**: Run `make` or `make help` to see other commands available to you.
3533
- After this, you should have a working virtual environment and proceed with writing code with your favourite IDE
3634
- **TIP**: You can run `make core/tests` or `make modules/<my-module>/tests` to run the tests specifically for that to speed up feedback cycles

.github/ISSUE_TEMPLATE/question.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ uname -a
3131
echo "------"
3232
docker info
3333
echo "------"
34-
poetry run python --version
34+
uv run python --version
3535
echo "------"
36-
poetry show --tree
36+
uv tree
3737
```
3838

3939
```bash

.github/PULL_REQUEST_TEMPLATE/new_container.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ It helps reduce unnecessary work for you and the maintainers!
2929
- Your module has a `README.rst` and hooks in the `.. auto-class` and `.. title` of your container
3030
- Implement the new feature (typically in `__init__.py`) and corresponding tests.
3131
- [ ] Your module is added in `pyproject.toml`
32-
- it is declared under `tool.poetry.packages` - see other community modules
33-
- it is declared under `tool.poetry.extras` with the same name as your module name,
32+
- it is declared under `tool.hatch.build.targets.wheel` - see other community modules
33+
- it is declared under `project.optional-dependencies` with the same name as your module name,
3434
we still prefer adding _NO EXTRA DEPENDENCIES_, meaning `mymodule = []` is the preferred addition
3535
(see the notes at the bottom)
3636
- [ ] Your branch is up-to-date (or your branch will be rebased with `git rebase`)

.github/actions/setup-env/action.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,13 @@ description: set up the python environment
44
inputs:
55
python-version:
66
description: "The python version to install and use"
7-
default: "3.12" # we default to latest supported
7+
default: "3.14" # we default to latest supported
88
required: false
99

1010
runs:
1111
using: composite
1212
steps:
13-
- name: Setup Poetry
14-
run: pipx install poetry
15-
shell: bash
16-
- name: Setup python ${{ inputs.python-version }}
17-
uses: actions/setup-python@v5
13+
- name: Install uv
14+
uses: astral-sh/setup-uv@v7
1815
with:
1916
python-version: ${{ inputs.python-version }}
20-
cache: poetry

.github/workflows/ci-community.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
# Contrinuous Integration for community modules
1+
# Continuous Integration for community modules
22

33
name: modules
44

5+
env:
6+
UV_FROZEN: "1" # use lock file as is
7+
UV_NO_EDITABLE: "1" # test the build package, not the dev installation
8+
59
on:
610
push:
711
branches: [ main ]
@@ -44,7 +48,7 @@ jobs:
4448
strategy:
4549
fail-fast: false
4650
matrix:
47-
python-version: ["3.9", "3.10", "3.11", "3.12"]
51+
python-version: ["3.10", "3.13", "3.14"]
4852
module: ${{ fromJSON(needs.track-modules.outputs.changed_modules) }}
4953
steps:
5054
- name: Checkout contents
@@ -54,7 +58,7 @@ jobs:
5458
with:
5559
python-version: ${{ matrix.python-version }}
5660
- name: Install Python dependencies
57-
run: poetry install -E ${{ matrix.module }}
61+
run: uv sync --extra ${{ matrix.module }}
5862
- name: Run tests
5963
run: make modules/${{ matrix.module }}/tests
6064
- name: Run doctests

.github/workflows/ci-core.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
name: core
44

5+
env:
6+
UV_FROZEN: "1" # use lock file as is
7+
UV_NO_EDITABLE: "1" # test the build package, not the dev installation
8+
59
on:
610
push:
711
branches: [main]
@@ -14,23 +18,19 @@ jobs:
1418
strategy:
1519
fail-fast: false
1620
matrix:
17-
python-version: ["3.9", "3.11", "3.12", "3.13"]
21+
python-version: ["3.10", "3.13", "3.14"]
1822
steps:
1923
- uses: actions/checkout@v4
2024
- name: Set up Python
2125
uses: ./.github/actions/setup-env
2226
with:
2327
python-version: ${{ matrix.python-version }}
2428
- name: Install Python dependencies
25-
run: poetry install --all-extras
29+
run: uv sync --all-extras
2630
- name: Run twine check
27-
run: rm -f LICENSE.txt && poetry build && poetry run twine check dist/*.tar.gz
28-
- name: Set up Docker
29-
uses: docker/setup-docker-action@v4
31+
run: uv build && uv run twine check dist/*
3032
- name: Run tests
3133
run: make core/tests
32-
- name: Rename coverage file
33-
run: mv .coverage .coverage.${{ matrix.python-version}}
3434
- name: "Save coverage artifact"
3535
uses: actions/upload-artifact@v4
3636
with:
@@ -49,7 +49,7 @@ jobs:
4949
- name: Set up Python
5050
uses: ./.github/actions/setup-env
5151
- name: Install Python dependencies
52-
run: poetry install --all-extras
52+
run: uv sync --all-extras
5353
- name: "Download coverage artifacts"
5454
uses: actions/download-artifact@v4
5555
with:

0 commit comments

Comments
 (0)