Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
!README.md
!LICENSE
!pyproject.toml
!poetry.lock
!uv.lock
!zitadel_client/
!zitadel_client/**/*

Expand Down
17 changes: 7 additions & 10 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,16 @@ jobs:
ref: ${{ inputs.sanity_ref }}
path: project/sanity

- name: Install poetry
run: |
echo "Installing latest Poetry for Python ${{ matrix.python-version }}"
pipx install poetry

- name: Setup Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
- name: Setup uv
uses: astral-sh/setup-uv@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'

- name: Check Installability
working-directory: project/sanity
run: |
poetry add zitadel-client@../library
poetry run python main.py
uv venv --python ${{ matrix.python-version }}
source .venv/bin/activate
if [ -f requirements.txt ]; then uv pip install -r requirements.txt; fi
uv pip install ../library
python main.py
17 changes: 6 additions & 11 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,16 @@ jobs:
with:
ref: ${{ inputs.ref }}

- name: Install poetry
run: |
pipx install poetry

- name: Setup Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
- name: Setup uv
uses: astral-sh/setup-uv@v4
with:
python-version-file: 'pyproject.toml'
cache: 'poetry'
python-version: "3.10"

- name: Install Dependencies
run: poetry install --no-interaction --sync --with dev --all-extras
- name: Install dependencies
run: uv sync --group dev --frozen

- name: Run Formatter
run: poetry run ruff format .
run: uv run ruff format .

- name: Commit Changes
if: ${{ inputs.commit_changes == true }}
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,13 @@ jobs:
with:
fetch-depth: 0

- name: Install poetry
run: |
pipx install poetry

- name: Setup Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
- name: Setup uv
uses: astral-sh/setup-uv@v4
with:
python-version-file: 'pyproject.toml'
cache: 'poetry'
python-version: "3.10"

- name: Install dependencies
run: uv sync --group dev --frozen

- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
Expand Down
17 changes: 6 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,16 @@ jobs:
with:
ref: ${{ inputs.ref }}

- name: Install poetry
run: |
pipx install poetry

- name: Setup Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
- name: Setup uv
uses: astral-sh/setup-uv@v4
with:
python-version-file: 'pyproject.toml'
cache: 'poetry'
python-version: "3.10"

- name: Install Dependencies
run: poetry install --no-interaction --sync --with dev --all-extras
- name: Install dependencies
run: uv sync --group dev --frozen

- name: Run Tests
run: poetry run pytest --junitxml=build/reports/junit.xml
run: uv run pytest --junitxml=build/reports/junit.xml

- name: Generate coverage report
uses: mridang/action-test-reporter@v1
Expand Down
21 changes: 8 additions & 13 deletions .github/workflows/typecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ permissions:
contents: read

jobs:
mypy-check:
ty-check:
runs-on: ubuntu-latest
name: Inspect Code

Expand All @@ -30,18 +30,13 @@ jobs:
with:
ref: ${{ inputs.ref }}

- name: Install poetry
run: |
pipx install poetry

- name: Setup Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
- name: Setup uv
uses: astral-sh/setup-uv@v4
with:
python-version-file: 'pyproject.toml'
cache: 'poetry'
python-version: "3.10"

- name: Install Dependencies
run: poetry install --no-interaction --sync --with dev --all-extras
- name: Install dependencies
run: uv sync --group dev --frozen

- name: Run MyPy
run: poetry run mypy
- name: Run Ty
run: uv run ty check
15 changes: 5 additions & 10 deletions .github/workflows/unused.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,13 @@ jobs:
with:
ref: ${{ inputs.ref }}

- name: Install poetry
run: |
pipx install poetry

- name: Setup Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
- name: Setup uv
uses: astral-sh/setup-uv@v4
with:
python-version-file: 'pyproject.toml'
cache: 'poetry'
python-version: "3.10"

- name: Install Dependencies
run: poetry install --no-interaction --sync --with dev --all-extras
- name: Install dependencies
run: uv sync --group dev --frozen

- name: Inspect Dependencies
uses: mridang/action-dependency-insight@v1
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ htmlcov/
.coverage
.coverage.*
.cache
.uv-cache/
nosetests.xml
coverage.xml
*,cover
Expand Down Expand Up @@ -71,4 +72,4 @@ devbox.json
devbox.lock
.devbox

.poetry
.uv-cache
2 changes: 1 addition & 1 deletion .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
[
"@semantic-release/exec",
{
"prepareCmd": "poetry install --no-interaction --sync --all-extras"
"prepareCmd": "uv sync --group dev --frozen"
}
],
[
Expand Down
21 changes: 15 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
FROM python:3.13-slim@sha256:5f55cdf0c5d9dc1a415637a5ccc4a9e18663ad203673173b8cda8f8dcacef689

ENV UV_COMPILE_BYTECODE=1
ENV UV_LINK_MODE=copy

WORKDIR /app

RUN pip install --no-cache-dir poetry
RUN apt-get update \
&& apt-get install --yes --no-install-recommends curl ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
&& curl -LsSf https://astral.sh/uv/install.sh | sh \
&& mv /root/.local/bin/uv /usr/local/bin/uv \
&& rm -rf /root/.local

COPY pyproject.toml poetry.lock* ./
ENV UV_PROJECT_ENVIRONMENT=/app/.venv
ENV PATH="/app/.venv/bin:/usr/local/bin:${PATH}"

RUN poetry install --no-root
COPY pyproject.toml uv.lock ./
RUN uv sync --frozen --no-dev --all-extras

COPY . .
RUN uv sync --frozen --no-dev --all-extras

RUN poetry install

CMD ["poetry", "run", "python"]
CMD ["uv", "run", "python"]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ Zitadel website and obtain the necessary credentials to access the API.

### Minimum Requirements

Ensure you have Python 3 or higher installed. You also need Poetry to
install dependencies.
Ensure you have Python 3 or higher installed. You also need
[uv](https://docs.astral.sh/uv/) to install dependencies (`uv sync --group dev`).

## Using the SDK

Expand Down
16 changes: 8 additions & 8 deletions devbox.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
{
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.10.7/.schema/devbox.schema.json",
"packages": [
"poetry@latest",
"uv@latest",
"lefthook@latest",
"python310@latest"
],
"env": {
"POETRY_CACHE_DIR": "$PWD/.poetry"
"UV_CACHE_DIR": "$PWD/.uv-cache"
},
"shell": {
"init_hook": [
"lefthook install",
"poetry install"
"uv sync --all-extras --group dev"
],
"scripts": {
"format": [
"poetry run ruff format ."
"uv run ruff format ."
],
"test": [
"poetry run pytest"
"uv run pytest"
],
"check": [
"poetry run ruff check .",
"poetry run mypy"
"uv run ruff check .",
"uv run ty check"
],
"replit": [
"docker build --tag python-repl --file Dockerfile .",
Expand All @@ -32,7 +32,7 @@
"composer docgen"
],
"depcheck": [
"poetry run fawltydeps"
"uv run fawltydeps"
]
}
}
Expand Down
Loading
Loading