Skip to content

Commit ede3792

Browse files
authored
Merge pull request gooddata#1334 from hkad98/jkd/ty
Minor infrastructure changes
2 parents 0868773 + c00ca3b commit ede3792

23 files changed

Lines changed: 565 additions & 781 deletions

File tree

.github/workflows/bump-version.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434

3535
- name: Install dependencies
3636
run: |
37-
uv sync --only-group release
37+
uv sync --only-group release --locked
3838
3939
- name: Bump version
4040
id: bump

.github/workflows/dev-release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
uses: astral-sh/setup-uv@v6
4141
- name: Install dependencies
4242
run: |
43-
uv sync --only-group release
43+
uv sync --only-group release --locked
4444
- name: Bump to dev
4545
run: uv run tbump --only-patch --non-interactive $(./scripts/next_dev.sh)
4646
- name: Build ${{ matrix.component }}

.github/workflows/rw-python-tests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
python-version: 3.14
3838
- name: Install dependencies
3939
run: |
40-
uv sync --only-group lint
40+
uv sync --only-group lint --locked
4141
- name: pep8 and formatting check
4242
run: |
4343
make format
@@ -51,7 +51,7 @@ jobs:
5151
uses: astral-sh/setup-uv@v6
5252
- name: Install dependencies
5353
run: |
54-
uv sync --only-group tox --only-group type
54+
uv sync --group type --locked
5555
- name: type check
5656
run: |
5757
make type-check

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ repos:
1515
args: [ '--maxkb=890' ]
1616
- id: check-case-conflict
1717
- repo: https://github.com/astral-sh/ruff-pre-commit
18-
rev: v0.9.5
18+
rev: v0.15.1
1919
hooks:
2020
# Run the linter.
2121
- id: ruff
@@ -35,6 +35,6 @@ repos:
3535
hooks:
3636
- id: gitlint
3737
- repo: https://github.com/astral-sh/uv-pre-commit
38-
rev: 0.9.5
38+
rev: 0.10.0
3939
hooks:
4040
- id: uv-lock

Dockerfile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
# (C) 2021 GoodData Corporation
22
ARG PY_TAG
3+
FROM ghcr.io/astral-sh/uv:0.10 AS uv
34
FROM python:${PY_TAG}
45

56
ARG PY_TAG
67
ARG ENV_TAG
7-
ARG UV_VERSION=0.9.5
88

99
# tox defines all python targets, makefile recognizes TEST_ENVS and forces
1010
# tox to execute only tests for installed python
1111
ENV TEST_ENVS=${ENV_TAG}
1212

13+
# copy uv binary from official image; version is guarded by required-version in pyproject.toml
14+
COPY --from=uv /uv /usr/local/bin/uv
15+
1316
# install make and gosu
14-
# install uv using pip
15-
# UV_VERSION should match pyproject.toml [tool.uv] required-version (currently 0.9.5)
1617
ENV GOSU_VERSION=1.14
1718
RUN set -x \
1819
&& apt-get update \
1920
&& apt-get install -y --no-install-recommends make curl gnupg \
20-
&& pip install --no-cache-dir "uv==${UV_VERSION}" \
2121
&& curl -sSLo /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \
2222
&& curl -sSLo /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \
2323
&& export GNUPGHOME="$(mktemp -d)" \
@@ -40,14 +40,11 @@ WORKDIR /data
4040
COPY pyproject.toml uv.lock ./
4141

4242
# Install tox and tox-uv as system packages so they're available globally
43-
# This matches the original behavior where tox was installed via pip
4443
# We use uv pip install to install packages from the tox dependency group in pyproject.toml
4544
# by reading from the lock file which ensures consistent versions
46-
# Reinstall uv after pip install to ensure correct version (uv pip install may install a different version)
4745
# Clean up dependency files after installation to reduce image size
4846
RUN set -x \
4947
&& uv pip install --system --group tox \
50-
&& pip install --no-cache-dir --force-reinstall "uv==${UV_VERSION}" \
5148
&& rm -f pyproject.toml uv.lock \
5249
&& true
5350

ci_tests.mk

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,23 +37,23 @@ endif
3737
# Targets to build docker file for each python version
3838
.PHONY: test-ci-py310-build
3939
test-ci-py310-build: Dockerfile
40-
docker build --build-arg "PY_TAG=3.10.15-slim-bookworm" --build-arg "ENV_TAG=py310" -t python-sdk:py310 .
40+
docker build --build-arg "PY_TAG=3.10.19-slim-bookworm" --build-arg "ENV_TAG=py310" -t python-sdk:py310 .
4141

4242
.PHONY: test-ci-py311-build
4343
test-ci-py311-build: Dockerfile
44-
docker build --build-arg "PY_TAG=3.11.10-slim-bookworm" --build-arg "ENV_TAG=py311" -t python-sdk:py311 .
44+
docker build --build-arg "PY_TAG=3.11.14-slim-bookworm" --build-arg "ENV_TAG=py311" -t python-sdk:py311 .
4545

4646
.PHONY: test-ci-py312-build
4747
test-ci-py312-build: Dockerfile
48-
docker build --build-arg "PY_TAG=3.12.6-slim-bookworm" --build-arg "ENV_TAG=py312" -t python-sdk:py312 .
48+
docker build --build-arg "PY_TAG=3.12.12-slim-bookworm" --build-arg "ENV_TAG=py312" -t python-sdk:py312 .
4949

5050
.PHONY: test-ci-py313-build
5151
test-ci-py313-build: Dockerfile
52-
docker build --build-arg "PY_TAG=3.13.1-slim-bookworm" --build-arg "ENV_TAG=py313" -t python-sdk:py313 .
52+
docker build --build-arg "PY_TAG=3.13.12-slim-bookworm" --build-arg "ENV_TAG=py313" -t python-sdk:py313 .
5353

5454
.PHONY: test-ci-py314-build
5555
test-ci-py314-build: Dockerfile
56-
docker build --build-arg "PY_TAG=3.14.0-slim-bookworm" --build-arg "ENV_TAG=py314" -t python-sdk:py314 .
56+
docker build --build-arg "PY_TAG=3.14.3-slim-bookworm" --build-arg "ENV_TAG=py314" -t python-sdk:py314 .
5757

5858
# test-ci target triggers unit tests for each requested environment
5959
.PHONY: test-ci

packages/gooddata-dbt/pyproject.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ test = [
4040
"pytest-cov~=6.0.0",
4141
"pytest-json-report==1.5.0",
4242
]
43-
type = [
44-
"mypy~=1.11.2",
45-
"pydantic~=2.12.0",
46-
]
4743

4844
[tool.ty.analysis]
4945
allowed-unresolved-imports = ["deep_translator", "github"]

packages/gooddata-dbt/tox.ini

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,3 @@ setenv =
1212
COVERAGE_CORE=sysmon
1313
commands =
1414
pytest -v --cov=src/gooddata_dbt --cov-report=xml tests {posargs} --json-report --json-report-file=.json-report-{envname}.json
15-
16-
[testenv:type-check]
17-
runner = uv-venv-lock-runner
18-
skip_install = true
19-
dependency_groups =
20-
type
21-
commands =
22-
uv run ty check src/gooddata_dbt

packages/gooddata-fdw/pyproject.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,6 @@ test = [
5858
"pyyaml",
5959
"tests_support",
6060
]
61-
type = [
62-
"mypy~=1.11.2",
63-
"pydantic~=2.12.0",
64-
]
6561

6662
[tool.ty.analysis]
6763
allowed-unresolved-imports = ["multicorn"]

packages/gooddata-fdw/tox.ini

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,6 @@ setenv =
1313
commands =
1414
pytest -v --cov=src/gooddata_fdw --cov-report=xml tests {posargs} --json-report --json-report-file=.json-report-{envname}.json
1515

16-
[testenv:type-check]
17-
runner = uv-venv-lock-runner
18-
skip_install = true
19-
dependency_groups =
20-
type
21-
commands =
22-
uv run ty check src/gooddata_fdw
23-
2416
[testenv:docs]
2517
basepython = python3.14
2618
skip_install = true

0 commit comments

Comments
 (0)