From 4553b5bd6585719ad290ccedb75ebc5817ed3636 Mon Sep 17 00:00:00 2001 From: wweijtje <85878088+wweijtje@users.noreply.github.com> Date: Wed, 4 Oct 2023 12:01:22 +0200 Subject: [PATCH] Minor tweaks --- sep005_io_fbgs/fbgs.py | 7 +++++-- setup.py | 2 +- tests/test_fbgs.py | 6 ++++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/sep005_io_fbgs/fbgs.py b/sep005_io_fbgs/fbgs.py index f92debb..83929bb 100644 --- a/sep005_io_fbgs/fbgs.py +++ b/sep005_io_fbgs/fbgs.py @@ -12,7 +12,10 @@ class FBG(object): def __init__(self, channels:list, error_status=None): - self.channels = channels + """ + Initialize a FBG reader object + """ + self.channels = channels # SEP005 compliant channel objects self.error_status = None @@ -20,7 +23,7 @@ def __init__(self, channels:list, error_status=None): @classmethod def from_df(cls, df:pd.DataFrame, mode='engineering_units', dt_format='%Y-%m-%dT%H:%M:%S%z'): """ - + Import FBGS data from a dataframe """ if mode == 'engineering_units' or mode == 'eu': pass # do Nothing diff --git a/setup.py b/setup.py index 89a21de..d39e873 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ if __name__ == '__main__': setup( name='sep005_io_fbgs', - description='TDMS file read functions compliant with SDyPy SEP005', + description='FBGS file read functions compliant with SDyPy SEP005', long_description=readme, license='MIT license', url='https://github.com/OWI-Lab', diff --git a/tests/test_fbgs.py b/tests/test_fbgs.py index d0af331..21f704a 100644 --- a/tests/test_fbgs.py +++ b/tests/test_fbgs.py @@ -3,12 +3,13 @@ import pytest from sdypy_sep005.sep005 import assert_sep005 -from sep005_io_fbgs.fbgs import read_fbgs +from sep005_io_fbgs import read_fbgs current_dir = os.path.dirname(os.path.abspath(__file__)) static_dir = os.path.join(current_dir, 'static') GOOD_FILES = os.listdir(os.path.join(static_dir, 'good')) + @pytest.mark.parametrize("filename", GOOD_FILES) def test_compliance_sep005(filename): """ @@ -18,4 +19,5 @@ def test_compliance_sep005(filename): signals = read_fbgs(file_path) # should already not crash here assert len(signals) != 0 # Not an empty response - assert_sep005(signals) \ No newline at end of file + assert_sep005(signals) +