Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
hntd187 authored Oct 24, 2023
2 parents d692291 + cffc4d7 commit e4d36fa
Show file tree
Hide file tree
Showing 23 changed files with 1,467 additions and 918 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ Cargo.lock
!/delta-inspect/Cargo.lock
!/proofs/Cargo.lock

justfile
justfile
site
30 changes: 15 additions & 15 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@ debug = "line-tables-only"

[workspace.dependencies]
# arrow
arrow = { version = "46" }
arrow-array = { version = "46" }
arrow-buffer = { version = "46" }
arrow-cast = { version = "46" }
arrow-ord = { version = "46" }
arrow-row = { version = "46" }
arrow-schema = { version = "46" }
arrow-select = { version = "46" }
parquet = { version = "46" }
arrow = { version = "47" }
arrow-array = { version = "47" }
arrow-buffer = { version = "47" }
arrow-cast = { version = "47" }
arrow-ord = { version = "47" }
arrow-row = { version = "47" }
arrow-schema = { version = "47" }
arrow-select = { version = "47" }
parquet = { version = "47" }

# datafusion
datafusion = { version = "31" }
datafusion-expr = { version = "31" }
datafusion-common = { version = "31" }
datafusion-proto = { version = "31" }
datafusion-sql = { version = "31" }
datafusion-physical-expr = { version = "31" }
datafusion = { version = "32" }
datafusion-expr = { version = "32" }
datafusion-common = { version = "32" }
datafusion-proto = { version = "32" }
datafusion-sql = { version = "32" }
datafusion-physical-expr = { version = "32" }

# serde
serde = { version = "1", features = ["derive"] }
Expand Down
14 changes: 13 additions & 1 deletion docs/python_api.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Python API Reference

## DeltaTable
## Delta Table

::: deltalake.table

Expand All @@ -13,16 +13,28 @@
Schemas, fields, and data types are provided in the ``deltalake.schema`` submodule.

::: deltalake.schema.Schema
options:
show_root_heading: true

::: deltalake.schema.PrimitiveType
options:
show_root_heading: true

::: deltalake.schema.ArrayType
options:
show_root_heading: true

::: deltalake.schema.MapType
options:
show_root_heading: true

::: deltalake.schema.Field
options:
show_root_heading: true

::: deltalake.schema.StructType
options:
show_root_heading: true

## Data Catalog

Expand Down
12 changes: 6 additions & 6 deletions docs/usage/examining-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The delta log maintains basic metadata about a table, including:
to have data deleted from it.

Get metadata from a table with the
[DeltaTable.metadata()][] method:
[DeltaTable.metadata()][deltalake.table.DeltaTable.metadata] method:

``` python
>>> from deltalake import DeltaTable
Expand All @@ -27,12 +27,12 @@ Metadata(id: 5fba94ed-9794-4965-ba6e-6ee3c0d22af9, name: None, description: None

The schema for the table is also saved in the transaction log. It can
either be retrieved in the Delta Lake form as
[deltalake.schema.Schema][] or as a
[Schema][deltalake.schema.Schema] or as a
PyArrow schema. The first allows you to introspect any column-level
metadata stored in the schema, while the latter represents the schema
the table will be loaded into.

Use [DeltaTable.schema][] to retrieve the delta lake schema:
Use [DeltaTable.schema][deltalake.table.DeltaTable.schema] to retrieve the delta lake schema:

``` python
>>> from deltalake import DeltaTable
Expand All @@ -43,14 +43,14 @@ Schema([Field(id, PrimitiveType("long"), nullable=True)])

These schemas have a JSON representation that can be retrieved. To
reconstruct from json, use
[deltalake.schema.Schema.from_json()][].
[DeltaTable.schema.to_json()][deltalake.schema.Schema.to_json].

``` python
>>> dt.schema().json()
>>> dt.schema().to_json()
'{"type":"struct","fields":[{"name":"id","type":"long","nullable":true,"metadata":{}}]}'
```

Use [deltalake.schema.Schema.to_pyarrow()][] to retrieve the PyArrow schema:
Use [DeltaTable.schema.to_pyarrow()][deltalake.schema.Schema.to_pyarrow] to retrieve the PyArrow schema:

``` python
>>> dt.schema().to_pyarrow()
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Usage

A [DeltaTable][] represents the state of a
A [DeltaTable][deltalake.table.DeltaTable] represents the state of a
delta table at a particular version. This includes which files are
currently part of the table, the schema of the table, and other metadata
such as creation time.
Expand Down
44 changes: 27 additions & 17 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
site_name: Python Delta Lake Documentation
theme:
name: readthedocs
name: mkdocs
navigation_depth: 2
hljs_style: nord
nav:
- Home: index.md
- Installation: installation.md
Expand All @@ -14,22 +16,30 @@ nav:
- API Reference: python_api.md

plugins:
- autorefs
- mkdocstrings:
handlers:
python:
path: [../python]
rendering:
heading_level: 4
show_source: false
show_symbol_type_in_heading: true
show_signature_annotations: true
show_root_heading: true
members_order: source
import:
# for cross references
- https://arrow.apache.org/docs/objects.inv
- https://pandas.pydata.org/docs/objects.inv
- autorefs
- mkdocstrings:
handlers:
python:
path: [../python]
options:
# docstring_style: sphinx
docstring_section_style: table
docstring_section_style: litabst
filters: ["!^_", "^__init__$"]
heading_level: 3
show_source: false
show_symbol_type_in_heading: true
show_signature_annotations: true
show_root_heading: false
show_root_full_path: true
separate_signature: true
docstring_options:
ignore_init_summary: false
merge_init_into_class: true
import:
# for cross references
- https://arrow.apache.org/docs/objects.inv
- https://pandas.pydata.org/docs/objects.inv

markdown_extensions:
- admonition
Loading

0 comments on commit e4d36fa

Please sign in to comment.