diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5c67fbd..0727b18 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,8 +40,8 @@ jobs: continue-on-error: true - name: Install carge llvm-cov run: cargo install cargo-llvm-cov - # - name: Install X components - # run: sudo apt-get install -y libxinerama-dev libxcursor-dev libxfixes-dev libxft-dev libpango1.0-dev libpangoxft-1.0-0 libpangocairo-1.0-0 + - name: Install X components + run: sudo apt-get install -y libxinerama-dev libxcursor-dev libxfixes-dev libxft-dev libpango1.0-dev libpangoxft-1.0-0 libpangocairo-1.0-0 - name: Run Clippy run: cargo clippy --features ui,use_rayon - name: Run tests and coverage @@ -50,7 +50,7 @@ jobs: export CARGO_TARGET_DIR=$CARGO_LLVM_COV_TARGET_DIR export CARGO_INCREMENTAL=1 cargo llvm-cov clean --workspace - cargo test --features use_rayon # FIXME: ui + cargo test --features ui,use_rayon # FIXME: ui cargo llvm-cov --no-run --lcov --output-path coverage.lcov - uses: codecov/codecov-action@v3 with: diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f7bf2d..f0f15d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Add Python typing for FFS results. - Distinguish stored states and number of configurations for FFS surfaces. - Make FFS state references more useful. +- Fix rayon use in Python (parallel execution). # 0.13.1 diff --git a/py-rgrow/Cargo.toml b/py-rgrow/Cargo.toml index 637b19d..1a04aca 100644 --- a/py-rgrow/Cargo.toml +++ b/py-rgrow/Cargo.toml @@ -32,7 +32,7 @@ pyo3-polars = {workspace = true} [dependencies.rgrow] path = "../rgrow" -features = ["python"] +features = ["python", "use_rayon"] default-features = false [dependencies.pyo3] diff --git a/rgrow/Cargo.toml b/rgrow/Cargo.toml index 2ff746f..81d036b 100644 --- a/rgrow/Cargo.toml +++ b/rgrow/Cargo.toml @@ -36,7 +36,7 @@ name = "rgrow" path = "src/main.rs" [features] -default = ["use_rayon"] +default = ["use_rayon", "ui"] ui = ["fltk", "pixels"] use_rayon = ["rayon"] python = ["pyo3", "numpy"] diff --git a/rgrow/src/ffs.rs b/rgrow/src/ffs.rs index 3818657..24b9d8f 100644 --- a/rgrow/src/ffs.rs +++ b/rgrow/src/ffs.rs @@ -12,6 +12,7 @@ use crate::tileset::{CanvasType, FromTileSet, Model, TileSet, SIZE_DEFAULT}; #[cfg(feature = "python")] use polars::prelude::*; +#[cfg(feature = "python")] use python::PyState; use super::*;