From dc770290a9d60f15694c7674c22ec98c7058b1f8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 19:07: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 7c4d7c9..9e354db 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -38,7 +38,7 @@ jobs: pip install ${{ matrix.pymc-version }} pytest --cov=./bletl --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 build, install and import From a4f79b5b4183782f269d5dd6ed272578e6f7c71d Mon Sep 17 00:00:00 2001 From: Michael Osthege Date: Wed, 15 Apr 2026 10:07:58 +0200 Subject: [PATCH 2/6] Switch from `fastprogress` to `rich` for progbars --- bletl/features.py | 4 ++-- pyproject.toml | 2 +- requirements.txt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bletl/features.py b/bletl/features.py index 011ac93..b59c601 100644 --- a/bletl/features.py +++ b/bletl/features.py @@ -4,10 +4,10 @@ import time import typing -import fastprogress import numpy import pandas import tsfresh +from rich.progress import track from . import splines from .types import BLData, FilterTimeSeries @@ -416,7 +416,7 @@ def from_bldata( _log.info("Applying custom extractors to %i wells.", len(wells)) s_time = time.time() df_result = pandas.DataFrame(index=wells) - for well in fastprogress.progress_bar(wells): + for well in track(wells): for mname, method in extraction_methods.items(): t, y = bldata[mname.split("__")[0]].get_timeseries(well, last_cycle=last_cycles.get(well)) df_result.loc[well, mname] = method(t, y) diff --git a/pyproject.toml b/pyproject.toml index 3b02f4a..55bef9e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,10 +26,10 @@ classifiers = [ ] dependencies = [ "csaps>=0.11", - "fastprogress", "joblib", "numpy", "pandas", + "rich", "scipy", "tsfresh", "setuptools", diff --git a/requirements.txt b/requirements.txt index b36310d..6837317 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,8 @@ csaps>=0.11 -fastprogress joblib numpy pandas +rich scipy tsfresh setuptools From 1b91d57899c0ce001c49b4de23413c6c327b2b0f Mon Sep 17 00:00:00 2001 From: Michael Osthege Date: Wed, 15 Apr 2026 10:09:04 +0200 Subject: [PATCH 3/6] Update docs build environment --- .readthedocs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 1415ce3..471f497 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -7,9 +7,9 @@ version: 2 # Set the OS, Python version and other tools you might need build: - os: ubuntu-22.04 + os: ubuntu-24.04 tools: - python: "3.11" + python: "3.12" # Build documentation in the docs/ directory with Sphinx sphinx: From 8d28418fae461729c31e1c4893a5cc2bac209d47 Mon Sep 17 00:00:00 2001 From: Michael Osthege Date: Wed, 15 Apr 2026 10:37:06 +0200 Subject: [PATCH 4/6] Autoupdate pre-commit hooks --- .pre-commit-config.yaml | 8 ++++---- bletl/__init__.py | 1 + bletl/core.py | 1 + bletl/heuristics.py | 3 ++- bletl/parsing/bl1.py | 1 + bletl/parsing/blpro.py | 1 + bletl/types.py | 1 + tests/test_core.py | 1 + 8 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index df1831a..d69f121 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ exclude: docs/|\.(csv|zip|json)$ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.2.0 + rev: v6.0.0 hooks: - id: check-merge-conflict - id: check-toml @@ -11,15 +11,15 @@ 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: 22.3.0 + rev: 26.3.1 hooks: - id: black - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.3.0 + rev: v1.20.1 hooks: - id: mypy diff --git a/bletl/__init__.py b/bletl/__init__.py index 7cd5532..035121d 100644 --- a/bletl/__init__.py +++ b/bletl/__init__.py @@ -18,6 +18,7 @@ BioLector files, applying calibration transformations and representing them in a standardized format. """ + import importlib.metadata from . import utils diff --git a/bletl/core.py b/bletl/core.py index a1d074a..52651af 100644 --- a/bletl/core.py +++ b/bletl/core.py @@ -1,4 +1,5 @@ """Specifies the base types for parsing and representing BioLector CSV files.""" + import json import zipfile from collections.abc import Iterable diff --git a/bletl/heuristics.py b/bletl/heuristics.py index 265af41..b2836cb 100644 --- a/bletl/heuristics.py +++ b/bletl/heuristics.py @@ -1,6 +1,7 @@ """ Signal analysis based on simple, deterministic heuristics. """ + import logging import typing @@ -17,7 +18,7 @@ def find_do_peak( threshold_a: float, delay_b: float, threshold_b: float, - initial_delay: float = 1 + initial_delay: float = 1, ) -> typing.Optional[int]: """Finds the index of a DO peak in the inputs [x] and [y]. diff --git a/bletl/parsing/bl1.py b/bletl/parsing/bl1.py index 0fee25e..7498dac 100644 --- a/bletl/parsing/bl1.py +++ b/bletl/parsing/bl1.py @@ -1,4 +1,5 @@ """Parsing functions for the BioLector 1""" + import configparser import datetime import io diff --git a/bletl/parsing/blpro.py b/bletl/parsing/blpro.py index 55279dd..7e699da 100644 --- a/bletl/parsing/blpro.py +++ b/bletl/parsing/blpro.py @@ -1,4 +1,5 @@ """Parsing functions for the BioLector Pro""" + import collections import datetime import io diff --git a/bletl/types.py b/bletl/types.py index 92b70b2..8ec79cc 100644 --- a/bletl/types.py +++ b/bletl/types.py @@ -1,4 +1,5 @@ """Specifies the base types for parsing and representing BioLector CSV files.""" + import abc import enum import os diff --git a/tests/test_core.py b/tests/test_core.py index 625237f..55e379a 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -1,4 +1,5 @@ """Contains unit tests for the `bletl` package""" + import datetime import pathlib From 47726f55e1dc78765e4c2cee352b590079b322b6 Mon Sep 17 00:00:00 2001 From: Michael Osthege Date: Wed, 15 Apr 2026 10:39:48 +0200 Subject: [PATCH 5/6] Drop Python 3.8, 3.9, 3.10 and test 3.11 and 3.14 Reduces CI load by testing only the minimum and maximum Python versions declared in the `pyproject.toml`. --- .github/workflows/pipeline.yml | 6 +++--- pyproject.toml | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 9e354db..47306b3 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.8", "3.10", "3.11", "3.12"] + python-version: ["3.11", "3.14"] pymc-version: ["without", "'pymc>=5.0.0'"] steps: - uses: actions/checkout@v6 @@ -31,12 +31,12 @@ jobs: - name: Test without PyMC if: matrix.pymc-version == 'without' run: | - pytest --cov=./bletl --cov-report xml --cov-report term-missing tests/ + pytest -v --cov=./bletl --cov-report xml --cov-report term-missing tests/ - name: Install and test with PyMC if: matrix.pymc-version != 'without' run: | pip install ${{ matrix.pymc-version }} - pytest --cov=./bletl --cov-report xml --cov-report term-missing tests/ + pytest -v --cov=./bletl --cov-report xml --cov-report term-missing tests/ - name: Upload coverage uses: codecov/codecov-action@v6 with: diff --git a/pyproject.toml b/pyproject.toml index 55bef9e..451f995 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,10 +6,10 @@ build-backend = "setuptools.build_meta" [project] name = "bletl" -version = "1.6.2" +version = "1.7.0" description = "Package for parsing and transforming BioLector raw data." readme = "README.md" -requires-python = ">=3.8" +requires-python = ">=3.11" license = {text = "GNU Affero General Public License v3"} authors = [ {name = "Michael Osthege", email = "m.osthege@fz-juelich.de"}, @@ -17,10 +17,10 @@ authors = [ classifiers = [ "Programming Language :: Python", "Operating System :: OS Independent", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Intended Audience :: Science/Research", "License :: OSI Approved :: GNU Affero General Public License v3", ] From 6b744340f9e3b61a1ae7d4bc3ac406b543e0bab3 Mon Sep 17 00:00:00 2001 From: Michael Osthege Date: Wed, 15 Apr 2026 10:51:06 +0200 Subject: [PATCH 6/6] Fix deprecation warnings and bugs --- bletl/parsing/blpro.py | 4 ++-- tests/test_core.py | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/bletl/parsing/blpro.py b/bletl/parsing/blpro.py index 7e699da..bf06412 100644 --- a/bletl/parsing/blpro.py +++ b/bletl/parsing/blpro.py @@ -563,13 +563,13 @@ def search_for_lot(calibration_file, lot_number): return element element = search_for_lot(calibration_file, lot_number) - if not element: + if element is None or len(element) == 0: if not utils.download_calibration_data(): return None else: element = search_for_lot(calibration_file, lot_number) - if not element: + if element is None or len(element) == 0: raise InvalidLotNumberError( "Latest calibration information was downloaded from m2p-labs, " f"but the provided lot number/temperature combination (lot_number={lot_number}, temp={temp}) could not be found. " diff --git a/tests/test_core.py b/tests/test_core.py index 55e379a..02846df 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -286,7 +286,7 @@ def test_get_unified_dataframe(self): idx = unified_df.index.get_indexer([5], method="nearest") col = unified_df.columns.get_indexer(["A05"]) values = unified_df.iloc[idx, col].to_numpy() - numpy.testing.assert_approx_equal(values, 63.8517, significant=6) + numpy.testing.assert_approx_equal(values[0, 0], 63.8517, significant=6) def test_get_narrow_data(self): fp = pathlib.Path( @@ -673,12 +673,12 @@ def test_issue_38(self): assert bldata.module.index.names == ["well", "valve", "cycle"] assert bldata.valves.index.names == ["well", "valve", "cycle"] # Check some initial and final well volumes against values shown in the BioLection - assert bldata.fluidics.loc["C01", "volume"][0] == 800 - assert bldata.fluidics.loc["C01", "volume"][-1] == 1201.776 - assert bldata.fluidics.loc["D01", "volume"][-1] == 1204.892 - assert bldata.fluidics.loc["D02", "volume"][-1] == 954.68 - assert bldata.fluidics.loc["E06", "volume"][-1] == 913.16 - assert bldata.fluidics.loc["F01", "volume"][-1] == 1202.719 + assert bldata.fluidics.loc["C01", "volume"].values[0] == 800 + assert bldata.fluidics.loc["C01", "volume"].values[-1] == 1201.776 + assert bldata.fluidics.loc["D01", "volume"].values[-1] == 1204.892 + assert bldata.fluidics.loc["D02", "volume"].values[-1] == 954.68 + assert bldata.fluidics.loc["E06", "volume"].values[-1] == 913.16 + assert bldata.fluidics.loc["F01", "volume"].values[-1] == 1202.719 pass def test_fluidics_source(self):