Skip to content

Commit

Permalink
Move to just Python 3.12 (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherSpelt authored Oct 9, 2024
2 parents 03bfe64 + c044667 commit 52d0a81
Show file tree
Hide file tree
Showing 7 changed files with 249 additions and 238 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Project Dev",
"image": "mcr.microsoft.com/devcontainers/python:3.11",
"image": "mcr.microsoft.com/devcontainers/python:3.12",
"containerEnv": {
"DEVCONTAINER": "1",
"PYTHONASYNCIODEBUG": "1",
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ env:
POETRY_CACHE_DIR: ~/.cache/pypoetry
PIPX_BIN_DIR: /usr/local/bin
IMAGE_NAME: ${{ github.repository }}
PYTHON_VERSION: "3.11"
PYTHON_VERSION: "3.12"

jobs:
lint:
Expand Down Expand Up @@ -126,7 +126,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"] # When using ACT only use ["3.11"]
python-version: ["3.12"] # When using ACT only use ["3.12"]

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -184,7 +184,7 @@ jobs:
run: poetry run coverage html

- name: Upload code coverage report
if: matrix.python-version == '3.11'
if: matrix.python-version == '3.12'
uses: actions/upload-artifact@v3
with:
name: codecoverage-${{ github.sha }}
Expand All @@ -196,7 +196,7 @@ jobs:
run: poetry run coverage xml

- name: SonarCloud Scan
if: matrix.python-version == '3.11' && github.actor != 'dependabot[bot]' && !env.ACT
if: matrix.python-version == '3.12' && github.actor != 'dependabot[bot]' && !env.ACT
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG PYTHON_VERSION=3.11.7-slim
ARG PYTHON_VERSION=3.12.7-slim
ARG NVM_VERSION=0.40.0

FROM --platform=$BUILDPLATFORM python:${PYTHON_VERSION} AS project-base
Expand Down
3 changes: 1 addition & 2 deletions amt/services/storage.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
from abc import ABC, abstractmethod
from pathlib import Path
from typing import Any, TypedDict
from typing import Any, TypedDict, Unpack

import yaml
import yaml_include
from typing_extensions import Unpack
from yaml import dump

from amt.core.exceptions import AMTKeyError, AMTValueError
Expand Down
460 changes: 235 additions & 225 deletions poetry.lock

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ packages = [


[tool.poetry.dependencies]
python = "^3.10"
python = "^3.12"
fastapi = "^0.115.0"
alembic = "^1.13.2"
pydantic = "^2.9.2"
Expand All @@ -39,6 +39,7 @@ fastapi-csrf-protect = "^0.3.4"
sqlalchemy = "^2.0.35"
sqlalchemy-utils = "^0.41.2"
djlint = "^1.35.2"
liccheck = "^0.9.2"


[tool.poetry.group.test.dependencies]
Expand All @@ -53,6 +54,7 @@ ruff = "^0.6.7"
pre-commit = "^3.8.0"
pyright = "^1.1.381"
liccheck = "^0.9.2"
setuptools = "^75.1.0"
types-pyyaml = "^6.0.12.20240917"


Expand All @@ -66,7 +68,7 @@ build-backend = "poetry.core.masonry.api"
# Ruff settings: https://docs.astral.sh/ruff/configuration/
[tool.ruff]
line-length = 120
target-version = "py311"
target-version = "py312"
src = ["amt","tests"]
exclude = ["amt/migrations"]

Expand All @@ -86,7 +88,7 @@ ignore = ["TRY003", "ANN101"]
max-complexity = 8

[tool.pyright]
pythonVersion = "3.11"
pythonVersion = "3.12"
typeCheckingMode = "strict"
reportMissingImports = true
reportMissingTypeStubs = true
Expand Down
4 changes: 2 additions & 2 deletions trivy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ scan:
- misconfig
- secret

vulnerability:
type:
pkg:
types:
- library
- os
ignore-unfixed: true

0 comments on commit 52d0a81

Please sign in to comment.