Skip to content

Commit

Permalink
Merge pull request #749 from vg3095/rename_HDFWriter
Browse files Browse the repository at this point in the history
[TEP014] Change name of HDFWriter to HDFWriterMixin
wkerzendorf authored Jun 22, 2017

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents b537878 + f4935f5 commit 4d5a5ae
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions tardis/io/tests/test_HDFWriter.py
Original file line number Diff line number Diff line change
@@ -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
@@ -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
@@ -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
2 changes: 1 addition & 1 deletion tardis/io/util.py
Original file line number Diff line number Diff line change
@@ -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'):

0 comments on commit 4d5a5ae

Please sign in to comment.