Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dependency to polars #991

Merged
merged 1 commit into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ dev-flake8 = [
"pydoclint == 0.4.1",
"pydocstyle == 6.3.0",
]
dev-examples = ["polars == 0.20.31"]
dev-formatting = ["black == 24.4.2", "isort == 5.13.2"]
dev-mkdocs = [
"black == 24.4.2",
Expand Down Expand Up @@ -83,8 +82,6 @@ dev-pytest = [
"pytest-asyncio == 0.23.7",
"time-machine == 2.12.0",
"async-solipsism == 0.6",
# For checking docstring code examples
"frequenz-sdk[dev-examples]",
"hypothesis == 6.103.1",
]
dev = [
Expand Down
7 changes: 4 additions & 3 deletions src/frequenz/sdk/timeseries/_moving_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ async def run() -> None:
Example: Create a polars data frame from a `MovingWindow`

```python
import polars as pl
from datetime import datetime, timedelta, timezone

async def send_mock_data(sender: Sender[Sample]) -> None:
Expand All @@ -118,10 +117,12 @@ async def run() -> None:
# wait for one full day until the buffer is filled
await asyncio.sleep(60*60*24)

# create a polars series with one full day of data
time_start = datetime(2023, 1, 1, tzinfo=timezone.utc)
time_end = datetime(2023, 1, 2, tzinfo=timezone.utc)
series = pl.Series("Jan_1", window[time_start:time_end])

# You can now create a polars series with one full day of data by
# passing the window slice, like:
# series = pl.Series("Jan_1", window[time_start:time_end])

asyncio.run(run())
```
Expand Down
Loading