diff --git a/docs/API/core.rst b/docs/API/core.rst new file mode 100644 index 0000000..499e2b5 --- /dev/null +++ b/docs/API/core.rst @@ -0,0 +1,31 @@ +🎯 Core API +============================= + + +.. currentmodule:: serket + +.. autoclass:: TreeClass + :members: + at +.. autoclass:: Partial +.. autoclass:: partial +.. autoclass:: AtIndexer + :members: + get, + set, + apply, + scan, + reduce, + pluck, + +.. autoclass:: at +.. autoclass:: BaseKey + :members: + __eq__ +.. autofunction:: autoinit +.. autofunction:: leafwise +.. autofunction:: field +.. autofunction:: fields +.. autofunction:: bcmap +.. autofunction:: is_tree_equal +.. autofunction:: value_and_tree \ No newline at end of file diff --git a/docs/API/masking.rst b/docs/API/masking.rst new file mode 100644 index 0000000..9f81654 --- /dev/null +++ b/docs/API/masking.rst @@ -0,0 +1,11 @@ +🥽 Masking API +---------------------------------------------- + +.. currentmodule:: serket + +.. autofunction:: is_nondiff +.. autofunction:: freeze +.. autofunction:: unfreeze +.. autofunction:: is_frozen +.. autofunction:: tree_mask +.. autofunction:: tree_unmask diff --git a/docs/API/pretty_print.rst b/docs/API/pretty_print.rst new file mode 100644 index 0000000..0453003 --- /dev/null +++ b/docs/API/pretty_print.rst @@ -0,0 +1,11 @@ +🎨 Pretty printing API +---------------------------------------------- + +.. currentmodule:: serket + +.. autofunction:: tree_diagram +.. autofunction:: tree_graph +.. autofunction:: tree_mermaid +.. autofunction:: tree_repr +.. autofunction:: tree_str +.. autofunction:: tree_summary \ No newline at end of file diff --git a/docs/API/sepes.rst b/docs/API/sepes.rst index 2ffb998..edb7c4f 100644 --- a/docs/API/sepes.rst +++ b/docs/API/sepes.rst @@ -3,4 +3,12 @@ .. note:: `sepes `_ API is fully re-exported under the ``serket`` namespace. - `Check the docs `_ for full details. \ No newline at end of file + `Check the docs `_ for full details. + +.. toctree:: + :maxdepth: 2 + :caption: API Documentation + + core + masking + pretty_print diff --git a/docs/_static/tree_graph.svg b/docs/_static/tree_graph.svg new file mode 100644 index 0000000..380a167 --- /dev/null +++ b/docs/_static/tree_graph.svg @@ -0,0 +1,67 @@ + + + + + + +G + + + +5353602176 + +list + + + +5353602432 + +[0]=1 + + + +5353602176->5353602432 + + + + + +5353602496 + +[1]=2 + + + +5353602176->5353602496 + + + + + +5353602816 + +[2]:dict + + + +5353602176->5353602816 + + + + + +5353602560 + +['a']=3 + + + +5353602816->5353602560 + + + + + diff --git a/docs/_static/tree_graph_stylized.svg b/docs/_static/tree_graph_stylized.svg new file mode 100644 index 0000000..f6a8d7b --- /dev/null +++ b/docs/_static/tree_graph_stylized.svg @@ -0,0 +1,67 @@ + + + + + + +G + + + +5345369024 + +list + + + +5353442880 + +[0]=1 + + + +5345369024->5353442880 + + + + + +5353442496 + +[1]=2 + + + +5345369024->5353442496 + + + + + +5353171392 + +[2]:dict + + + +5345369024->5353171392 + + + + + +5353173184 + +['a']=3 + + + +5353171392->5353173184 + + + + + diff --git a/docs/_static/tree_mermaid copy.jpg b/docs/_static/tree_mermaid copy.jpg new file mode 100644 index 0000000..07f1d82 Binary files /dev/null and b/docs/_static/tree_mermaid copy.jpg differ diff --git a/docs/notebooks/fields.ipynb b/docs/notebooks/fields.ipynb index 860d917..35ae9ec 100644 --- a/docs/notebooks/fields.ipynb +++ b/docs/notebooks/fields.ipynb @@ -22,7 +22,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "This section introduces common recipes for fields. A `field` is a type hinted class variable that adds certain functionality to the class. For example, a `field` can be used to validate the input data, or to provide a default value. The notebook provides examples for common use cases." + "This section introduces common recipes for fields. A `field` is a type hinted class variable that adds certain functionality to the class. For example, a `field` can be used to validate the input data, or to provide a default value. The notebook provides examples for common use cases. `serket.field` is implemented as a [python descriptor](https://docs.python.org/3/howto/descriptor.html), which means that it can be used in any class not necessarily a `serket` class. Refer to the [python documentation](https://docs.python.org/3/howto/descriptor.html) for more information on descriptors and how they work." ] }, {