Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TEP014] Change name of HDFWriter to HDFWriterMixin #749

Merged
merged 1 commit into from
Jun 22, 2017
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
8 changes: 3 additions & 5 deletions tardis/io/tests/test_HDFWriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from astropy.tests.helper import assert_quantity_allclose
from numpy.testing import assert_almost_equal, assert_array_almost_equal

from tardis.io.util import HDFWriter
from tardis.io.util import HDFWriterMixin


#Test Cases
Expand All @@ -22,9 +22,8 @@
#MultiIndex Object
#Quantity Objects with - Numeric Values, Numpy Arrays, DataFrame, Pandas Series, None objects

class MockHDF(HDFWriter, object):
class MockHDF(HDFWriterMixin):
hdf_properties = ['property']
class_properties = {}

def __init__(self, property):
self.property = property
Expand Down Expand Up @@ -100,9 +99,8 @@ def test_none_write(tmpdir):
# Test class_properties parameter (like homologous_density is a class
# instance/object inside Model class)

class MockClass(HDFWriter, object):
class MockClass(HDFWriterMixin):
hdf_properties = ['property', 'nested_object']
class_properties = {'nested_object': MockHDF}

def __init__(self, property, nested_object):
self.property = property
Expand Down
2 changes: 1 addition & 1 deletion tardis/io/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def check_equality(item1, item2):
return True


class HDFWriter(object):
class HDFWriterMixin(object):

@staticmethod
def to_hdf_util(path_or_buf, path, elements, complevel=9, complib='blosc'):
Expand Down