Skip to content

Commit 1dc2364

Browse files
authored
Python 3.13 support (#496)
* Update Python version to 3.13 in devcontainer * enable py3.13 * update dockerfile * lint
1 parent 4f722fb commit 1dc2364

File tree

5 files changed

+452
-37
lines changed

5 files changed

+452
-37
lines changed

.devcontainer/Dockerfile

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,28 @@
1-
ARG PYTHON_VERSION=3.12
1+
ARG PYTHON_VERSION=3.13
22
ARG LINUX_DISTRO=bookworm
33

44
FROM mcr.microsoft.com/devcontainers/python:1-${PYTHON_VERSION}-${LINUX_DISTRO}
55

66
# Install git for nox pre-commit
77
RUN apt-get update \
8-
&& apt-get install -y --no-install-recommends \
9-
git \
8+
&& apt-get install -y --no-install-recommends \
9+
git \
1010
&& rm -rf /var/lib/apt/lists/*
1111

12-
# Poetry
13-
ARG POETRY_VERSION="2.1.2"
14-
RUN if [ "${POETRY_VERSION}" != "none" ]; then bash -c "umask 0002 && pip3 install poetry==${POETRY_VERSION}"; fi
12+
# Install UV dependency manager
13+
ARG UV_VERSION="0.6.11"
14+
RUN if [ "${UV_VERSION}" != "none" ]; then bash -c "umask 0002 && pip3 install uv==${UV_VERSION}"; fi
1515

16-
# Nox
16+
# Nox installation using UV (system-level tool)
1717
ARG NOX_VERSION="2025.2.9"
18-
RUN if [ "${NOX_VERSION}" != "none" ]; then bash -c "umask 0002 && pip3 install nox-poetry nox==${NOX_VERSION}"; fi
18+
RUN if [ "${NOX_VERSION}" != "none" ]; then bash -c "umask 0002 && uv tool install nox==${NOX_VERSION}"; fi
1919

20-
# Nox poetry
21-
ARG NOX_POETRY_VERSION="1.2.0"
22-
RUN if [ "${NOX_POETRY_VERSION}" != "none" ]; then bash -c "umask 0002 && pip3 install nox-poetry nox-poetry==${NOX_POETRY_VERSION}"; fi
20+
# Extra python packages for dev (global/system-level)
21+
RUN bash -c "umask 0002 && uv tool install msgpack ipykernel"
2322

24-
# Extra python packages for dev
25-
RUN bash -c "umask 0002 && pip3 install msgpack ipykernel"
26-
27-
# Create venv
28-
RUN python -m venv /opt/venv
29-
RUN poetry config virtualenvs.create false
23+
# Create virtual environment
24+
RUN uv venv /opt/venv
3025
ENV PATH="/opt/venv/bin:$PATH"
3126

32-
# Extra python packages for dev
33-
RUN bash -c "umask 0002 && pip3 install msgpack ipykernel"
34-
3527
# Allow users to update venv
3628
RUN chmod -R 777 /opt/venv

.github/workflows/tests.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,24 @@ jobs:
1212
fail-fast: false
1313
matrix:
1414
include:
15-
- { python: "3.12", os: "ubuntu-latest", session: "pre-commit" }
16-
- { python: "3.12", os: "ubuntu-latest", session: "safety" }
15+
- { python: "3.13", os: "ubuntu-latest", session: "pre-commit" }
16+
- { python: "3.13", os: "ubuntu-latest", session: "safety" }
17+
# - { python: "3.13", os: "ubuntu-latest", session: "mypy" }
1718
# - { python: "3.12", os: "ubuntu-latest", session: "mypy" }
1819
# - { python: "3.11", os: "ubuntu-latest", session: "mypy" }
1920
# - { python: "3.10", os: "ubuntu-latest", session: "mypy" }
21+
- { python: "3.13", os: "ubuntu-latest", session: "tests" }
2022
- { python: "3.12", os: "ubuntu-latest", session: "tests" }
2123
- { python: "3.11", os: "ubuntu-latest", session: "tests" }
2224
- { python: "3.10", os: "ubuntu-latest", session: "tests" }
23-
- { python: "3.12", os: "windows-latest", session: "tests" }
24-
- { python: "3.12", os: "macos-latest", session: "tests" }
25+
- { python: "3.13", os: "windows-latest", session: "tests" }
26+
- { python: "3.13", os: "macos-latest", session: "tests" }
27+
# - { python: "3.13", os: "ubuntu-latest", session: "typeguard" }
2528
# - { python: "3.12", os: "ubuntu-latest", session: "typeguard" }
2629
# - { python: "3.11", os: "ubuntu-latest", session: "typeguard" }
2730
# - { python: "3.10", os: "ubuntu-latest", session: "typeguard" }
28-
# - { python: "3.10", os: "ubuntu-latest", session: "xdoctest" }
29-
- { python: "3.12", os: "ubuntu-latest", session: "docs-build" }
31+
# - { python: "3.13", os: "ubuntu-latest", session: "xdoctest" }
32+
- { python: "3.13", os: "ubuntu-latest", session: "docs-build" }
3033

3134
env:
3235
NOXSESSION: ${{ matrix.session }}
@@ -107,7 +110,7 @@ jobs:
107110
- name: Install the pinned version of uv
108111
uses: astral-sh/setup-uv@v5
109112
with:
110-
python-version: 3.12
113+
python-version: 3.13
111114
pyproject-file: "${{ github.workspace }}/pyproject.toml"
112115

113116
- name: Install Nox

noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
raise SystemExit(dedent(message)) from None
2323

2424
package = "mdio"
25-
python_versions = ["3.12", "3.11", "3.10"]
25+
python_versions = ["3.13", "3.12", "3.11", "3.10"]
2626
nox.needs_version = ">=2025.2.9"
2727
nox.options.default_venv_backend = "uv"
2828
nox.options.sessions = (

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "multidimio"
33
version = "0.8.5"
44
description = "Cloud-native, scalable, and user-friendly multi dimensional energy data!"
55
authors = [{ name = "Altay Sansal", email = "altay.sansal@tgs.com" }]
6-
requires-python = ">=3.10,<3.13"
6+
requires-python = ">=3.10,<3.14"
77
readme = "README.md"
88
license = { "text" = "Apache-2.0" }
99
keywords = [
@@ -18,6 +18,7 @@ classifiers = [
1818
"Programming Language :: Python :: 3.10",
1919
"Programming Language :: Python :: 3.11",
2020
"Programming Language :: Python :: 3.12",
21+
"Programming Language :: Python :: 3.13",
2122
"License :: OSI Approved :: Apache Software License",
2223
"Development Status :: 4 - Beta"
2324
]
@@ -30,7 +31,7 @@ dependencies = [
3031
"tqdm (>=4.67.0,<5.0.0)",
3132
"psutil (>=6.1.0,<7.0.0)",
3233
"fsspec (>=2024.10.0)",
33-
"segy (>=0.3.1,<0.5.0)",
34+
"segy (>=0.4.0,<0.5.0)",
3435
"rich (>=13.9.4,<14.0.0)",
3536
]
3637

0 commit comments

Comments
 (0)