Skip to content

Commit c4f12ff

Browse files
authored
Merge pull request gooddata#935 from hkad98/bump-python
chore: upgrade Python to 3.13
2 parents de0cf4c + 69d9b13 commit c4f12ff

File tree

25 files changed

+96
-64
lines changed

25 files changed

+96
-64
lines changed

.github/workflows/docs.yaml

Lines changed: 0 additions & 30 deletions
This file was deleted.

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
if: ${{inputs.changed-python-modules == 'true'}}
1212
strategy:
1313
matrix:
14-
python_version: [py312, py311, py310, py39]
14+
python_version: [py313, py312, py311, py310, py39]
1515
steps:
1616
- name: Checkout
1717
uses: actions/checkout@v4
@@ -21,7 +21,7 @@ jobs:
2121
env:
2222
TEST_ENVS: ${{ matrix.python_version }}
2323
- name: Upload coverage to Codecov
24-
if: ${{ matrix.python_version == 'py312' }}
24+
if: ${{ matrix.python_version == 'py313' }}
2525
uses: codecov/codecov-action@v3
2626
with:
2727
files: ./gooddata-sdk/coverage.xml,./gooddata-pandas/coverage.xml,./gooddata-fdw/coverage.xml,./gooddata-flight-server/coverage.xml,./gooddata-flexconnect/coverage.xml
@@ -31,7 +31,7 @@ jobs:
3131
steps:
3232
- name: Checkout
3333
uses: actions/checkout@v4
34-
- name: Set up Python 3.12
34+
- name: Set up python 3.13
3535
uses: actions/setup-python@v5
3636
with:
3737
python-version-file: '.python-version'
@@ -50,7 +50,7 @@ jobs:
5050
steps:
5151
- name: Checkout
5252
uses: actions/checkout@v4
53-
- name: Set up Python 3.12
53+
- name: Set up python 3.13
5454
uses: actions/setup-python@v5
5555
with:
5656
python-version-file: '.python-version'

.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.12.4
1+
3.13.1

.sonar.settings

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# (C) 2021 GoodData Corporation
22
sonar.sources=gooddata-sdk,gooddata-fdw,gooddata-pandas,gooddata-flight-server,gooddata-flexconnect
33
sonar.exclusions=gooddata-api-client/**/*
4-
sonar.python.version=3.9, 3.10, 3.11, 3.12
4+
sonar.python.version=3.9, 3.10, 3.11, 3.12, 3.13

.sonarcloud.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# (C) 2022 GoodData Corporation
22
sonar.sources=gooddata-sdk,gooddata-fdw,gooddata-pandas,gooddata-flight-server,gooddata-flexconnect
33
sonar.exclusions=gooddata-api-client/**/*
4-
sonar.python.version=3.9, 3.10, 3.11, 3.12
4+
sonar.python.version=3.9, 3.10, 3.11, 3.12, 3.13

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Getting Started
44

5-
1. Ensure you have at minimum Python 3.12 installed; Python 3.11, 3.10 and 3.9 are optional for multi-environment tests
5+
1. Ensure you have at minimum Python 3.13 installed; Python 3.12, 3.11, 3.10 and 3.9 are optional for multi-environment tests
66

77
This repo uses [tox](https://tox.readthedocs.io/en/latest/) and by default will try to run tests against all
88
supported versions. If you have only subset of supported python interpreters installed, see
@@ -21,7 +21,7 @@
2121
source .venv/bin/activate
2222
```
2323

24-
The `make dev` command will create a new Python 3.12 virtual environment in the `.venv` directory, install all
24+
The `make dev` command will create a new Python 3.13 virtual environment in the `.venv` directory, install all
2525
third party dependencies into it and setup git hooks.
2626

2727
Additionally, if you use [direnv](https://direnv.net/) you can run `direnv allow .envrc` to enable automatic

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ all:
1919
.PHONY: dev
2020
dev:
2121
rm -rf .venv
22-
python3.12 -m venv .venv --upgrade-deps
22+
python3.13 -m venv .venv --upgrade-deps
2323
.venv/bin/pip3 install -r dev-requirements.txt
2424
.venv/bin/pre-commit install
2525

ci_tests.mk

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# (C) 2021 GoodData Corporation
2-
IN_TEST_ENVS = py312,py311,py310,py39
2+
IN_TEST_ENVS = py313,py312,py311,py310,py39
33
ifdef TEST_ENVS
44
IN_TEST_ENVS = $(TEST_ENVS)
55
endif
@@ -51,6 +51,10 @@ test-ci-py311-build: Dockerfile
5151
test-ci-py312-build: Dockerfile
5252
docker build --build-arg "PY_TAG=3.12.6-slim-bookworm" --build-arg "ENV_TAG=py312" -t python-sdk:py312 .
5353

54+
.PHONY: test-ci-py313-build
55+
test-ci-py313-build: Dockerfile
56+
docker build --build-arg "PY_TAG=3.13.1-slim-bookworm" --build-arg "ENV_TAG=py313" -t python-sdk:py313 .
57+
5458
# test-ci target triggers unit tests for each requested environment
5559
.PHONY: test-ci
5660
test-ci: $(TEST_CI_ENVS)

docs/Dockerfile

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,41 @@
1+
FROM python:3.13-slim AS python-stage
2+
3+
COPY . data
4+
5+
WORKDIR data
6+
7+
RUN pip install --no-cache-dir -r scripts/script-requirements.txt
8+
9+
WORKDIR docs
10+
11+
RUN python3 ../scripts/docs/json_builder.py && \
12+
mkdir versioned_docs/latest && \
13+
mv -f data.json versioned_docs/latest && \
14+
python3 ../scripts/docs/python_ref_builder.py api_spec.toml versioned_docs/latest/data.json latest versioned_docs
15+
116
FROM node:20.18.0-bookworm-slim
217

18+
COPY docs docs
19+
20+
COPY --from=python-stage data/docs/versioned_docs/latest/api-reference docs/content/en/latest/api-reference
21+
COPY --from=python-stage data/docs/versioned_docs/latest/pandas docs/content/en/latest/pandas
22+
23+
324
RUN apt-get update && \
425
apt-get install -y git make golang-go curl && \
526
npm install -g [email protected] && \
627
apt-get clean && \
7-
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
28+
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
29+
mkdir -p docs/versioned_docs/latest
830

9-
COPY docs docs
31+
COPY --from=python-stage data/docs/versioned_docs/latest/links.json docs/versioned_docs/latest
32+
COPY --from=python-stage data/docs/versioned_docs/latest/data.json docs/versioned_docs/latest
33+
34+
COPY docs/content/en/latest/ docs/versioned_docs/latest/
1035

1136
WORKDIR docs
12-
RUN npm install
37+
RUN npm install && \
38+
rm -rf node_modules
1339

1440
# accessible on http://localhost:1313/latest/
15-
ENTRYPOINT ["hugo", "server", "--bind", "0.0.0.0"]
41+
ENTRYPOINT ["hugo", "server", "-e", "dev", "--bind", "0.0.0.0"]

docs/config/dev/config.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This config file overrides _default/config.toml
2+
# if hugo builds site for the environment "versioned"
3+
# (hugo -e versioned ...)
4+
5+
# This contentDir is empty dir in Git. It needs to be
6+
# generated by an external script.
7+
contentDir = "versioned_docs"
8+
[Params]
9+
devVersion = "dev"
10+
latestVersion = "1.4"

0 commit comments

Comments
 (0)