Skip to content

Commit

Permalink
Run without optinoal deps
Browse files Browse the repository at this point in the history
  • Loading branch information
jinlow committed Aug 26, 2023
1 parent 145f705 commit ea2400b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions scripts/remove-optional-deps.py
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit ea2400b

Please sign in to comment.