From 5aa71e5518878b3703a886a137e6789c5e160b73 Mon Sep 17 00:00:00 2001 From: Tobias Klockau Date: Mon, 21 Oct 2024 09:09:52 +0200 Subject: [PATCH 01/11] docs: add changelog for 3.2 --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index de51d10..b4c54d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -83,3 +83,9 @@ 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 \ No newline at end of file From a13188aa03adb981dac708858db53b949e37147f Mon Sep 17 00:00:00 2001 From: Tobias Klockau Date: Mon, 21 Oct 2024 16:25:48 +0200 Subject: [PATCH 02/11] chore: update all pre-commit dependencies --- .pre-commit-config.yaml | 14 +++++++------- CHANGELOG.md | 2 +- raillabel/filter/_filter_classes/__init__.py | 2 +- raillabel/format/raillabel/_object_annotation.py | 2 +- raillabel/load_/loader_classes/__init__.py | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a4b7502..7a75088 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,28 @@ 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 + rev: v1.7.5 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 +90,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 b4c54d2..68f8695 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -88,4 +88,4 @@ Release - Introduce support for Python 3.12 ### 3.2.1 -- Fix bug related to Python 3.12 \ No newline at end of file +- Fix bug related to Python 3.12 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}") From 61fa17e9cdbcab6c508c110c09800c8d88e1c9a8 Mon Sep 17 00:00:00 2001 From: Tobias Klockau Date: Mon, 21 Oct 2024 16:32:53 +0200 Subject: [PATCH 03/11] chore: add support for python 3.13 --- .github/workflows/build-test-publish.yml | 4 +++- pyproject.toml | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-test-publish.yml b/.github/workflows/build-test-publish.yml index b596c92..1942a2d 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}} diff --git a/pyproject.toml b/pyproject.toml index 7016f88..8e46039 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" }, @@ -181,7 +181,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 From 47d2b1be0924d872b75e12e1dbc256fe7b77ad4f Mon Sep 17 00:00:00 2001 From: Tobias Klockau Date: Mon, 21 Oct 2024 16:39:28 +0200 Subject: [PATCH 04/11] fix: update github action --- .github/workflows/build-test-publish.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-test-publish.yml b/.github/workflows/build-test-publish.yml index 1942a2d..d033b3a 100644 --- a/.github/workflows/build-test-publish.yml +++ b/.github/workflows/build-test-publish.yml @@ -55,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 @@ -71,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/*' From cbc360570cbdbe7b9fb491386f4edfa1c8393c46 Mon Sep 17 00:00:00 2001 From: Tobias Klockau Date: Mon, 21 Oct 2024 16:44:05 +0200 Subject: [PATCH 05/11] fix: pipeline fail due to black versioning --- pyproject.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 8e46039..e4b42b5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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.*"] From a9664617cd94432a8899ba1911b1f3a1faf1f364 Mon Sep 17 00:00:00 2001 From: Tobias Klockau Date: Mon, 21 Oct 2024 16:48:19 +0200 Subject: [PATCH 06/11] fix: fix pipeline version error --- .github/workflows/lint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 4cddd7d..5321d78 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 with: - python-version: "3.8" + python-version: "3.12" - name: Upgrade pip run: |- python -m pip install -U pip @@ -30,7 +30,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 with: - python-version: "3.8" + python-version: "3.12" - name: Upgrade pip run: |- python -m pip install -U pip From 6fcaf4fca8aa4d99dd060541c4ca0099d3de926e Mon Sep 17 00:00:00 2001 From: Tobias Klockau Date: Mon, 21 Oct 2024 16:51:56 +0200 Subject: [PATCH 07/11] fix: pipeline versioning --- .github/workflows/docs.yml | 4 ++-- .github/workflows/lint.yml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) 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 5321d78..e0a441e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -11,8 +11,8 @@ 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.12" - name: Upgrade pip @@ -27,8 +27,8 @@ 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.12" - name: Upgrade pip From 1528e9ceb3396210f7414832cdea65542281b646 Mon Sep 17 00:00:00 2001 From: Tobias Klockau Date: Mon, 21 Oct 2024 16:55:01 +0200 Subject: [PATCH 08/11] fix: downgrade docformatter --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7a75088..f7bba21 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -34,7 +34,7 @@ repos: hooks: - id: isort - repo: https://github.com/PyCQA/docformatter - rev: v1.7.5 + rev: v1.5.0 hooks: - id: docformatter additional_dependencies: From 08927f32f6c6abf949221b6d2f3b4f228528773c Mon Sep 17 00:00:00 2001 From: Tobias Klockau Date: Mon, 21 Oct 2024 16:57:21 +0200 Subject: [PATCH 09/11] fix: remove docformatter additional dependencies --- .pre-commit-config.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f7bba21..d61d3f0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -37,8 +37,6 @@ repos: rev: v1.5.0 hooks: - id: docformatter - additional_dependencies: - - docformatter[tomli] - repo: https://github.com/PyCQA/pydocstyle rev: 6.3.0 hooks: From 378ea8b5db8b7cc804192fac2dd9fff7d67c7cb0 Mon Sep 17 00:00:00 2001 From: Tobias Klockau Date: Mon, 21 Oct 2024 17:14:53 +0200 Subject: [PATCH 10/11] fix: remove docformatter --- .pre-commit-config.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d61d3f0..5e2a002 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -33,10 +33,6 @@ repos: rev: 5.13.2 hooks: - id: isort - - repo: https://github.com/PyCQA/docformatter - rev: v1.5.0 - hooks: - - id: docformatter - repo: https://github.com/PyCQA/pydocstyle rev: 6.3.0 hooks: From d0a2c50dafda551c9d33444e98e99bda15c75304 Mon Sep 17 00:00:00 2001 From: Tobias Klockau Date: Mon, 21 Oct 2024 17:20:23 +0200 Subject: [PATCH 11/11] docs: update CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 68f8695..b66ad8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -89,3 +89,6 @@ Release ### 3.2.1 - Fix bug related to Python 3.12 + +## 3.3.0 +- Introduce support for Python 3.13