Skip to content

Commit c7267f2

Browse files
committed
chore: adapt uv in infra
It is necessary to adapt uv in the code and infra things.
1 parent 987f360 commit c7267f2

File tree

17 files changed

+1447
-1452
lines changed

17 files changed

+1447
-1452
lines changed

.github/workflows/build-release.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,18 @@ jobs:
4444
pip install build
4545
- name: Build ${{ matrix.component }}
4646
run: |
47-
cd ${{ matrix.component }}
47+
if [ "${{ matrix.component }}" = "gooddata-api-client" ]; then
48+
cd ${{ matrix.component }}
49+
else
50+
cd packages/${{ matrix.component }}
51+
fi
4852
python -m build
4953
- name: Persist ${{ matrix.component }} artifacts
5054
uses: actions/upload-artifact@v4
5155
with:
5256
name: artifacts_${{ matrix.component }}
53-
path: ${{ matrix.component }}/dist/
57+
path: |
58+
${{ matrix.component == 'gooddata-api-client' && format('{0}/dist/', matrix.component) || format('packages/{0}/dist/', matrix.component) }}
5459
if-no-files-found: error
5560
github_release:
5661
name: Create GitHub release

.github/workflows/dev-release.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,16 @@ jobs:
4040
run: pip install build
4141
- name: Build ${{ matrix.component }}
4242
run: |
43-
cd ${{ matrix.component }}
43+
if [ "${{ matrix.component }}" = "gooddata-api-client" ]; then
44+
cd ${{ matrix.component }}
45+
else
46+
cd packages/${{ matrix.component }}
47+
fi
4448
python -m build
4549
- name: Push ${{ matrix.component}} to pypi
4650
uses: pypa/gh-action-pypi-publish@release/v1
4751
with:
4852
user: __token__
4953
password: ${{ secrets.PYPI_API_TOKEN }}
50-
packages_dir: ${{ matrix.component }}/dist
54+
packages_dir: ${{ matrix.component == 'gooddata-api-client' && format('{0}/dist', matrix.component) || format('packages/{0}/dist', matrix.component) }}
5155
verbose: true

.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

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,12 @@ Here are the options how to run the tests:
143143
- run tests for one sub-project - drill down to sub-project's directory
144144
- use `make test` to trigger tests
145145
```bash
146-
cd gooddata-sdk
146+
cd packages/gooddata-sdk
147147
make test
148148
```
149149
- or execute `tox` command with arguments of your choice
150150
```bash
151-
cd gooddata-sdk
151+
cd packages/gooddata-sdk
152152
tox -e py39
153153
```
154154
- run tests for all non-client projects using `make test` in project root directory
@@ -210,7 +210,7 @@ venv automatically. So when docker tox tests are executed after localhost tests
210210
```
211211
- run all tests for all supported python environments and for one project
212212
```bash
213-
cd gooddata-sdk
213+
cd packages/gooddata-sdk
214214
make test-ci
215215
```
216216
- run all tests containing `http_headers` in name for py310 and py39 for all projects

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: 6 additions & 8 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
@@ -98,13 +96,13 @@ check-copyright:
9896
.PHONY: docs
9997
docs:
10098
RESULT=0; \
101-
for project in gooddata-fdw gooddata-pandas; do $(MAKE) -C $${project} $@ || RESULT=$$?; done; \
99+
for project in gooddata-fdw gooddata-pandas; do $(MAKE) -C packages/$${project} $@ || RESULT=$$?; done; \
102100
exit $$RESULT
103101

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

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,26 @@ Python. Learn more about the clients in their [dedicated readme](./clients_READM
1616

1717
### GoodData Python SDK
1818

19-
The [gooddata-sdk](./gooddata-sdk) package provides a clean and convenient Python API to interact with GoodData.CN.
19+
The [gooddata-sdk](./packages/gooddata-sdk) package provides a clean and convenient Python API to interact with GoodData.CN.
2020

2121
Check out the GoodData Python SDK [documentation](https://www.gooddata.com/docs/python-sdk) to learn more and get started.
2222

2323
### GoodData Pandas
2424

25-
The [gooddata-pandas](./gooddata-pandas) package is a thin layer that utilizes Python SDK and allows you to conveniently
25+
The [gooddata-pandas](./packages/gooddata-pandas) package is a thin layer that utilizes Python SDK and allows you to conveniently
2626
create pandas series and data frames.
2727

2828
Check out the GoodData Pandas [documentation](https://gooddata-pandas.readthedocs.io/en/latest/) to learn more and get started.
2929

3030
### GoodData Pipelines
3131

32-
The [gooddata-pipelines](./gooddata-pipelines/) package provides easy ways to manage the lifecycle of GoodData Cloud.
32+
The [gooddata-pipelines](./packages/gooddata-pipelines/) package provides easy ways to manage the lifecycle of GoodData Cloud.
3333

3434
Check out the GoodData Pipelines [documentation](https://www.gooddata.com/docs/python-sdk/latest/pipelines-overview/) to learn more and get started.
3535

3636
### GoodData FlexConnect
3737

38-
The [gooddata-flexconnect](./gooddata-flexconnect) package is the foundation for writing custom FlexConnect data sources.
38+
The [gooddata-flexconnect](./packages/gooddata-flexconnect) package is the foundation for writing custom FlexConnect data sources.
3939

4040
Check out the GoodData FlexConnect [documentation](https://www.gooddata.com/docs/cloud/connect-data/create-data-sources/flexconnect/) to learn more and get started.
4141

@@ -44,7 +44,7 @@ Check out the GoodData FlexConnect [documentation](https://www.gooddata.com/docs
4444
> [!WARNING]
4545
> GoodData Foreign Data Wrapper is currently deprecated.
4646
47-
The [gooddata-fdw](./gooddata-fdw) package provides a way
47+
The [gooddata-fdw](./packages/gooddata-fdw) package provides a way
4848
to map GoodData Cloud semantic layer and/or visualizations stored in your GoodData Cloud
4949
into PostgreSQL as foreign tables that you can then query using SQL.
5050

ci_tests.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ endif
3030
# to the project directory so that only tests for given project are executed
3131
DOCKER_COMMAND =
3232
ifdef TEST_CI_PROJECT
33-
DOCKER_COMMAND = make -C $(TEST_CI_PROJECT) test
33+
DOCKER_COMMAND = make -C packages/$(TEST_CI_PROJECT) test
3434
endif
3535

3636

docker-compose.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ services:
3030
gooddata-fdw:
3131
build:
3232
context: .
33-
dockerfile: gooddata-fdw/Dockerfile
33+
dockerfile: packages/gooddata-fdw/Dockerfile
3434
ports:
3535
- "2543:5432"
3636
environment:
@@ -42,7 +42,7 @@ services:
4242
upload-layout:
4343
build:
4444
context: .
45-
dockerfile: tests-support/Dockerfile
45+
dockerfile: packages/tests-support/Dockerfile
4646
environment:
4747
FIXTURES_DIR: /app/fixtures
4848
HOST: "http://gooddata-cn-ce:3000"

0 commit comments

Comments
 (0)