Skip to content

Commit 54c1993

Browse files
authored
feat: expanded Python docs + Rust docs (#1137)
1 parent e573ab0 commit 54c1993

39 files changed

+1144
-130
lines changed

.github/workflows/python-docs.yml .github/workflows/docs.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Python docs
1+
name: Python & Rust docs
22

33
on:
44
push:
@@ -31,6 +31,7 @@ jobs:
3131
3232
built_sha=$(git rev-parse HEAD)
3333
34+
rm -rf docs/_build/html/rust/CACHETAG.DIR docs/_build/html/rust/debug
3435
mv docs/_build/html /tmp/html
3536
3637
git fetch origin

docs/Makefile

+6
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,9 @@ help:
1818
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
1919
%: Makefile
2020
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
21+
22+
html: rust-html
23+
24+
.PHONY: rust-html
25+
rust-html:
26+
cargo doc --no-deps --workspace --all-features --target-dir $(BUILDDIR)/html/rust

docs/_static/example.parquet

34.8 KB
Binary file not shown.

docs/_static/example.vortex

75.1 KB
Binary file not shown.

docs/_static/file-format-2024-10-23-1642.svg

+10
Loading

docs/_static/style.css

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
html .pst-navbar-icon {
2+
font-size: 1.5rem;
3+
}

docs/_static/vortex_spiral_logo.svg

+2
Loading
Loading

docs/dataset.rst docs/api/dataset.rst

+10
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,15 @@ query engines like DuckDB and Polars. In particular, Vortex will read data propo
66
number of rows passing a filter condition and the number of columns in a selection. For most Vortex
77
encodings, this property holds true even when the filter condition specifies a single row.
88

9+
.. autosummary::
10+
:nosignatures:
11+
12+
~vortex.dataset.VortexDataset
13+
~vortex.dataset.VortexScanner
14+
15+
.. raw:: html
16+
17+
<hr>
18+
919
.. automodule:: vortex.dataset
1020
:members:

docs/api/dtype.rst

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Array Data Types
2+
================
3+
4+
The logical types of the elements of an Array. Each logical type is implemented by a variety of
5+
Array encodings which describe both a representation-as-bytes as well as how to apply operations on
6+
that representation.
7+
8+
.. autosummary::
9+
:nosignatures:
10+
11+
~vortex.dtype.DType
12+
~vortex.dtype.binary
13+
~vortex.dtype.bool
14+
~vortex.dtype.float
15+
~vortex.dtype.int
16+
~vortex.dtype.null
17+
~vortex.dtype.uint
18+
~vortex.dtype.utf8
19+
20+
.. raw:: html
21+
22+
<hr>
23+
24+
.. automodule:: vortex.dtype
25+
:members:
26+
:imported-members:
27+

docs/api/encoding.rst

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Arrays
2+
======
3+
4+
A Vortex array is a possibly compressed ordered set of homogeneously typed values. Each array has a
5+
logical type and a physical encoding. The logical type describes the set of operations applicable to
6+
the values of this array. The physical encoding describes how this array is realized in memory, on
7+
disk, and over the wire and how to apply operations to that realization.
8+
9+
.. autosummary::
10+
:nosignatures:
11+
12+
~vortex.encoding.array
13+
~vortex.encoding.compress
14+
~vortex.encoding.Array
15+
16+
.. raw:: html
17+
18+
<hr>
19+
20+
.. autofunction:: vortex.encoding.array
21+
22+
.. autofunction:: vortex.encoding.compress
23+
24+
.. autoclass:: vortex.encoding.Array
25+
:members:
26+
:special-members: __len__

docs/api/expr.rst

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Expressions
2+
===========
3+
4+
Vortex expressions represent simple filtering conditions on the rows of a Vortex array. For example,
5+
the following expression represents the set of rows for which the `age` column lies between 23 and
6+
55:
7+
8+
.. doctest::
9+
10+
>>> import vortex
11+
>>> age = vortex.expr.column("age")
12+
>>> (23 > age) & (age < 55) # doctest: +SKIP
13+
14+
.. autosummary::
15+
:nosignatures:
16+
17+
~vortex.expr.column
18+
~vortex.expr.Expr
19+
20+
.. raw:: html
21+
22+
<hr>
23+
24+
.. autofunction:: vortex.expr.column
25+
26+
.. autoclass:: vortex.expr.Expr

docs/api/index.rst

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Python API
2+
==========
3+
4+
.. toctree::
5+
:maxdepth: 5
6+
7+
encoding
8+
dtype
9+
io
10+
dataset
11+
expr
12+
scalar

docs/api/io.rst

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Input and Output
2+
================
3+
4+
Vortex arrays support reading and writing to local and remote file systems, including plain-old
5+
HTTP, S3, Google Cloud Storage, and Azure Blob Storage.
6+
7+
.. autosummary::
8+
:nosignatures:
9+
10+
~vortex.io.read_path
11+
~vortex.io.read_url
12+
~vortex.io.write_path
13+
14+
.. raw:: html
15+
16+
<hr>
17+
18+
.. automodule:: vortex.io
19+
:members:
20+
:imported-members:

docs/api/scalar.rst

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Scalars
2+
=======
3+
4+
A scalar is a single atomic value like the integer ``1``, the string ``"hello"``, or the structure
5+
``{"age": 55, "name": "Angela"}``. The :meth:`.Array.scalar_at` method
6+
returns a native Python value when the cost of doing so is small. However, for larger values like
7+
binary data, UTF-8 strings, variable-length lists, and structures, Vortex returns a zero-copy *view*
8+
of the Array data. The ``into_python`` method of each view will copy the scalar into a native Python
9+
value.
10+
11+
.. autosummary::
12+
:nosignatures:
13+
14+
~vortex.scalar.Buffer
15+
~vortex.scalar.BufferString
16+
~vortex.scalar.VortexList
17+
~vortex.scalar.VortexStruct
18+
19+
.. raw:: html
20+
21+
<hr>
22+
23+
.. automodule:: vortex.scalar
24+
:members:
25+
:imported-members:

0 commit comments

Comments
 (0)