Skip to content

Commit 846bcdf

Browse files
committed
chore: adapt uv in infra
Note that dependencies for packages/gooddata-pipelines were relaxed.
1 parent 93c1684 commit 846bcdf

File tree

5 files changed

+21
-35
lines changed

5 files changed

+21
-35
lines changed

.github/workflows/rw-collect-changes.yaml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,11 @@ jobs:
3434
base: ${{ inputs.commit-branch }}
3535
filters: |
3636
docs:
37-
- 'gooddata-pandas/**'
38-
- 'gooddata-sdk/**'
37+
- 'packages/gooddata-pandas/**'
38+
- 'packages/gooddata-sdk/**'
3939
- 'docs/**'
4040
python-modules:
4141
- '.docker/**'
42-
- 'gooddata-fdw/**'
43-
- 'gooddata-pandas/**'
44-
- 'gooddata-sdk/**'
42+
- 'packages/**'
4543
- '*.mk'
4644
- 'Makefile'
47-
- 'gooddata-api-client/**'
48-
- 'gooddata-dbt/**'
49-
- 'gooddata-flight-server/**'
50-
- 'gooddata-flexconnect/**'
51-
- 'gooddata-pipelines/**'

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

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,21 @@ jobs:
2424
if: ${{ matrix.python_version == 'py313' }}
2525
uses: codecov/codecov-action@v3
2626
with:
27-
files: ./gooddata-sdk/coverage.xml,./gooddata-pandas/coverage.xml,./gooddata-fdw/coverage.xml,./gooddata-flight-server/coverage.xml,./gooddata-flexconnect/coverage.xml
27+
files: ./packages/gooddata-sdk/coverage.xml,./packages/gooddata-pandas/coverage.xml,./packages/gooddata-fdw/coverage.xml,./packages/gooddata-flight-server/coverage.xml,./packages/gooddata-flexconnect/coverage.xml
2828
lint-and-format-check:
2929
runs-on: ubuntu-latest
3030
if: ${{inputs.changed-python-modules == 'true'}}
3131
steps:
3232
- name: Checkout
3333
uses: actions/checkout@v4
3434
- name: Set up python 3.13
35-
uses: actions/setup-python@v5
35+
uses: astral-sh/setup-uv@v6
3636
with:
37-
python-version-file: '.python-version'
38-
cache: 'pip'
39-
cache-dependency-path: |
40-
fmt-requirements.txt
37+
python-version: 3.13
4138
- name: Install dependencies
4239
run: |
43-
make dev
40+
uv venv
41+
uv pip install --group lint
4442
- name: pep8 and formatting check
4543
run: |
4644
make format
@@ -54,13 +52,10 @@ jobs:
5452
uses: actions/setup-python@v5
5553
with:
5654
python-version-file: '.python-version'
57-
cache: 'pip'
58-
cache-dependency-path: |
59-
tox-requirements.txt
6055
- name: Install dependencies
6156
run: |
62-
python -m pip install --upgrade pip
63-
pip install -r tox-requirements.txt
57+
python -m pip install uv
58+
uv pip install --group tox --group type --system
6459
- name: mypy check
6560
run: |
6661
make mypy

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ RUN set -x \
3030
ENV PYTHON_TOX_VERSION=4.14.1
3131
ENV PYTHON_TOX_UV_VERSION=1.7.0
3232
RUN set -x \
33-
&& pip3 install tox==${PYTHON_TOX_VERSION} tox-uv==${PYTHON_TOX_UV_VERSION}\
33+
&& pip3 install uv tox==${PYTHON_TOX_VERSION} tox-uv==${PYTHON_TOX_UV_VERSION}\
3434
&& true
3535

3636
COPY .docker/entrypoint.sh /entrypoint.sh

Makefile

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# (C) 2021 GoodData Corporation
22
# list all full paths to files and directories in CWD containing "gooddata", filter out ones ending by "client"
3-
NO_CLIENT_GD_PROJECTS_ABS = $(filter-out %client, $(wildcard $(CURDIR)/*gooddata*))
3+
NO_CLIENT_GD_PROJECTS_ABS = $(filter-out %client, $(wildcard $(CURDIR)/packages/*gooddata*))
44
# for each path, take only the base name of the path
55
NO_CLIENT_GD_PROJECTS_DIRS = $(foreach dir, $(NO_CLIENT_GD_PROJECTS_ABS), $(notdir $(dir)))
66
# TODO: replace API_VERSION in the future by call to API
@@ -18,9 +18,7 @@ all:
1818

1919
.PHONY: dev
2020
dev:
21-
rm -rf .venv
22-
python3.13 -m venv .venv --upgrade-deps
23-
.venv/bin/pip3 install -r dev-requirements.txt
21+
uv sync --all-groups
2422
.venv/bin/pre-commit install
2523

2624
.PHONY: lint
@@ -72,13 +70,13 @@ download:
7270
.PHONY: mypy
7371
mypy:
7472
RESULT=0; \
75-
for project in $(NO_CLIENT_GD_PROJECTS_DIRS); do $(MAKE) -C $${project} $@ || RESULT=$$?; done; \
73+
for project in $(NO_CLIENT_GD_PROJECTS_DIRS); do $(MAKE) -C packages/$${project} $@ || RESULT=$$?; done; \
7674
exit $$RESULT
7775

7876
.PHONY: test
7977
test:
8078
RESULT=0; \
81-
for project in $(NO_CLIENT_GD_PROJECTS_DIRS); do $(MAKE) -C $${project} test || RESULT=$$?; done; \
79+
for project in $(NO_CLIENT_GD_PROJECTS_DIRS); do $(MAKE) -C packages/$${project} test || RESULT=$$?; done; \
8280
exit $$RESULT
8381

8482
.PHONY: release
@@ -104,7 +102,7 @@ docs:
104102
.PHONY: remove-cassettes
105103
remove-cassettes:
106104
RESULT=0; \
107-
for project in $(NO_CLIENT_GD_PROJECTS_DIRS); do $(MAKE) -C $${project} $@ || RESULT=$$?; done; \
105+
for project in $(NO_CLIENT_GD_PROJECTS_DIRS); do $(MAKE) -C packages/$${project} $@ || RESULT=$$?; done; \
108106
exit $$RESULT
109107

110108
.PHONY: new-docs

project_common.mk

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,24 @@ all:
2525

2626
.PHONY: format
2727
format:
28-
(cd ..; .venv/bin/ruff format --check $(CURR_DIR_BASE_NAME))
28+
(cd ...; .venv/bin/ruff format --check $(CURR_DIR_BASE_NAME))
2929

3030
.PHONY: format-diff
3131
format-diff:
32-
(cd ..; .venv/bin/ruff format --diff $(CURR_DIR_BASE_NAME))
32+
(cd ...; .venv/bin/ruff format --diff $(CURR_DIR_BASE_NAME))
3333

3434
.PHONY: format-fix
3535
format-fix:
36-
(cd ..; .venv/bin/ruff format $(CURR_DIR_BASE_NAME))
37-
(cd ..; .venv/bin/ruff check --fix $(CURR_DIR_BASE_NAME))
36+
(cd ...; .venv/bin/ruff format $(CURR_DIR_BASE_NAME))
37+
(cd ...; .venv/bin/ruff check --fix $(CURR_DIR_BASE_NAME))
3838

3939
.PHONY: mypy
4040
mypy:
4141
tox $(TOX_FLAGS) -e mypy
4242

4343
.PHONY: test
4444
test:
45-
tox $(TOX_FLAGS) $(LOCAL_TEST_ENVS) $(LOCAL_ADD_ARGS)
45+
tox -v $(TOX_FLAGS) $(LOCAL_TEST_ENVS) $(LOCAL_ADD_ARGS)
4646

4747
.PHONY: test-ci
4848
test-ci:

0 commit comments

Comments
 (0)