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

Proposal for a new to HD5 function. #286

Merged
merged 3 commits into from
Apr 1, 2015

Conversation

mklauser
Copy link
Contributor

@mklauser mklauser commented Apr 1, 2015

No description provided.

@landscape-bot
Copy link

Code Health
Repository health decreased by 0.61% when pulling fb7b9a1 on mklauser:new_to_hdf5 into 35a0119 on tardis-sn:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.11%) to 55.01% when pulling fb7b9a1 on mklauser:new_to_hdf5 into 35a0119 on tardis-sn:master.

else:
logger.critical('Can not save %s', str(os.path.join(path, key, keykey)))
except:
logger.critical('Ex Can not save %s', str(os.path.join(path, key)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does Ex can not save mean?

@wkerzendorf
Copy link
Member

@mklauser That looks nice! So I guess the information that is saved is currently hardcoded. Maybe later in the next PR we can introduce some options.

@@ -412,6 +412,36 @@ def save_spectra(self, fname):


def to_hdf5(self, buffer_or_fname, path='', close_h5=True):

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe a little documentation (I realize there was none there before) would help

"""
This allows the model to be written to an HDF5 file for later analysis

Parameters
----------------

    buffer_or_fname: buffer or ~str
        buffer or filename for HDF5 file (see pandas.HDFStore for description)
    path: ~str, optional
        path in the HDF5 file
    close_h5: ~bool
        close the HDF5 file or not. 

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.11%) to 55.01% when pulling 81e16ac on mklauser:new_to_hdf5 into 35a0119 on tardis-sn:master.

are specified hard coded in include_from_model_in_hdf5. This is a dict where the key corresponds to the
name of the property and the value describes the type. If the value is None the property can be dumped
to hdf via its attribute to_hdf or by converting it to a pd.DataFrame. For more complex properties
which can not simply be dumped tp an hdf file the dict can contain a function which is called with
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tp->to

@landscape-bot
Copy link

Code Health
Repository health decreased by 0.59% when pulling 2f4ac24 on mklauser:new_to_hdf5 into 35a0119 on tardis-sn:master.

1 similar comment
@landscape-bot
Copy link

Code Health
Repository health decreased by 0.59% when pulling 2f4ac24 on mklauser:new_to_hdf5 into 35a0119 on tardis-sn:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.11%) to 55.01% when pulling 2f4ac24 on mklauser:new_to_hdf5 into 35a0119 on tardis-sn:master.

wkerzendorf added a commit that referenced this pull request Apr 1, 2015
Proposal for a new to HD5 function.
@wkerzendorf wkerzendorf merged commit 2b6182e into tardis-sn:master Apr 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants