Skip to content

Commit 33c74ac

Browse files
committed
Update requirements
1 parent 2c91101 commit 33c74ac

File tree

7 files changed

+23
-17
lines changed

7 files changed

+23
-17
lines changed

ci/environment.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ channels:
44
dependencies:
55
- dask
66
- distributed
7+
- numpy
78
- pandas
89
- polars
910
- pyarrow
1011
- pytest
1112
- pytest-cov
1213
- pytest-mock
1314
- pytest-sugar
15+
- pyyaml

ci/environment_latest.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ channels:
44
dependencies:
55
- dask
66
- distributed
7+
- numpy
78
- pandas
89
- polars
910
- pyarrow
1011
- pytest
1112
- pytest-cov
1213
- pytest-mock
1314
- pytest-sugar
15+
- pyyaml

docs/environment.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,23 @@ name: build-doc-tstore
22
channels:
33
- conda-forge
44
dependencies:
5+
- dask
6+
- distributed
57
- docutils
68
- jupyter
79
- nbsphinx==0.9.3
10+
- numpy
11+
- pandas
812
- pandoc
913
- pip
14+
- polars
15+
- pyarrow
1016
- python>=3.9
17+
- pyyaml
1118
- sphinx-book-theme==1.1.0
1219
- sphinx-gallery
1320
- sphinx-mdinclude==0.5.3
1421
- sphinx==7.2.6
1522
- sphinxcontrib-youtube
16-
- ts-store
1723
- pip:
1824
- ts-store

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ dependencies = [
2828
"distributed",
2929
"polars",
3030
"geopandas",
31+
"pyyaml",
3132
]
3233
dynamic = ["version"]
3334

tstore/archive/checks.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ def check_start_end_time(start_time, end_time):
112112
if end_time is not None:
113113
end_time = check_time(end_time)
114114
# Check start_time and end_time are chronological
115-
if start_time is not None and end_time is not None:
116-
if start_time > end_time:
117-
raise ValueError("Provide start_time occurring before of end_time")
115+
if start_time is not None and end_time is not None and start_time > end_time:
116+
raise ValueError("Provide start_time occurring before of end_time")
118117
return (start_time, end_time)

tstore/tsdf/extensions/array.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,13 @@ def get_tabular_object_type(obj):
3333
"""Get inner class of the TS object."""
3434
if isinstance(obj, dd.DataFrame):
3535
return "dask.DataFrame"
36-
elif isinstance(obj, pd.DataFrame):
36+
if isinstance(obj, pd.DataFrame):
3737
return "dask.Series"
38-
elif isinstance(obj, pd.DataFrame):
38+
if isinstance(obj, pd.DataFrame):
3939
return "pandas.DataFrame"
40-
elif isinstance(obj, pd.Series):
40+
if isinstance(obj, pd.Series):
4141
return "pandas.Series"
42-
else:
43-
return type(obj).__name__
42+
return type(obj).__name__
4443

4544

4645
class TSArray(ExtensionArray):
@@ -82,10 +81,9 @@ def __getitem__(self, index: int) -> "TSArray" | Any:
8281
"""Select a subset of self."""
8382
if isinstance(index, int):
8483
return self._data[index]
85-
else:
86-
# Check index for TestGetitemTests
87-
index = pd.core.indexers.check_array_indexer(self, index)
88-
return type(self)(self._data[index])
84+
# Check index for TestGetitemTests
85+
index = pd.core.indexers.check_array_indexer(self, index)
86+
return type(self)(self._data[index])
8987

9088
# TestSetitemTests
9189
def __setitem__(self, index: int, value: TS) -> None:
@@ -124,8 +122,7 @@ def _from_sequence(cls, data, dtype=None, copy: bool = False):
124122
if not isinstance(dtype, TSDtype):
125123
msg = f"'{cls.__name__}' only supports 'TSDtype' dtype"
126124
raise ValueError(msg)
127-
else:
128-
return cls(data, copy=copy)
125+
return cls(data, copy=copy)
129126

130127
# Required for all ExtensionArray subclasses
131128
@classmethod

tstore/tsdf/extensions/ts_dtype.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ def __eq__(self, other: Any) -> bool:
6666
"""Test TS equality."""
6767
if isinstance(other, str):
6868
return self.name == other
69-
else:
70-
return isinstance(other, type(self)) and self.ts_class == other.ts_class
69+
return isinstance(other, type(self)) and self.ts_class == other.ts_class
7170

7271
# Required for pickle compat (see GH26067)
7372
def __setstate__(self, state) -> None:

0 commit comments

Comments
 (0)