Skip to content

Commit

Permalink
Some minor documentation fixes. (#745)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdice committed Jun 14, 2022
1 parent 9d25b32 commit cc4f78c
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 14 deletions.
1 change: 0 additions & 1 deletion doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ The Project
Project.fn
Project.groupby
Project.import_from
Project.id
Project.isfile
Project.min_len_unique_id
Project.num_jobs
Expand Down
3 changes: 2 additions & 1 deletion signac/contrib/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,8 @@ def open(self):
.. code-block:: python
with project.open_job(my_statepoint) as job:
# manipulate your job data
# Manipulate your job data
pass
Opening the context will switch into the job's workspace,
leaving it will switch back to the previous working directory.
Expand Down
5 changes: 5 additions & 0 deletions signac/core/dict_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ class DictManager:
This class is designed to manage multiple dict-like interface classes to files
with a shared prefix (directory).
Parameters
----------
prefix : str
The directory prefix shared by all files managed by this class.
"""

cls = None
Expand Down
26 changes: 14 additions & 12 deletions signac/core/h5store.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,19 +529,21 @@ def clear(self):
class H5StoreManager(DictManager):
"""Helper class to manage multiple instances of :class:`~.H5Store` within a directory.
Example (assuming that the 'stores/' directory exists):
.. code-block:: python
>>> stores = H5StoreManager('stores/')
>>> stores.data
<H5Store(filename=stores/data.h5)>
>>> stores.data.foo = True
>>> dict(stores.data)
{'foo': True}
Parameters
----------
prefix : str
The directory prefix shared by all files managed by this class.
:param prefix:
The directory prefix shared by all stores managed by this class.
Examples
--------
Assuming that the ``stores/`` directory exists:
>>> stores = H5StoreManager('stores/')
>>> stores.data
<H5Store(filename=stores/data.h5)>
>>> stores.data.foo = True
>>> dict(stores.data)
{'foo': True}
"""

cls = H5Store # type: ignore
Expand Down

0 comments on commit cc4f78c

Please sign in to comment.