Skip to content
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
8 changes: 5 additions & 3 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2
- name: Setup Miniforge
uses: conda-incubator/setup-miniconda@v4
with:
miniforge-version: latest
auto-update-conda: true
auto-activate-base: false
auto-activate: false
conda-remove-defaults: true
activate-environment: test_env
environment-file: ci/environment-${{ matrix.CONDA_ENV }}.yml

Expand Down
1 change: 0 additions & 1 deletion ci/environment-py310.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: test_env
channels:
- conda-forge
- defaults
dependencies:
- python=3.10
- pytest
Expand Down
1 change: 0 additions & 1 deletion ci/environment-py311.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: test_env
channels:
- conda-forge
- defaults
dependencies:
- python=3.11
- pytest
Expand Down
1 change: 0 additions & 1 deletion ci/environment-py312.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: test_env
channels:
- conda-forge
- defaults
dependencies:
- python=3.12
- pytest
Expand Down
1 change: 0 additions & 1 deletion ci/environment-py313.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: test_env
channels:
- conda-forge
- defaults
dependencies:
- python=3.13
- pytest
Expand Down
1 change: 0 additions & 1 deletion ci/environment-py314.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: test_env
channels:
- conda-forge
- defaults
dependencies:
- python=3.14
- pytest
Expand Down
5 changes: 3 additions & 2 deletions streamz/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1063,13 +1063,14 @@ def __init__(self, upstream, start=None, end=None, step=None, **kwargs):
self._check_end()

def update(self, x, who=None, metadata=None):
if self.state >= self.star and self.state % self.step == 0:
if (self.state >= self.star
and (self.state - self.star) % self.step == 0):
self.emit(x, metadata=metadata)
self.state += 1
self._check_end()

def _check_end(self):
if self.end and self.state >= self.end:
if self.end is not None and self.state >= self.end:
# we're done
for upstream in self.upstreams:
upstream._remove_downstream(self)
Expand Down
4 changes: 3 additions & 1 deletion streamz/tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1753,7 +1753,9 @@ def test_share_common_ioloop(clean): # noqa: F811
[[1, None, None], [1, 2, 3, 4, 5]],
[[None, 4, None], [0, 1, 2, 3]],
[[None, 4, 2], [0, 2]],
[[3, 1, None], []]
[[3, 1, None], []],
[[1, None, 2], [1, 3, 5]],
[[None, 0, None], []],

])
def test_slice(data):
Expand Down
Loading