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 .github/workflows/bump-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

- name: Install dependencies
run: |
uv sync --only-group release
uv sync --only-group release --locked

- name: Bump version
id: bump
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dev-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
uses: astral-sh/setup-uv@v6
- name: Install dependencies
run: |
uv sync --only-group release
uv sync --only-group release --locked
- name: Bump to dev
run: uv run tbump --only-patch --non-interactive $(./scripts/next_dev.sh)
- name: Build ${{ matrix.component }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rw-python-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
python-version: 3.14
- name: Install dependencies
run: |
uv sync --only-group lint
uv sync --only-group lint --locked
- name: pep8 and formatting check
run: |
make format
Expand All @@ -51,7 +51,7 @@ jobs:
uses: astral-sh/setup-uv@v6
- name: Install dependencies
run: |
uv sync --only-group tox --only-group type
uv sync --group type --locked
- name: type check
run: |
make type-check
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repos:
args: [ '--maxkb=890' ]
- id: check-case-conflict
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.5
rev: v0.15.1
hooks:
# Run the linter.
- id: ruff
Expand All @@ -35,6 +35,6 @@ repos:
hooks:
- id: gitlint
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.9.5
rev: 0.10.0
hooks:
- id: uv-lock
11 changes: 4 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# (C) 2021 GoodData Corporation
ARG PY_TAG
FROM ghcr.io/astral-sh/uv:0.10 AS uv
FROM python:${PY_TAG}

ARG PY_TAG
ARG ENV_TAG
ARG UV_VERSION=0.9.5

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

# copy uv binary from official image; version is guarded by required-version in pyproject.toml
COPY --from=uv /uv /usr/local/bin/uv

# install make and gosu
# install uv using pip
# UV_VERSION should match pyproject.toml [tool.uv] required-version (currently 0.9.5)
ENV GOSU_VERSION=1.14
RUN set -x \
&& apt-get update \
&& apt-get install -y --no-install-recommends make curl gnupg \
&& pip install --no-cache-dir "uv==${UV_VERSION}" \
&& curl -sSLo /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \
&& curl -sSLo /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \
&& export GNUPGHOME="$(mktemp -d)" \
Expand All @@ -40,14 +40,11 @@ WORKDIR /data
COPY pyproject.toml uv.lock ./

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

Expand Down
10 changes: 5 additions & 5 deletions ci_tests.mk
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,23 @@ endif
# Targets to build docker file for each python version
.PHONY: test-ci-py310-build
test-ci-py310-build: Dockerfile
docker build --build-arg "PY_TAG=3.10.15-slim-bookworm" --build-arg "ENV_TAG=py310" -t python-sdk:py310 .
docker build --build-arg "PY_TAG=3.10.19-slim-bookworm" --build-arg "ENV_TAG=py310" -t python-sdk:py310 .

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

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

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

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

# test-ci target triggers unit tests for each requested environment
.PHONY: test-ci
Expand Down
4 changes: 0 additions & 4 deletions packages/gooddata-dbt/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ test = [
"pytest-cov~=6.0.0",
"pytest-json-report==1.5.0",
]
type = [
"mypy~=1.11.2",
"pydantic~=2.12.0",
]

[tool.ty.analysis]
allowed-unresolved-imports = ["deep_translator", "github"]
Expand Down
8 changes: 0 additions & 8 deletions packages/gooddata-dbt/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,3 @@ setenv =
COVERAGE_CORE=sysmon
commands =
pytest -v --cov=src/gooddata_dbt --cov-report=xml tests {posargs} --json-report --json-report-file=.json-report-{envname}.json

[testenv:type-check]
runner = uv-venv-lock-runner
skip_install = true
dependency_groups =
type
commands =
uv run ty check src/gooddata_dbt
4 changes: 0 additions & 4 deletions packages/gooddata-fdw/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@ test = [
"pyyaml",
"tests_support",
]
type = [
"mypy~=1.11.2",
"pydantic~=2.12.0",
]

[tool.ty.analysis]
allowed-unresolved-imports = ["multicorn"]
Expand Down
8 changes: 0 additions & 8 deletions packages/gooddata-fdw/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@ setenv =
commands =
pytest -v --cov=src/gooddata_fdw --cov-report=xml tests {posargs} --json-report --json-report-file=.json-report-{envname}.json

[testenv:type-check]
runner = uv-venv-lock-runner
skip_install = true
dependency_groups =
type
commands =
uv run ty check src/gooddata_fdw

[testenv:docs]
basepython = python3.14
skip_install = true
Expand Down
4 changes: 0 additions & 4 deletions packages/gooddata-flexconnect/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ test = [
"pytest-cov~=6.0.0",
"pytest-json-report==1.5.0",
]
type = [
"mypy~=1.11.2",
"pydantic~=2.12.0",
]

[tool.ty.analysis]
allowed-unresolved-imports = ["jsonschema.**", "referencing"]
Expand Down
8 changes: 0 additions & 8 deletions packages/gooddata-flexconnect/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@ setenv =
commands =
pytest -v --cov=src/gooddata_flexconnect --cov-report=xml tests {posargs} --json-report --json-report-file=.json-report-{envname}.json

[testenv:type-check]
runner = uv-venv-lock-runner
skip_install = true
dependency_groups =
type
commands =
uv run ty check src/gooddata_flexconnect

[testenv:docs]
basepython = python3.14
skip_install = true
Expand Down
4 changes: 0 additions & 4 deletions packages/gooddata-flight-server/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ test = [
"pytest-cov~=6.0.0",
"pytest-json-report==1.5.0",
]
type = [
"mypy~=1.11.2",
"pydantic~=2.12.0",
]

[tool.ty.analysis]
allowed-unresolved-imports = [
Expand Down
8 changes: 0 additions & 8 deletions packages/gooddata-flight-server/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@ setenv =
commands =
pytest -v --cov=src/gooddata_flight_server --cov-report=xml tests {posargs} --json-report --json-report-file=.json-report-{envname}.json

[testenv:type-check]
runner = uv-venv-lock-runner
skip_install = true
dependency_groups =
type
commands =
uv run ty check src/gooddata_flight_server

[testenv:docs]
basepython = python3.14
skip_install = true
Expand Down
4 changes: 0 additions & 4 deletions packages/gooddata-pandas/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ test = [
"pyyaml",
"tests_support",
]
type = [
"mypy~=1.11.2",
"pydantic~=2.12.0",
]

[tool.ty.analysis]
allowed-unresolved-imports = ["gooddata_api_client"]
Expand Down
8 changes: 0 additions & 8 deletions packages/gooddata-pandas/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@ setenv =
commands =
pytest -v --cov=src/gooddata_pandas --cov-report=xml tests {posargs} --json-report --json-report-file=.json-report-{envname}.json

[testenv:type-check]
runner = uv-venv-lock-runner
skip_install = true
dependency_groups =
type
commands =
uv run ty check src/gooddata_pandas

[testenv:docs]
basepython = python3.14
skip_install = true
Expand Down
13 changes: 3 additions & 10 deletions packages/gooddata-pipelines/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ dependencies = [
"types-pyyaml (>=6.0.12.20250326,<7.0.0)",
]

[tool.mypy]
disallow_untyped_defs = true
warn_redundant_casts = true
strict_equality = true
no_implicit_optional = true

[tool.ruff]
exclude = [".venv"]
line-length = 80
Expand All @@ -38,10 +32,9 @@ test = [
"moto (>=5.1.6,<6.0.0)",
"orjson (>=3.11.3,<4.0.0)",
]
type = [
"mypy (>=1.11.2,<2.0.0)",
"pydantic~=2.12.0",
]

[tool.ty.analysis]
allowed-unresolved-imports = ["boto3.**", "botocore.**", "mypy_boto3_s3.**", "azure.**"]

[build-system]
requires = ["hatchling"]
Expand Down
8 changes: 0 additions & 8 deletions packages/gooddata-pipelines/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,3 @@ setenv =
COVERAGE_CORE=sysmon
commands =
pytest -v --cov=src/gooddata_pipelines --cov-report=xml tests {posargs} --json-report --json-report-file=.json-report-{envname}.json

[testenv:type-check]
runner = uv-venv-lock-runner
skip_install = true
dependency_groups =
type
commands =
uv run ty check src/gooddata_pipelines
8 changes: 0 additions & 8 deletions packages/gooddata-sdk/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,6 @@ test = [
"deepdiff~=8.5.0",
"tests_support",
]
type = [
"mypy~=1.11.2",
"pydantic~=2.12.0",
"types-python-dateutil >= 2.5.3",
"types-pyyaml~=6.0.0",
"attrs>=21.4.0,<=24.2.0",
"cattrs>=22.1.0,<=24.1.1",
]

[tool.ty.analysis]
allowed-unresolved-imports = ["gooddata_api_client.**"]
Expand Down
8 changes: 0 additions & 8 deletions packages/gooddata-sdk/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@ setenv =
commands =
pytest -v --cov=src/gooddata_sdk --cov-report=xml tests {posargs} --json-report --json-report-file=.json-report-{envname}.json

[testenv:type-check]
runner = uv-venv-lock-runner
skip_install = true
dependency_groups =
type
commands =
uv run ty check src/gooddata_sdk

[testenv:docs]
basepython = python3.14
skip_install = true
Expand Down
4 changes: 3 additions & 1 deletion project_common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# Common command components (run from workspace root, scoped to this package)
ROOT_DIR = ../..
RUFF = ./.venv/bin/ruff
# ty needs uv run (unlike ruff) because it resolves imports from installed packages
TY = uv run ty
PKG_PATH = packages/$(CURR_DIR_BASE_NAME)

TOX_FLAGS =
Expand Down Expand Up @@ -50,7 +52,7 @@ format-diff:

.PHONY: type-check
type-check:
uv run tox $(TOX_FLAGS) -e type-check
(cd $(ROOT_DIR); $(TY) check --project $(PKG_PATH) $(PKG_PATH)/src)

.PHONY: types
types: type-check
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies = [
]

[tool.uv]
required-version = ">=0.9.5,<0.10.0"
required-version = "~=0.10.0"

[tool.uv.sources]
gooddata-sdk = { workspace = true }
Expand All @@ -40,10 +40,10 @@ dev = [
"gitlint~=0.19.1",
]
lint = [
"ruff==0.9.5",
"ruff~=0.15.1",
]
type = [
"ty>=0.0.14",
"ty~=0.0.14",
]
test = [
# Common test dependencies used across all workspace packages
Expand Down
Loading
Loading