Skip to content

Commit

Permalink
fix adwin
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxHalford committed Dec 4, 2023
1 parent 9d4de29 commit b19b9ca
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 49 deletions.
41 changes: 6 additions & 35 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,40 +106,10 @@ From the root of the repository, you can then run the `make livedoc` command to

All classes and function are automatically picked up and added to the documentation. The only thing you have to do is to add an entry to the relevant file in the [`docs/releases` directory](docs/releases).

## Building Cython extensions

```sh
make build-cython
```

## Building Rust extensions

Debug settings:

```sh
make develop
```

Release settings:

```sh
make build-rust
```

After building the project by modifying the rust part of the codebase (changing the project architecture, renaming it, etc.), it happens that by importing `river,` the python process is killed. If this happens, we invite you to remove the following things and start a new build:

```sh
# remove all .so output from rust ie river/stats/_rust_stats.cpython*
rm -rf target
rm -rf river.egg-info
rm Cargo.lock
rm -rf build
```

## Build Cython and Rust extensions

```sh
make build_all
poetry install
```

## Testing
Expand Down Expand Up @@ -182,10 +152,11 @@ make execute-notebooks
2. Run `make execute-notebooks` just to be safe
3. Run the [benchmarks](benchmarks)
4. Bump the version in `river/__version__.py`
5. Tag and date the `docs/releases/unreleased.md` file
6. Commit and push
7. Wait for CI to [run the unit tests](https://github.com/online-ml/river/actions/workflows/ci.yml)
8. Push the tag:
5. Bump the version in `pyproject.toml`
6. Tag and date the `docs/releases/unreleased.md` file
7. Commit and push
8. Wait for CI to [run the unit tests](https://github.com/online-ml/river/actions/workflows/ci.yml)
9. Push the tag:

```sh
RIVER_VERSION=$(python -c "import river; print(river.__version__)")
Expand Down
12 changes: 0 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,3 @@ livedoc: doc

rebase:
git fetch && git rebase origin/main

develop:
python ./setup.py develop

build-cython:
python setup.py build_ext --inplace --force

build-rust:
python setup.py build_rust --inplace --release

build:
python setup.py build_rust --inplace --release build_ext --inplace --force
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "river"
version = "0.20.1"
version = "0.21.0"
description = "Online machine learning in Python"
readme = "README.md"
homepage = "https://riverml.xyz/"
Expand Down
2 changes: 1 addition & 1 deletion river/drift/adwin_c.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ cdef class AdaptiveWindowing:
If True then a change is detected.
"""
self._update(value)
return self._update(value)

cdef bint _update(self, double value):
# Increment window with one element
Expand Down

0 comments on commit b19b9ca

Please sign in to comment.