Skip to content

Commit 514aeb6

Browse files
authored
Update Docs Dependencies (#411)
* update requirements file for docs build to add missing dependencies * add newlines after show and select method docstrings in tsdf class * add indentation to newline in params so doc-utils recognizes it as param definiton * helpful script to get latest dbr environment it's very difficult to use within tox because of how envs are handled * move doc requirments to common requirements folder * update tox.ini for doc build * remove get_latest_dbr_env.sh
1 parent 2c97b42 commit 514aeb6

File tree

3 files changed

+18
-7
lines changed

3 files changed

+18
-7
lines changed

docs/requirements.txt renamed to python/requirements/docs.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ sphinx-copybutton
33
sphinx
44
sphinx-design
55
sphinx-panels
6-
furo
6+
furo

python/tempo/tsdf.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ def select(self, *cols: Union[str, List[str]]) -> "TSDF":
389389
pyspark.sql.DataFrame.select() method's equivalent for TSDF objects
390390
391391
:param cols: str or list of strs column names (string). If one of the column names is '*', that
392-
column is expanded to include all columns in the current :class:`TSDF`.
392+
column is expanded to include all columns in the current :class:`TSDF`.
393393
394394
## Examples
395395
.. code-block:: python
@@ -399,6 +399,7 @@ def select(self, *cols: Union[str, List[str]]) -> "TSDF":
399399
[Row(name='Alice', age=2), Row(name='Bob', age=5)]
400400
401401
"""
402+
402403
# The columns which will be a mandatory requirement while selecting from TSDFs
403404
seq_col_stub = [] if bool(self.sequence_col) is False else [self.sequence_col]
404405
mandatory_cols = [self.ts_col] + self.partitionCols + seq_col_stub
@@ -581,8 +582,8 @@ def show(
581582
582583
:param n: Number of rows to show. (default: 20)
583584
:param truncate: If set to True, truncate strings longer than 20 chars by default.
584-
If set to a number greater than one, truncates long strings to length truncate
585-
and align cells right.
585+
If set to a number greater than one, truncates long strings to length truncate
586+
and align cells right.
586587
:param vertical: If set to True, print output rows vertically (one line per column value).
587588
588589
## Example to show usage:
@@ -603,6 +604,7 @@ def show(
603604
# Call show method here
604605
phone_accel_tsdf.show()
605606
"""
607+
606608
# validate k <= n
607609
if k > n:
608610
raise ValueError(f"Parameter k {k} cannot be greater than parameter n {n}")

python/tox.ini

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,19 @@ commands =
6161
python setup.py clean bdist_wheel
6262

6363
[testenv:build-docs]
64-
description = build distribution
65-
allowlist_externals = make
64+
description = build documentation
65+
basepython = py3.10
66+
skipdist = true
67+
skip_install = true
68+
allowlist_externals =
69+
make
6670
deps =
67-
-r ../docs/requirements.txt
71+
-rrequirements/docs.txt
72+
; TODO: making this dynamic is difficult in tox, so for now we will just use the latest version
73+
; We should have a top-level makefile that orchestrates this which allows better environment prep and execution of
74+
; shell scripts prior to tox execution. it'll also create a stable interface for migrating to hatch in the future
75+
; since the make commands would not change
76+
-rrequirements/dbr143.txt
6877
semver
6978
commands =
7079
make --directory ../docs html

0 commit comments

Comments
 (0)