Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
fix examples and references for Stream move
fix converter references in new block storage docs
  • Loading branch information
braingram committed May 16, 2023
1 parent 4214355 commit b4e0acc
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 14 deletions.
8 changes: 5 additions & 3 deletions docs/asdf/arrays.rst
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,15 @@ implicitly determined to include all of the remaining contents of the
file. By definition, it must be the last block in the file.

To use streaming, rather than including a Numpy array object in the
tree, you include a `asdf.Stream` object which sets up the structure
tree, you include a `asdf.tags.core.Stream` object which sets up the structure
of the streamed data, but will not write out the actual content. The
file handle's ``write`` method is then used to manually write out the
binary data.

.. runcode::

from asdf import AsdfFile, Stream
from asdf import AsdfFile
from asdf.tags.core import Stream
import numpy as np

tree = {
Expand Down Expand Up @@ -194,7 +195,8 @@ to numpy arrays stored in ASDF:

import csv
import numpy as np
from asdf import AsdfFile, Stream
from asdf import AsdfFile
from asdf.tags.core import Stream

tree = {
# We happen to know in advance that each row in the CSV has 100 ints
Expand Down
10 changes: 0 additions & 10 deletions docs/asdf/deprecations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,6 @@ Without support for ``fits_embed.AsdfInFits`` the ``extract`` and
``remove-hdu`` commands for :ref:`asdftool <asdf_tool>` are no longer usable and are
deprecated.

.. _asdffile_blocks_deprecation:

AsdfFile.blocks Deprecation
===========================

Direct usage of the ASDF block manager through `asdf.AsdfFile.blocks` is deprecated.
The BlockManager api was not previously included in the documentation and
was unused by the legacy and new style extensions. Planned features for ASDF 3.0
include adding block storage support to :ref:`converters <extending_converters>`.

.. _tests_helpers_deprecation:

asdf.tests.helpers Deprecation
Expand Down
2 changes: 1 addition & 1 deletion docs/asdf/extending/converters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ the index of the block a Converter would like to use to read or write the correc
block. However, the index used for reading might not be the same index for writing
if the tree was modified or the file is being written to a new location. During
serialization and deserialization, asdf will associate each object with the
accessed block during `from_yaml_tree` and `to_yaml_tree`.
accessed block during `Converter.from_yaml_tree` and `Converter.to_yaml_tree`.

.. note::
Converters using multiple blocks are slightly more complicated.
Expand Down
1 change: 1 addition & 0 deletions docs/asdf/user_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ User API
:inherited-members:
:no-inheritance-diagram:
:skip: ValidationError
:skip: Stream

.. automodapi:: asdf.search

Expand Down

0 comments on commit b4e0acc

Please sign in to comment.