Skip to content

Commit

Permalink
Add docs for hdf5 contrib module.
Browse files Browse the repository at this point in the history
  • Loading branch information
riga committed Jun 8, 2018
1 parent 889fa8e commit ccc49ea
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
13 changes: 13 additions & 0 deletions docs/contrib/hdf5.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
hdf5
====

.. automodule:: law.contrib.hdf5

.. contents::


Class ``H5pyFormatter``
^^^^^^^^^^^^^^^^^^^^^^^

.. autoclass:: H5pyFormatter
:members:
1 change: 1 addition & 0 deletions docs/contrib/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ To use on of the following packages in your code, you must import them explicitl
dropbox
git
glite
hdf5
htcondor
keras
lsf
Expand Down
5 changes: 3 additions & 2 deletions law/contrib/hdf5/formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
HDF5 target formatters.
"""


from law.target.formatter import Formatter
from law.target.file import get_path

Expand All @@ -21,10 +22,10 @@ def accepts(cls, path):
def load(cls, path, *args, **kwargs):
import h5py

return h5py.File(get_path(path), 'r', *args, **kwargs)
return h5py.File(get_path(path), "r", *args, **kwargs)

@classmethod
def dump(cls, path, *args, **kwargs):
import h5py

return h5py.File(get_path(path), 'w', *args, **kwargs)
return h5py.File(get_path(path), "w", *args, **kwargs)

0 comments on commit ccc49ea

Please sign in to comment.