Skip to content

Commit 12a6c0a

Browse files
authored
docs: fix readthedocs timeouts (#4350)
1 parent 6b855de commit 12a6c0a

File tree

12 files changed

+108
-306
lines changed

12 files changed

+108
-306
lines changed

.readthedocs.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ build:
77

88
python:
99
install:
10-
- requirements: requirements-dev.txt
10+
- requirements: requirements-doc.txt
1111

1212
mkdocs:
1313
configuration: mkdocs.yml
14-
15-
formats:
16-
- htmlzip

daft/catalog/__init__.py

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -364,10 +364,8 @@ def from_glue(
364364
365365
Args:
366366
name (str): glue database name
367-
type (Literal["iceberg"]): optional catalog type
368367
client: optional boto3 client
369368
session: optional boto3 session
370-
**options: additional options for boto3 client creation
371369
372370
Returns:
373371
Catalog: new daft catalog instance backed by AWS Glue.
@@ -410,9 +408,6 @@ def create_namespace(self, identifier: Identifier | str):
410408
411409
Args:
412410
identifier (Identifier | str): namespace identifier
413-
414-
Returns:
415-
None
416411
"""
417412
raise NotImplementedError
418413

@@ -421,9 +416,6 @@ def create_namespace_if_not_exists(self, identifier: Identifier | str):
421416
422417
Args:
423418
identifier (Identifier | str): namespace identifier
424-
425-
Returns:
426-
None
427419
"""
428420
if not self.has_namespace(identifier):
429421
self.create_namespace(identifier)
@@ -587,13 +579,9 @@ class Identifier(Sequence):
587579
def __init__(self, *parts: str):
588580
"""Creates an Identifier from its parts.
589581
590-
Returns:
591-
Identifier: A new identifier.
592-
593582
Examples:
594583
>>> from daft.catalog import Identifier
595584
>>> Identifier("namespace", "table")
596-
597585
"""
598586
if len(parts) < 1:
599587
raise ValueError("Identifier requires at least one part.")
@@ -770,7 +758,7 @@ def from_unity(table: object) -> Table:
770758
"""Returns a Daft Table instance from a Unity table.
771759
772760
Args:
773-
table
761+
table (object): unity table instance.
774762
"""
775763
try:
776764
from daft.catalog.__unity import UnityTable
@@ -813,11 +801,11 @@ def _validate_options(method: str, input: dict[str, Any], valid: set[str]):
813801
###
814802

815803
@abstractmethod
816-
def read(self, **options) -> DataFrame:
804+
def read(self, **options: dict[str, Any]) -> DataFrame:
817805
"""Creates a new DataFrame from this table.
818806
819807
Args:
820-
**options: additional format-dependent read options
808+
**options (dict[str,Any]): additional format-dependent read options
821809
822810
Returns:
823811
DataFrame: new DataFrame instance
@@ -850,25 +838,25 @@ def show(self, n: int = 8) -> None:
850838
###
851839

852840
@abstractmethod
853-
def write(self, df: DataFrame, mode: Literal["append", "overwrite"] = "append", **options) -> None:
841+
def write(self, df: DataFrame, mode: Literal["append", "overwrite"] = "append", **options: dict[str, Any]) -> None:
854842
"""Writes the DataFrame to this table.
855843
856844
Args:
857845
df (DataFrame): datafram to write
858846
mode (str): write mode such as 'append' or 'overwrite'
859-
**options: additional format-dependent write options
847+
**options (dict[str,Any]): additional format-dependent write options
860848
"""
861849

862-
def append(self, df: DataFrame, **options) -> None:
850+
def append(self, df: DataFrame, **options: dict[str, Any]) -> None:
863851
"""Appends the DataFrame to this table.
864852
865853
Args:
866854
df (DataFrame): dataframe to append
867-
**options: additional format-dependent write options
855+
**options (dict[str,Any]): additional format-dependent write options
868856
"""
869857
self.write(df, mode="append", **options)
870858

871-
def overwrite(self, df: DataFrame, **options) -> None:
859+
def overwrite(self, df: DataFrame, **options: dict[str, Any]) -> None:
872860
"""Overwrites this table with the given DataFrame.
873861
874862
Args:

daft/io/__shim.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def name(self) -> str:
3434
return self._source.name
3535

3636
def display_name(self) -> str:
37-
return f"DataFrameSource({self.name()})"
37+
return f"DataSource({self.name()})"
3838

3939
def partitioning_keys(self) -> list[PartitionField]:
4040
return []

daft/io/pushdowns.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class Pushdowns:
2929
to convert the rust expressions to this python pushdowns class.
3030
3131
Attributes:
32-
projections (list[Term] | None): Optional list of Terms (typically column references) to project.
32+
projections (list[Reference | None): Optional list of references to project.
3333
predicate (Term | None): Optional filter predicate to apply to rows.
3434
limit (int | None): Optional limit on the number of rows to return.
3535
"""

daft/session.py

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,6 @@ def detach_catalog(self, alias: str):
169169
170170
Args:
171171
alias (str): catalog alias to detach
172-
173-
Returns:
174-
None
175172
"""
176173
return self._session.detach_catalog(alias)
177174

@@ -180,9 +177,6 @@ def detach_table(self, alias: str):
180177
181178
Args:
182179
alias (str): catalog alias to detach
183-
184-
Returns:
185-
None
186180
"""
187181
return self._session.detach_table(alias)
188182

@@ -294,9 +288,6 @@ def drop_namespace(self, identifier: Identifier | str):
294288
295289
Args:
296290
identifier (Identifier|str): table identifier
297-
298-
Returns:
299-
None
300291
"""
301292
if not (catalog := self.current_catalog()):
302293
raise ValueError("Cannot drop a namespace without a current catalog")
@@ -307,9 +298,6 @@ def drop_table(self, identifier: Identifier | str):
307298
308299
Args:
309300
identifier (Identifier|str): table identifier
310-
311-
Returns:
312-
None
313301
"""
314302
if not (catalog := self.current_catalog()):
315303
raise ValueError("Cannot drop a table without a current catalog")
@@ -337,9 +325,6 @@ def use(self, identifier: Identifier | str | None = None):
337325
def current_catalog(self) -> Catalog | None:
338326
"""Get the session's current catalog or None.
339327
340-
Args:
341-
None
342-
343328
Returns:
344329
Catalog: current catalog or None if one is not set
345330
"""
@@ -348,9 +333,6 @@ def current_catalog(self) -> Catalog | None:
348333
def current_namespace(self) -> Identifier | None:
349334
"""Get the session's current namespace or None.
350335
351-
Args:
352-
None
353-
354336
Returns:
355337
Identifier: current namespace or none if one is not set
356338
"""
@@ -474,9 +456,6 @@ def set_catalog(self, identifier: str | None):
474456
Args:
475457
identifier (str): sets the current catalog
476458
477-
Returns:
478-
None
479-
480459
Raises:
481460
ValueError: If the catalog does not exist.
482461
"""
@@ -501,18 +480,15 @@ def write_table(
501480
identifier: Identifier | str,
502481
df: DataFrame,
503482
mode: Literal["append", "overwrite"] = "append",
504-
**options,
483+
**options: dict[str, Any],
505484
):
506485
"""Writes the DataFrame to the table specified by the identifier.
507486
508487
Args:
509488
identifier (Identifier|str): table identifier
510489
df (DataFrame): dataframe to write
511490
mode ("append"|"overwrite"): write mode, defaults to "append"
512-
options**: additional, format-specific write options
513-
514-
Returns:
515-
None
491+
**options (dict[str,Any]): additional, format-specific write options
516492
"""
517493
if isinstance(identifier, str):
518494
identifier = Identifier.from_str(identifier)

docs/api/dataframe_creation.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# DataFrame Creation
2+
3+
Daft offers a variety of approaches to creating a DataFrame from various data sources like in-memory data, files, data catalogs, and integrations. Learn more about [Creating DataFrames](../core_concepts.md#creating-a-dataframe) in Daft User Guide.
4+
5+
## SQL
6+
7+
::: daft.sql.sql.sql
8+
options:
9+
heading_level: 3
10+
11+
## In-Memory Data
12+
13+
::: daft.from_pylist
14+
options:
15+
heading_level: 3
16+
17+
::: daft.from_pydict
18+
options:
19+
heading_level: 3
20+
21+
::: daft.from_arrow
22+
options:
23+
heading_level: 3
24+
25+
::: daft.from_pandas
26+
options:
27+
heading_level: 3
28+
29+
## Files
30+
31+
::: daft.read_parquet
32+
options:
33+
heading_level: 3
34+
35+
::: daft.read_csv
36+
options:
37+
heading_level: 3
38+
39+
::: daft.read_json
40+
options:
41+
heading_level: 3
42+
43+
::: daft.read_warc
44+
options:
45+
heading_level: 3
46+
47+
::: daft.from_glob_path
48+
options:
49+
heading_level: 3
50+
51+
## Data Catalogs
52+
53+
::: daft.read_iceberg
54+
options:
55+
heading_level: 3
56+
57+
::: daft.read_deltalake
58+
options:
59+
heading_level: 3
60+
61+
::: daft.read_hudi
62+
options:
63+
heading_level: 3
64+
65+
## Integrations
66+
67+
::: daft.from_ray_dataset
68+
options:
69+
heading_level: 3
70+
71+
::: daft.from_dask_dataframe
72+
options:
73+
heading_level: 3
74+
75+
::: daft.read_sql
76+
options:
77+
heading_level: 3
78+
79+
::: daft.read_lance
80+
options:
81+
heading_level: 3

docs/api/expressions.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,3 @@ Daft Expressions allow you to express some computation that needs to happen in a
106106
filters: ["!^_"]
107107
toc_label: Expression.embedding
108108
heading: Expression.embedding
109-
110-
## Visitor
111-
112-
::: daft.expressions.visitor.ExpressionVisitor
113-
options:
114-
filters: ["!^_", "!_$"]
115-
116-
::: daft.expressions.visitor.PredicateVisitor
117-
options:
118-
filters: ["!^_"]

0 commit comments

Comments
 (0)