Skip to content

Commit

Permalink
build!: Update to python 3.12
Browse files Browse the repository at this point in the history
zusorio committed Dec 16, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 7435a56 commit 68f4304
Showing 9 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'
- run: pip install -r docs/requirements.txt
- run: mkdocs gh-deploy --strict --force
working-directory: ./docs
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ jobs:
with:
cache: pip
cache-dependency-path: ./backend/pyproject.toml
python-version: '3.11'
python-version: '3.12'
- name: Install pre-commit
run: |-
python -m pip install pre-commit
4 changes: 2 additions & 2 deletions .github/workflows/openapi.yml
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ jobs:
with:
cache: pip
cache-dependency-path: ./backend/pyproject.toml
python-version: '3.11'
python-version: '3.12'
- name: Install dependencies
working-directory: ./backend
run: python -m venv .venv && .venv/bin/pip install -e ".[dev]"
@@ -61,7 +61,7 @@ jobs:
with:
cache: pip
cache-dependency-path: ./backend/pyproject.toml
python-version: '3.11'
python-version: '3.12'
- name: Install dependencies
working-directory: ./backend
run: python -m venv .venv && .venv/bin/pip install -e ".[dev]"
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ jobs:
with:
cache: pip
cache-dependency-path: ./backend/pyproject.toml
python-version: '3.11'
python-version: '3.12'
- name: Install dependencies
run: |
pip install -e "./backend[dev]"
6 changes: 3 additions & 3 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -38,15 +38,15 @@ COPY .git_archival.txt /tmp/.git_archival.txt
COPY startup.sh /opt/.startup.sh

# Activate venv
RUN ln -s "$(which python3.11)" /usr/bin/python && \
ln -sf "$(which python3.11)" /usr/bin/python3 && \
RUN ln -s "$(which python3.12)" /usr/bin/python && \
ln -sf "$(which python3.12)" /usr/bin/python3 && \
python -m venv /opt/.venv
ENV _OLD_VIRTUAL_PATH="$PATH"
ENV VIRTUAL_ENV=/opt/.venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

WORKDIR /tmp/backend
RUN pip install . && chmod +x "$VIRTUAL_ENV/lib/python3.11/site-packages/capellacollab/settings/modelsources/git/askpass.py"
RUN pip install . && chmod +x "$VIRTUAL_ENV/lib/python3.12/site-packages/capellacollab/settings/modelsources/git/askpass.py"

RUN mkdir -p /var/log/backend && \
chmod -R 777 /var/log/backend
6 changes: 3 additions & 3 deletions backend/pyproject.toml
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ dynamic = ["version"]

name = "capellacollab-backend"
readme = "README.md"
requires-python = ">=3.11, <3.13"
requires-python = ">=3.12, <3.14"
license = { text = "Apache-2.0" }
authors = [{ name = "DB InfraGO AG" }]
keywords = []
@@ -95,7 +95,7 @@ no_implicit_optional = true
show_error_codes = true
warn_redundant_casts = true
warn_unreachable = true
python_version = "3.11"
python_version = "3.12"
exclude = "capellacollab/alembic"

[[tool.mypy.overrides]]
@@ -222,7 +222,7 @@ xfail_strict = true

[tool.ruff]
line-length = 79
target-version = "py311"
target-version = "py312"

[tool.ruff.lint]
select = ["I", "UP"]
2 changes: 1 addition & 1 deletion docs/.readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: '3.11'
python: '3.12'

mkdocs:
configuration: docs/mkdocs.yml
2 changes: 1 addition & 1 deletion docs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-FileCopyrightText: Copyright DB InfraGO AG and contributors
# SPDX-License-Identifier: Apache-2.0

ARG BASE_IMAGE=python:3.11-bookworm
ARG BASE_IMAGE=python:3.12-bookworm
FROM $BASE_IMAGE as build

USER root
2 changes: 1 addition & 1 deletion docs/docs/admin/cli.md
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ sessions.
## Installation

In order to use the CLI tooling, you'll need to have a local copy of the
collab-manager application and Python 3.11 installed.
collab-manager application and Python 3.12 installed.

```bash
git clone https://github.com/DSD-DBS/capella-collab-manager.git

0 comments on commit 68f4304

Please sign in to comment.