Skip to content

Commit

Permalink
Doc tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
zimeon committed Nov 6, 2024
1 parent 85eec0f commit 0848a22
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 5 deletions.
3 changes: 2 additions & 1 deletion docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ functions.

ocfl
ocfl.object

ocfl.storage_root
ocfl.inventory
4 changes: 3 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.doctest",
"sphinx.ext.napoleon",
"sphinx_rtd_theme"]
myst_enable_extensions = ["colon_fence"]

Expand All @@ -41,5 +42,6 @@

# Autodoc
autodoc_default_options = {
"autoclass_content": "both"
"autoclass_content": "both", # doesn't work to show __init__ docs??
'special-members': '__init__' # get __init__ to show explicitly
}
10 changes: 10 additions & 0 deletions docs/ocfl.inventory.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
``ocfl.inventory``
==================

.. automodule:: ocfl.inventory

.. autoclass:: Inventory
:members:

.. autoclass:: Version
:members:
7 changes: 7 additions & 0 deletions docs/ocfl.storage_root.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
``ocfl.storage_root``
=====================

.. automodule:: ocfl.storage_root

.. autoclass:: StorageRoot
:members:
2 changes: 1 addition & 1 deletion ocfl/inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Inventory(): # pylint: disable=too-many-public-methods
be an array or a dict, then and empty array or empty dict are returned
if not present in the underlying data.
Instance attributes:
Attributes:
data: dict that is the top level JSON object of the parsed JSON
representation of the inventory file. This is the only place
that an Inventory instance stores information.
Expand Down
3 changes: 1 addition & 2 deletions ocfl/object.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def __init__(self, *, identifier=None, content_directory="content",
obj_fs=None, path=None, create=False):
"""Initialize OCFL object.
Arguments relevant to building an object:
Arguments:
identifier: id for this object
content_directory: allow override of the default "content"
digest_algorithm: allow override of the default "sha512"
Expand All @@ -83,7 +83,6 @@ def __init__(self, *, identifier=None, content_directory="content",
specification for fixity and to allow non-preferred digest algorithms
for content references in the object
fixity: list of fixity types to add as fixity section
obj_fs: a pyfs filesystem reference for the root of this object
path: if set then open a pyfs filesystem at path (alternative to obj_fs)
create: set True to allow opening filesystem at path to create a directory
Expand Down

0 comments on commit 0848a22

Please sign in to comment.