Skip to content

Commit

Permalink
don't try running bsddb3 doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
dstansby committed Dec 8, 2024
1 parent 9eaf470 commit 2b469ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
17 changes: 2 additions & 15 deletions docs/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -807,21 +807,8 @@ underlying ZIP archive.

Another storage alternative is the :class:`zarr.storage.DBMStore` class, added
in Zarr version 2.2. This class allows any DBM-style database to be used for
storing an array or group. Here is an example using a Berkeley DB B-tree
database for storage (requires `bsddb3
<https://www.jcea.es/programacion/pybsddb.htm>`_ to be installed):

.. doctest-requires:: bsddb3

>>> import bsddb3
>>> store = zarr.DBMStore('data/example.bdb', open=bsddb3.btopen)
>>> root = zarr.group(store=store, overwrite=True)
>>> z = root.zeros('foo/bar', shape=(1000, 1000), chunks=(100, 100), dtype='i4')
>>> z[:] = 42
>>> store.close()

Also added in Zarr version 2.2 is the :class:`zarr.storage.LMDBStore` class which
enables the lightning memory-mapped database (LMDB) to be used for storing an array or
storing an array or group. Here is an example using the
lightning memory-mapped database (LMDB) to be used for storing an array or
group (requires `lmdb <https://lmdb.readthedocs.io/>`_ to be installed)::

>>> store = zarr.LMDBStore('data/example.lmdb')
Expand Down
2 changes: 1 addition & 1 deletion zarr/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -2069,7 +2069,7 @@ class DBMStore(Store):
<https://www.jcea.es/programacion/pybsddb.htm>`_ package is installed, a
Berkeley DB database can be used:
.. doctest-requires:: bsddb3
.. doctest-skip::
>>> import bsddb3
>>> store = zarr.DBMStore('data/array.bdb', open=bsddb3.btopen)
Expand Down

0 comments on commit 2b469ab

Please sign in to comment.