diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 281516a5a..03d4154fa 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -14,7 +14,7 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - name: Set up python 3.12 + - name: Set up python 3.13 uses: actions/setup-python@v5 with: python-version-file: '.python-version' diff --git a/.github/workflows/rw-python-tests.yaml b/.github/workflows/rw-python-tests.yaml index a3effd831..1d6b10d3a 100644 --- a/.github/workflows/rw-python-tests.yaml +++ b/.github/workflows/rw-python-tests.yaml @@ -11,7 +11,7 @@ jobs: if: ${{inputs.changed-python-modules == 'true'}} strategy: matrix: - python_version: [py312, py311, py310, py39] + python_version: [py313, py312, py311, py310, py39] steps: - name: Checkout uses: actions/checkout@v4 @@ -21,7 +21,7 @@ jobs: env: TEST_ENVS: ${{ matrix.python_version }} - name: Upload coverage to Codecov - if: ${{ matrix.python_version == 'py312' }} + if: ${{ matrix.python_version == 'py313' }} uses: codecov/codecov-action@v3 with: 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: steps: - name: Checkout uses: actions/checkout@v4 - - name: Set up Python 3.12 + - name: Set up python 3.13 uses: actions/setup-python@v5 with: python-version-file: '.python-version' @@ -50,7 +50,7 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - name: Set up Python 3.12 + - name: Set up python 3.13 uses: actions/setup-python@v5 with: python-version-file: '.python-version' diff --git a/.python-version b/.python-version index 455808f8e..c10780c62 100644 --- a/.python-version +++ b/.python-version @@ -1 +1 @@ -3.12.4 +3.13.1 diff --git a/.sonar.settings b/.sonar.settings index 53f46be57..739cae61f 100644 --- a/.sonar.settings +++ b/.sonar.settings @@ -1,4 +1,4 @@ # (C) 2021 GoodData Corporation sonar.sources=gooddata-sdk,gooddata-fdw,gooddata-pandas,gooddata-flight-server,gooddata-flexconnect sonar.exclusions=gooddata-api-client/**/* -sonar.python.version=3.9, 3.10, 3.11, 3.12 +sonar.python.version=3.9, 3.10, 3.11, 3.12, 3.13 diff --git a/.sonarcloud.properties b/.sonarcloud.properties index 99a0c503e..b853426b1 100644 --- a/.sonarcloud.properties +++ b/.sonarcloud.properties @@ -1,4 +1,4 @@ # (C) 2022 GoodData Corporation sonar.sources=gooddata-sdk,gooddata-fdw,gooddata-pandas,gooddata-flight-server,gooddata-flexconnect sonar.exclusions=gooddata-api-client/**/* -sonar.python.version=3.9, 3.10, 3.11, 3.12 +sonar.python.version=3.9, 3.10, 3.11, 3.12, 3.13 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1f9952a22..e61ed006a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,7 +2,7 @@ ## Getting Started -1. Ensure you have at minimum Python 3.12 installed; Python 3.11, 3.10 and 3.9 are optional for multi-environment tests +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 This repo uses [tox](https://tox.readthedocs.io/en/latest/) and by default will try to run tests against all supported versions. If you have only subset of supported python interpreters installed, see @@ -21,7 +21,7 @@ source .venv/bin/activate ``` - The `make dev` command will create a new Python 3.12 virtual environment in the `.venv` directory, install all + The `make dev` command will create a new Python 3.13 virtual environment in the `.venv` directory, install all third party dependencies into it and setup git hooks. Additionally, if you use [direnv](https://direnv.net/) you can run `direnv allow .envrc` to enable automatic diff --git a/Makefile b/Makefile index 55139d80d..b9155f87f 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ all: .PHONY: dev dev: rm -rf .venv - python3.12 -m venv .venv --upgrade-deps + python3.13 -m venv .venv --upgrade-deps .venv/bin/pip3 install -r dev-requirements.txt .venv/bin/pre-commit install diff --git a/ci_tests.mk b/ci_tests.mk index 6df718551..7ba1759bf 100644 --- a/ci_tests.mk +++ b/ci_tests.mk @@ -1,5 +1,5 @@ # (C) 2021 GoodData Corporation -IN_TEST_ENVS = py312,py311,py310,py39 +IN_TEST_ENVS = py313,py312,py311,py310,py39 ifdef TEST_ENVS IN_TEST_ENVS = $(TEST_ENVS) endif @@ -51,6 +51,10 @@ test-ci-py311-build: Dockerfile 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 . +.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 . + # test-ci target triggers unit tests for each requested environment .PHONY: test-ci test-ci: $(TEST_CI_ENVS) diff --git a/docs/Dockerfile b/docs/Dockerfile index 169dfda64..50993def2 100644 --- a/docs/Dockerfile +++ b/docs/Dockerfile @@ -1,15 +1,41 @@ +FROM python:3.13-slim AS python-stage + +COPY . data + +WORKDIR data + +RUN pip install --no-cache-dir -r scripts/script-requirements.txt + +WORKDIR docs + +RUN python3 ../scripts/docs/json_builder.py && \ + mkdir versioned_docs/latest && \ + mv -f data.json versioned_docs/latest && \ + python3 ../scripts/docs/python_ref_builder.py api_spec.toml versioned_docs/latest/data.json latest versioned_docs + FROM node:20.18.0-bookworm-slim +COPY docs docs + +COPY --from=python-stage data/docs/versioned_docs/latest/api-reference docs/content/en/latest/api-reference +COPY --from=python-stage data/docs/versioned_docs/latest/pandas docs/content/en/latest/pandas + + RUN apt-get update && \ apt-get install -y git make golang-go curl && \ npm install -g hugo-extended@0.117.0 && \ apt-get clean && \ - rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \ + mkdir -p docs/versioned_docs/latest -COPY docs docs +COPY --from=python-stage data/docs/versioned_docs/latest/links.json docs/versioned_docs/latest +COPY --from=python-stage data/docs/versioned_docs/latest/data.json docs/versioned_docs/latest + +COPY docs/content/en/latest/ docs/versioned_docs/latest/ WORKDIR docs -RUN npm install +RUN npm install && \ + rm -rf node_modules # accessible on http://localhost:1313/latest/ -ENTRYPOINT ["hugo", "server", "--bind", "0.0.0.0"] +ENTRYPOINT ["hugo", "server", "-e", "dev", "--bind", "0.0.0.0"] diff --git a/docs/config/dev/config.toml b/docs/config/dev/config.toml new file mode 100644 index 000000000..a45b52e15 --- /dev/null +++ b/docs/config/dev/config.toml @@ -0,0 +1,10 @@ +# This config file overrides _default/config.toml +# if hugo builds site for the environment "versioned" +# (hugo -e versioned ...) + +# This contentDir is empty dir in Git. It needs to be +# generated by an external script. +contentDir = "versioned_docs" +[Params] +devVersion = "dev" +latestVersion = "1.4" diff --git a/docs/config/dev/params.toml b/docs/config/dev/params.toml new file mode 100644 index 000000000..cc9ac2d40 --- /dev/null +++ b/docs/config/dev/params.toml @@ -0,0 +1,16 @@ +# Put document versions here for every major or minor release +# Every TOML list item contains the following properties: +# - "version" - text that appears in versions menu +# - "dirpath" - directory name (relative to contentDir) where documentation +# for given version resides +# - "url" - url for link in version menu. May be absolute URL. +# - "latestTag" - docker image tag for the latest patch version. Must be changed +# on every patch release of respective branch +[[versions]] +version = "1.32" +dirpath = "latest" +url = "/latest/" +[[versions]] +version = "1.32" +dirpath = "latest" +url = "/123/" diff --git a/gooddata-dbt/setup.py b/gooddata-dbt/setup.py index d87bfee20..b26cb8604 100644 --- a/gooddata-dbt/setup.py +++ b/gooddata-dbt/setup.py @@ -40,6 +40,7 @@ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Topic :: Database", "Topic :: Scientific/Engineering", "Topic :: Software Development", diff --git a/gooddata-dbt/tox.ini b/gooddata-dbt/tox.ini index f0315229e..81b665bca 100644 --- a/gooddata-dbt/tox.ini +++ b/gooddata-dbt/tox.ini @@ -1,6 +1,6 @@ # (C) 2023 GoodData Corporation [tox] -envlist = py3{9,10,11,12} +envlist = py3{9,10,11,12,13} [testenv] package = wheel @@ -16,7 +16,7 @@ commands = pytest -v --cov=gooddata_dbt --cov-report=xml tests {posargs} [testenv:mypy] -basepython = python3.12 +basepython = python3.13 skip_install = true deps = -r{toxinidir}/type-requirements.txt diff --git a/gooddata-fdw/.readthedocs.yaml b/gooddata-fdw/.readthedocs.yaml index ab2a3c9d4..1fdce1cf6 100644 --- a/gooddata-fdw/.readthedocs.yaml +++ b/gooddata-fdw/.readthedocs.yaml @@ -9,7 +9,7 @@ version: 2 build: os: ubuntu-22.04 tools: - python: "3.12" + python: "3.13" sphinx: configuration: gooddata-fdw/docs/conf.py diff --git a/gooddata-fdw/setup.py b/gooddata-fdw/setup.py index 874cf09c8..0e848859f 100644 --- a/gooddata-fdw/setup.py +++ b/gooddata-fdw/setup.py @@ -37,6 +37,7 @@ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Topic :: Database", "Topic :: Scientific/Engineering", "Topic :: Software Development", diff --git a/gooddata-fdw/tox.ini b/gooddata-fdw/tox.ini index 5e8e31655..b6d1bfc09 100644 --- a/gooddata-fdw/tox.ini +++ b/gooddata-fdw/tox.ini @@ -1,6 +1,6 @@ # (C) 2021 GoodData Corporation [tox] -envlist = py3{9,10,11,12} +envlist = py3{9,10,11,12,13} [testenv] package = wheel @@ -16,7 +16,7 @@ commands = pytest -v --cov=gooddata_fdw --cov-report=xml tests {posargs} [testenv:mypy] -basepython = python3.12 +basepython = python3.13 skip_install = true deps = -r{toxinidir}/type-requirements.txt @@ -27,7 +27,7 @@ commands = mypy gooddata_fdw [testenv:docs] -basepython = python3.12 +basepython = python3.13 skip_install = true deps = -r{toxinidir}/docs/requirements.txt diff --git a/gooddata-flexconnect/setup.py b/gooddata-flexconnect/setup.py index 2ea6b299d..8d62a89ca 100644 --- a/gooddata-flexconnect/setup.py +++ b/gooddata-flexconnect/setup.py @@ -42,6 +42,7 @@ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Topic :: Database", "Topic :: Scientific/Engineering", "Topic :: Software Development", diff --git a/gooddata-flexconnect/tox.ini b/gooddata-flexconnect/tox.ini index 1911726c0..f01933bc8 100644 --- a/gooddata-flexconnect/tox.ini +++ b/gooddata-flexconnect/tox.ini @@ -1,6 +1,6 @@ # (C) 2024 GoodData Corporation [tox] -envlist = py3{9,10,11,12} +envlist = py3{9,10,11,12,13} [testenv] package = wheel @@ -17,7 +17,7 @@ commands = pytest -v --cov=gooddata_flexconnect --cov-report=xml tests {posargs} [testenv:mypy] -basepython = python3.12 +basepython = python3.13 skip_install = true deps = -r{toxinidir}/type-requirements.txt @@ -28,7 +28,7 @@ commands = mypy gooddata_flexconnect [testenv:docs] -basepython = python3.12 +basepython = python3.13 skip_install = true deps = -r{toxinidir}/docs/requirements.txt diff --git a/gooddata-flight-server/setup.py b/gooddata-flight-server/setup.py index 7dc9f4ad9..78d172bd8 100644 --- a/gooddata-flight-server/setup.py +++ b/gooddata-flight-server/setup.py @@ -47,6 +47,7 @@ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Topic :: Database", "Topic :: Scientific/Engineering", "Topic :: Software Development", diff --git a/gooddata-flight-server/tox.ini b/gooddata-flight-server/tox.ini index 1d903cae5..3a70994a4 100644 --- a/gooddata-flight-server/tox.ini +++ b/gooddata-flight-server/tox.ini @@ -1,6 +1,6 @@ # (C) 2024 GoodData Corporation [tox] -envlist = py3{9,10,11,12} +envlist = py3{9,10,11,12,13} [testenv] package = wheel @@ -14,7 +14,7 @@ commands = pytest -v --cov=gooddata_flight_server --cov-report=xml tests {posargs} [testenv:mypy] -basepython = python3.12 +basepython = python3.13 skip_install = true deps = -r{toxinidir}/type-requirements.txt @@ -22,7 +22,7 @@ commands = mypy gooddata_flight_server [testenv:docs] -basepython = python3.12 +basepython = python3.13 skip_install = true deps = -r{toxinidir}/docs/requirements.txt diff --git a/gooddata-pandas/.readthedocs.yaml b/gooddata-pandas/.readthedocs.yaml index 01944b6a7..e8b7b215d 100644 --- a/gooddata-pandas/.readthedocs.yaml +++ b/gooddata-pandas/.readthedocs.yaml @@ -9,7 +9,7 @@ version: 2 build: os: ubuntu-22.04 tools: - python: "3.12" + python: "3.13" sphinx: configuration: gooddata-pandas/docs/conf.py diff --git a/gooddata-pandas/setup.py b/gooddata-pandas/setup.py index 595405976..5a7c798ec 100644 --- a/gooddata-pandas/setup.py +++ b/gooddata-pandas/setup.py @@ -37,6 +37,7 @@ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Topic :: Database", "Topic :: Scientific/Engineering", "Topic :: Software Development", diff --git a/gooddata-pandas/tox.ini b/gooddata-pandas/tox.ini index decc4613e..b8d52942d 100644 --- a/gooddata-pandas/tox.ini +++ b/gooddata-pandas/tox.ini @@ -1,6 +1,6 @@ # (C) 2021 GoodData Corporation [tox] -envlist = py3{9,10,11,12} +envlist = py3{9,10,11,12,13} [testenv] package = wheel @@ -16,7 +16,7 @@ commands = pytest -v --cov=gooddata_pandas --cov-report=xml tests {posargs} [testenv:mypy] -basepython = python3.12 +basepython = python3.13 skip_install = true deps = -r{toxinidir}/type-requirements.txt @@ -26,7 +26,7 @@ commands = mypy gooddata_pandas [testenv:docs] -basepython = python3.12 +basepython = python3.13 skip_install = true deps = -r{toxinidir}/docs/requirements.txt diff --git a/gooddata-sdk/setup.py b/gooddata-sdk/setup.py index ed89041a3..2f1a78712 100644 --- a/gooddata-sdk/setup.py +++ b/gooddata-sdk/setup.py @@ -47,6 +47,7 @@ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Topic :: Database", "Topic :: Scientific/Engineering", "Topic :: Software Development", diff --git a/gooddata-sdk/tox.ini b/gooddata-sdk/tox.ini index e6a212fee..9446c02a2 100644 --- a/gooddata-sdk/tox.ini +++ b/gooddata-sdk/tox.ini @@ -1,6 +1,6 @@ # (C) 2021 GoodData Corporation [tox] -envlist = py3{9,10,11,12} +envlist = py3{9,10,11,12,13} [testenv] package = wheel @@ -15,7 +15,7 @@ commands = pytest -v --cov=gooddata_sdk --cov-report=xml tests {posargs} [testenv:mypy] -basepython = python3.12 +basepython = python3.13 skip_install = true deps = -r{toxinidir}/type-requirements.txt @@ -24,7 +24,7 @@ commands = mypy gooddata_sdk [testenv:docs] -basepython = python3.12 +basepython = python3.13 skip_install = true setenv = CWD_TO_ROOT_RELATIVE = ".."