From ea2400b73ba29fc64bf9b3c5d9a9d9a18853226d Mon Sep 17 00:00:00 2001 From: jinlow Date: Sat, 26 Aug 2023 10:46:08 -0500 Subject: [PATCH] Run without optinoal deps --- .github/workflows/CI.yml | 16 ++++++++++++---- scripts/remove-optional-deps.py | 13 +++++++++++++ 2 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 scripts/remove-optional-deps.py diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 4c49b0c..ff25166 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -19,10 +19,12 @@ jobs: python-version: ${{ matrix.pyversion }} architecture: x64 - name: Install deps - run: pip install numpy pandas seaborn xgboost=='1.6.1' scikit-learn + run: pip install numpy pandas seaborn xgboost=='1.6.1' scikit-learn toml - run: | cp README.md py-forust/README.md cp LICENSE py-forust/LICENSE + - name: Update TOML + run: python scripts/remove-optional-deps.py - name: Build test data run: python scripts/make_resources.py - name: Run Cargo tests @@ -72,10 +74,12 @@ jobs: python-version: ${{ matrix.pyversion }} architecture: x64 - name: Install deps - run: pip install numpy pandas seaborn xgboost=='1.6.1' scikit-learn + run: pip install numpy pandas seaborn xgboost=='1.6.1' scikit-learn toml - run: | cp README.md py-forust/README.md cp LICENSE py-forust/LICENSE + - name: Update TOML + run: python scripts/remove-optional-deps.py - name: Build test data run: python scripts/make_resources.py - name: Run Cargo tests @@ -127,10 +131,12 @@ jobs: python-version: ${{ matrix.pyversion }} architecture: x64 - name: Install deps - run: pip install numpy pandas seaborn xgboost=='1.6.1' scikit-learn + run: pip install numpy pandas seaborn xgboost=='1.6.1' scikit-learn toml - run: | cp README.md py-forust/README.md cp LICENSE py-forust/LICENSE + - name: Update TOML + run: python scripts/remove-optional-deps.py - name: Build test data run: python scripts/make_resources.py - name: Run Cargo tests @@ -180,10 +186,12 @@ jobs: python-version: "3.10" architecture: x64 - name: Install deps - run: pip install numpy pandas seaborn xgboost=='1.6.1' scikit-learn + run: pip install numpy pandas seaborn xgboost=='1.6.1' scikit-learn toml - run: | cp README.md py-forust/README.md cp LICENSE py-forust/LICENSE + - name: Update TOML + run: python scripts/remove-optional-deps.py - name: Build test data run: python scripts/make_resources.py - name: Run Cargo tests diff --git a/scripts/remove-optional-deps.py b/scripts/remove-optional-deps.py new file mode 100644 index 0000000..72a7362 --- /dev/null +++ b/scripts/remove-optional-deps.py @@ -0,0 +1,13 @@ +# Building with polars is sooo slow. +# It's only there for the example, so let's remove it +# in the regular build process. +# Requires toml package +import toml + +ct = toml.load("cargo.toml") + +del ct["dev-dependencies"] +del ct["bench"] + +with open("cargo.toml", "w") as file: + toml.dump(ct, file)