Skip to content

Commit

Permalink
Minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
wweijtje committed Oct 4, 2023
1 parent 4ba19c5 commit 4553b5b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
7 changes: 5 additions & 2 deletions sep005_io_fbgs/fbgs.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,18 @@
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



@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
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
6 changes: 4 additions & 2 deletions tests/test_fbgs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand All @@ -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)
assert_sep005(signals)

0 comments on commit 4553b5b

Please sign in to comment.