Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ version = "1.7.0"
description = "Package for parsing and transforming BioLector raw data."
readme = "README.md"
requires-python = ">=3.11"
license = {text = "GNU Affero General Public License v3"}
license = "AGPL-3.0-or-later"
authors = [
{name = "Michael Osthege", email = "m.osthege@fz-juelich.de"},
]
Expand All @@ -22,7 +22,6 @@ classifiers = [
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU Affero General Public License v3",
]
dependencies = [
"csaps>=0.11",
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
calibr8
codecov
flake8
pandas>=2.0.0
pandas>=3.0.0
pytest
pytest-cov
twine
Expand Down
19 changes: 13 additions & 6 deletions tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import datetime
import pathlib
import warnings

import numpy
import pandas
Expand Down Expand Up @@ -174,7 +175,8 @@ def test_splitting(self, fp):

@pytest.mark.parametrize("fp", BL1_files)
def test_parsing(self, fp):
data = bletl.parse(fp)
with warnings.catch_warnings(category=UserWarning, action="ignore"):
data = bletl.parse(fp)

assert isinstance(data.model, core.BioLectorModel)
assert data.model == core.BioLectorModel.BL1
Expand All @@ -189,7 +191,8 @@ def test_parsing(self, fp):

def test_concat_parsing(self):
filepaths = BL1_fragment_files
data = bletl.parse(filepaths)
with warnings.catch_warnings(category=UserWarning, action="ignore"):
data = bletl.parse(filepaths)
assert isinstance(data.metadata, dict)
assert isinstance(data.environment, pandas.DataFrame)
assert isinstance(data.comments, pandas.DataFrame)
Expand All @@ -199,10 +202,12 @@ def test_concat_parsing(self):

def test_incomplete_cycle_drop(self):
filepath = BL1_files[2]
data = bletl.parse(filepath, drop_incomplete_cycles=False)
with warnings.catch_warnings(category=UserWarning, action="ignore"):
data = bletl.parse(filepath, drop_incomplete_cycles=False)
assert data.measurements.index[-1] == (3, 179, "C08")

data = bletl.parse(filepath, drop_incomplete_cycles=True)
with warnings.catch_warnings(category=UserWarning, action="ignore"):
data = bletl.parse(filepath, drop_incomplete_cycles=True)
assert data.measurements.index[-1] == (3, 178, "F01")
return

Expand Down Expand Up @@ -457,7 +462,8 @@ def test_parse_metadata_data(self, fp):

@pytest.mark.parametrize("fp", BLPro_files)
def test_parsing(self, fp):
data = bletl.parse(fp)
with warnings.catch_warnings(category=UserWarning, action="ignore"):
data = bletl.parse(fp)
assert isinstance(data, dict)
return

Expand Down Expand Up @@ -519,7 +525,8 @@ def test_refoverld_issue12(self):
pass

def test_issue24(self):
bldata = bletl.parse(dir_testfiles / "BLPro" / "issue24.csv")
with pytest.warns(UserWarning, match="Dropped 192 measurement rows.*?REFOVERLD"):
bldata = bletl.parse(dir_testfiles / "BLPro" / "issue24.csv")
assert "BS1" in bldata
assert "BS3" in bldata
assert "pH" in bldata
Expand Down
Loading