diff --git a/.github/workflows/build-test-publish.yml b/.github/workflows/build-test-publish.yml index b596c92..d033b3a 100644 --- a/.github/workflows/build-test-publish.yml +++ b/.github/workflows/build-test-publish.yml @@ -22,9 +22,11 @@ jobs: - "3.9" - "3.10" - "3.11" + - "3.12" + - "3.13" include: - os: windows-latest - python_version: "3.8" + python_version: "3.13" steps: - uses: actions/checkout@v2 - name: Set up Python ${{matrix.python_version}} @@ -53,11 +55,11 @@ jobs: runs-on: ubuntu-latest needs: test steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: - python-version: "3.8" + python-version: "3.12" - name: Install dependencies run: |- python -m pip install -U pip @@ -69,7 +71,7 @@ jobs: run: |- python -m twine check dist/* - name: Upload artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: Artifacts path: 'dist/*' diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 612c67a..1f0b2a2 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -13,10 +13,10 @@ jobs: permissions: contents: write steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v4 with: python-version: "3.8" - name: Upgrade pip diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 4cddd7d..e0a441e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -11,10 +11,10 @@ jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 with: - python-version: "3.8" + python-version: "3.12" - name: Upgrade pip run: |- python -m pip install -U pip @@ -27,10 +27,10 @@ jobs: pylint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 with: - python-version: "3.8" + python-version: "3.12" - name: Upgrade pip run: |- python -m pip install -U pip diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a4b7502..5e2a002 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ default_install_hook_types: [commit-msg, pre-commit] default_stages: [commit, merge-commit] repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.2.0 + rev: v5.0.0 hooks: - id: check-added-large-files - id: check-ast @@ -26,28 +26,22 @@ repos: - id: fix-byte-order-marker - id: trailing-whitespace - repo: https://github.com/psf/black - rev: 22.3.0 + rev: 24.10.0 hooks: - id: black - repo: https://github.com/PyCQA/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort - - repo: https://github.com/PyCQA/docformatter - rev: v1.5.0 - hooks: - - id: docformatter - additional_dependencies: - - docformatter[tomli] - repo: https://github.com/PyCQA/pydocstyle - rev: 6.1.1 + rev: 6.3.0 hooks: - id: pydocstyle exclude: '^tests/' additional_dependencies: - pydocstyle[toml] - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.1.13 + rev: v1.5.5 hooks: - id: insert-license name: Insert license headers (shell-style comments) @@ -90,7 +84,7 @@ repos: - --comment-style - '..| |' - repo: https://github.com/fsfe/reuse-tool - rev: v1.0.0 + rev: v4.0.3 hooks: - id: reuse - repo: https://github.com/qoomon/git-conventional-commits diff --git a/CHANGELOG.md b/CHANGELOG.md index de51d10..b66ad8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -83,3 +83,12 @@ Release ## 3.1.0 - ```LoaderUnderstandAi``` now includes warnings for duplicate annotation id and duplicate frame id - ```LoaderRaillabel``` now includes a warniing for duplicate frame id + +## 3.2.0 +- Introduce support for Python 3.12 + +### 3.2.1 +- Fix bug related to Python 3.12 + +## 3.3.0 +- Introduce support for Python 3.13 diff --git a/pyproject.toml b/pyproject.toml index 7016f88..e4b42b5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ dynamic = ["version"] name = "raillabel" description = "A devkit for working with recorded and annotated train ride data from Deutsche Bahn." readme = "README.md" -requires-python = ">=3.8, <3.13" +requires-python = ">=3.8, <3.14" license = { text = "Apache-2.0" } authors = [ { name = "DB InfraGO AG" }, @@ -32,6 +32,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", ] dependencies = [ "jsonschema>=4.4.0", @@ -58,7 +59,7 @@ test = [ [tool.black] line-length = 100 -target-version = ["py38"] +target-version = ["py312"] force-exclude = "tests/" [tool.docformatter] @@ -75,7 +76,7 @@ no_implicit_optional = true show_error_codes = true warn_redundant_casts = true warn_unreachable = true -python_version = "3.8" +python_version = "3.12" [[tool.mypy.overrides]] module = ["tests.*"] @@ -181,7 +182,7 @@ zip-safe = false "*" = ["py.typed"] [tool.setuptools.packages.find] -exclude = ["LICENSES"] +exclude = ["LICENSES", "docs/*", "tests/*"] [tool.setuptools_scm] # This section must exist for setuptools_scm to work diff --git a/raillabel/filter/_filter_classes/__init__.py b/raillabel/filter/_filter_classes/__init__.py index a47563f..190e8a8 100644 --- a/raillabel/filter/_filter_classes/__init__.py +++ b/raillabel/filter/_filter_classes/__init__.py @@ -9,7 +9,7 @@ # iterate through the modules in the current package package_dir = str(Path(__file__).resolve().parent) -for (_, module_name, _) in iter_modules([package_dir]): +for _, module_name, _ in iter_modules([package_dir]): # import the module and iterate through its attributes module = import_module(f"{__name__}.{module_name}") diff --git a/raillabel/format/raillabel/_object_annotation.py b/raillabel/format/raillabel/_object_annotation.py index 3061d5a..ec49797 100644 --- a/raillabel/format/raillabel/_object_annotation.py +++ b/raillabel/format/raillabel/_object_annotation.py @@ -157,7 +157,7 @@ def _collect_annotation_classes(): global ANNOTATION_CLASSES package_dir = str(Path(__file__).resolve().parent) - for (_, module_name, _) in iter_modules([package_dir]): + for _, module_name, _ in iter_modules([package_dir]): module = import_module(f"raillabel.format.raillabel.{module_name}") for attribute_name in dir(module): diff --git a/raillabel/load_/loader_classes/__init__.py b/raillabel/load_/loader_classes/__init__.py index a47563f..190e8a8 100644 --- a/raillabel/load_/loader_classes/__init__.py +++ b/raillabel/load_/loader_classes/__init__.py @@ -9,7 +9,7 @@ # iterate through the modules in the current package package_dir = str(Path(__file__).resolve().parent) -for (_, module_name, _) in iter_modules([package_dir]): +for _, module_name, _ in iter_modules([package_dir]): # import the module and iterate through its attributes module = import_module(f"{__name__}.{module_name}")