From 682933a9bf9cc59e72a62eeb855335093b6e7e6c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 01:31:45 +0000 Subject: [PATCH 1/6] Bump codecov/codecov-action from 5 to 6 Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5 to 6. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v5...v6) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index f92b02a..040bda5 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -31,7 +31,7 @@ jobs: run: | pytest --cov=./detl --cov-report xml --cov-report term-missing tests/ - name: Upload coverage - uses: codecov/codecov-action@v5 + uses: codecov/codecov-action@v6 with: file: ./coverage.xml - name: Test Wheel install and import From ca95e9ee7a5070e332c357a6e6efc9e0842f36dc Mon Sep 17 00:00:00 2001 From: Michael Osthege Date: Wed, 15 Apr 2026 19:52:25 +0200 Subject: [PATCH 2/6] Add missing dependency --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 5da331c..34b2477 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ numpy pandas +pytz From 6890675655514e1a792c788c1e0a33a7f973a011 Mon Sep 17 00:00:00 2001 From: Michael Osthege Date: Wed, 15 Apr 2026 19:56:43 +0200 Subject: [PATCH 3/6] Fix pandas 3 compatibility --- detl/parsing/common.py | 2 +- requirements-dev.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/detl/parsing/common.py b/detl/parsing/common.py index 1801691..97a5a0d 100644 --- a/detl/parsing/common.py +++ b/detl/parsing/common.py @@ -158,6 +158,6 @@ def transform_trackdata( if (not new_data.empty) and (not new_data.isnull().all()): transformed_data.loc[:, key] = new_data - transformed_data = transformed_data.fillna(method="ffill") + transformed_data = transformed_data.ffill() return transformed_data diff --git a/requirements-dev.txt b/requirements-dev.txt index 3b349c2..f4f334a 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,4 +1,5 @@ flake8 +pandas>=3.0.0 pytest pytest-cov twine From 5c8b79b89a1b7cc279645a7ef696532a5c134735 Mon Sep 17 00:00:00 2001 From: Michael Osthege Date: Wed, 15 Apr 2026 20:00:51 +0200 Subject: [PATCH 4/6] Move notebooks to ./docs tree --- docs/requirements.txt | 1 - docs/source/01_Basic_Use.nblink | 3 --- docs/source/02_Closest_Point_Lookup.nblink | 3 --- docs/source/conf.py | 1 - docs/source/index.rst | 4 ++-- {notebooks => docs/source/notebooks}/01_Basic_Use.ipynb | 0 .../source/notebooks}/02_Closest_Point_Lookup.ipynb | 0 notebooks/README.md | 5 +++++ 8 files changed, 7 insertions(+), 10 deletions(-) delete mode 100644 docs/source/01_Basic_Use.nblink delete mode 100644 docs/source/02_Closest_Point_Lookup.nblink rename {notebooks => docs/source/notebooks}/01_Basic_Use.ipynb (100%) rename {notebooks => docs/source/notebooks}/02_Closest_Point_Lookup.ipynb (100%) create mode 100644 notebooks/README.md diff --git a/docs/requirements.txt b/docs/requirements.txt index 364ab4a..f608d45 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -2,4 +2,3 @@ sphinx sphinx_rtd_theme numpydoc nbsphinx -nbsphinx_link diff --git a/docs/source/01_Basic_Use.nblink b/docs/source/01_Basic_Use.nblink deleted file mode 100644 index 8f6846e..0000000 --- a/docs/source/01_Basic_Use.nblink +++ /dev/null @@ -1,3 +0,0 @@ -{ - "path": "../../notebooks/01_Basic_Use.ipynb" -} diff --git a/docs/source/02_Closest_Point_Lookup.nblink b/docs/source/02_Closest_Point_Lookup.nblink deleted file mode 100644 index 449fb48..0000000 --- a/docs/source/02_Closest_Point_Lookup.nblink +++ /dev/null @@ -1,3 +0,0 @@ -{ - "path": "../../notebooks/02_Closest_Point_Lookup.ipynb" -} diff --git a/docs/source/conf.py b/docs/source/conf.py index 624f9c1..e3f9c4f 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -37,7 +37,6 @@ "sphinx_rtd_theme", "numpydoc", "nbsphinx", - "nbsphinx_link", ] # Add any paths that contain templates here, relative to this directory. diff --git a/docs/source/index.rst b/docs/source/index.rst index 45a687d..bc2ed66 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -15,8 +15,8 @@ In the following chapters, we introduce the data structures, basic functions and :maxdepth: 2 :caption: Examples - 01_Basic_Use - 02_Closest_Point_Lookup + notebooks/01_Basic_Use + notebooks/02_Closest_Point_Lookup You can find auto-generated API documentation below: diff --git a/notebooks/01_Basic_Use.ipynb b/docs/source/notebooks/01_Basic_Use.ipynb similarity index 100% rename from notebooks/01_Basic_Use.ipynb rename to docs/source/notebooks/01_Basic_Use.ipynb diff --git a/notebooks/02_Closest_Point_Lookup.ipynb b/docs/source/notebooks/02_Closest_Point_Lookup.ipynb similarity index 100% rename from notebooks/02_Closest_Point_Lookup.ipynb rename to docs/source/notebooks/02_Closest_Point_Lookup.ipynb diff --git a/notebooks/README.md b/notebooks/README.md new file mode 100644 index 0000000..f629e89 --- /dev/null +++ b/notebooks/README.md @@ -0,0 +1,5 @@ +# Notebooks Moved + +Visit [docs/source/notebooks](../docs/source/notebooks). + +Or visit https://detl.readthedocs.io. From 41f660a73e5fa7b6d43dad5f4cd7b8a8db6a8c45 Mon Sep 17 00:00:00 2001 From: Michael Osthege Date: Wed, 15 Apr 2026 20:07:54 +0200 Subject: [PATCH 5/6] Modernize package structure and build process --- .github/workflows/pipeline.yml | 6 ++--- .github/workflows/release.yml | 8 +++--- detl/__init__.py | 4 ++- pyproject.toml | 49 ++++++++++++++++++++++++++++++++++ requirements-dev.txt | 2 +- requirements.txt | 3 --- setup.py | 43 ----------------------------- 7 files changed, 60 insertions(+), 55 deletions(-) delete mode 100644 requirements.txt delete mode 100644 setup.py diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 040bda5..fe6381a 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.9", "3.10", "3.11", "3.12"] + python-version: ["3.11", "3.12", "3.13", "3.14"] steps: - uses: actions/checkout@v6 - name: Set up Python ${{ matrix.python-version }} @@ -29,14 +29,14 @@ jobs: flake8 . --count --exit-zero --statistics - name: Run tests run: | - pytest --cov=./detl --cov-report xml --cov-report term-missing tests/ + pytest -v --cov=./detl --cov-report xml --cov-report term-missing tests/ - name: Upload coverage uses: codecov/codecov-action@v6 with: file: ./coverage.xml - name: Test Wheel install and import run: | - python setup.py bdist_wheel + python -m build cd dist pip install detl*.whl python -c "import detl; print(detl.__version__)" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3f2b44d..ea6a4e2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,17 +16,17 @@ jobs: - name: Set up Python uses: actions/setup-python@v6 with: - python-version: 3.9 + python-version: "3.13" - name: Install dependencies run: | pip install -e . - pip install flake8 pytest pytest-cov twine wheel + pip install flake8 pytest pytest-cov twine build - name: Test with pytest run: | - pytest --cov=./detl --cov-report xml --cov-report term-missing tests/ + pytest -v --cov=./detl --cov-report xml --cov-report term-missing tests/ - name: Build package run: | - python setup.py sdist bdist_wheel + python -m build - name: Check version number match run: | echo "GITHUB_REF: ${GITHUB_REF}" diff --git a/detl/__init__.py b/detl/__init__.py index fc6a0c4..40aa602 100644 --- a/detl/__init__.py +++ b/detl/__init__.py @@ -1,7 +1,9 @@ +import importlib.metadata + from . import parsing from .core import DASwareParser, DASwareVersion, DWData -__version__ = "1.1.3" +__version__ = importlib.metadata.version(__package__ or __name__) parsers = { DASwareVersion.V4: parsing.dw4.DASware4Parser, diff --git a/pyproject.toml b/pyproject.toml index 1de3c8b..bf090ad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,54 @@ +[build-system] +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" + +[project] +name = "detl" +version = "1.2.0" +description = "Package for parsing and transforming DASware raw data exports." +readme = "README.md" +requires-python = ">=3.11" +license = "AGPL-3.0-or-later" +authors = [ + {name = "Michael Osthege", email = "m.osthege@fz-juelich.de"}, + {name = "Niklas Tenhaef", email = "n.tenhaef@fz-juelich.de"}, + {name = "Valentin Steier", email = "v.steier@fz-juelich.de"}, +] +classifiers = [ + "Programming Language :: Python", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", + "Intended Audience :: Science/Research", + "Topic :: Scientific/Engineering", +] +dependencies = [ + "numpy", + "pandas", + "pytz", +] + +[project.urls] +Homepage = "https://github.com/jubiotech/detl" +Documentation = "https://detl.readthedocs.io/en/latest/" +Download = "https://pypi.org/project/detl/" + +[tool.setuptools] +package-dir = {"detl" = "detl"} + +[tool.setuptools.package-data] +"detl" = ["py.typed"] + [tool.black] line-length = 100 [tool.isort] profile = "black" + +[tool.mypy] +ignore_missing_imports = true +exclude = [ + 'test_.*?\.py$', +] diff --git a/requirements-dev.txt b/requirements-dev.txt index f4f334a..86b6e83 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,7 +1,7 @@ +build flake8 pandas>=3.0.0 pytest pytest-cov twine -wheel watermark diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 34b2477..0000000 --- a/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -numpy -pandas -pytz diff --git a/setup.py b/setup.py deleted file mode 100644 index 07702c1..0000000 --- a/setup.py +++ /dev/null @@ -1,43 +0,0 @@ -import pathlib - -import setuptools - -__packagename__ = "detl" -ROOT = pathlib.Path(__file__).parent - - -def get_version(): - import os - import re - - VERSIONFILE = os.path.join(__packagename__, "__init__.py") - initfile_lines = open(VERSIONFILE, "rt").readlines() - VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]" - for line in initfile_lines: - mo = re.search(VSRE, line, re.M) - if mo: - return mo.group(1) - raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,)) - - -__version__ = get_version() - - -setuptools.setup( - name=__packagename__, - packages=setuptools.find_packages(), # this must be the same as the name above - version=__version__, - description="Package for parsing and transforming DASware raw data exports.", - url="https://github.com/JuBiotech/detl", - author="IBG-1", - copyright="(c) 2022 Forschungszentrum Jülich GmbH", - license="GNU Affero General Public License v3.0", - classifiers=[ - "Programming Language :: Python", - "Operating System :: OS Independent", - "Programming Language :: Python :: 3.8", - "Intended Audience :: Science/Research", - "License :: OSI Approved :: GNU Affero General Public License v3", - ], - install_requires=open(pathlib.Path(ROOT, "requirements.txt")).readlines(), -) From 86096a95fc1a59f29ed205c1165e7a889517b3b5 Mon Sep 17 00:00:00 2001 From: Michael Osthege Date: Wed, 15 Apr 2026 20:09:20 +0200 Subject: [PATCH 6/6] Auto-update pre-commit hooks --- .pre-commit-config.yaml | 6 +++--- detl/core.py | 1 + tests/test_detl.py | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ae3aadd..9af3eec 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ exclude: testfiles/|\.(csv|ipynb)$ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v6.0.0 hooks: - id: check-merge-conflict - id: check-toml @@ -11,11 +11,11 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/PyCQA/isort - rev: 5.12.0 + rev: 8.0.1 hooks: - id: isort name: isort - repo: https://github.com/psf/black - rev: 23.11.0 + rev: 26.3.1 hooks: - id: black diff --git a/detl/core.py b/detl/core.py index 6744163..0ac2d3f 100644 --- a/detl/core.py +++ b/detl/core.py @@ -1,4 +1,5 @@ """Specifies the base types for parsing and representing DASware data.""" + import abc import enum import pathlib diff --git a/tests/test_detl.py b/tests/test_detl.py index f3f769d..43d1772 100644 --- a/tests/test_detl.py +++ b/tests/test_detl.py @@ -1,4 +1,5 @@ """Contains unit tests for the `detl` package""" + import datetime import pathlib import unittest