Skip to content

Commit ee498ac

Browse files
author
portfolio-author
committed
chore: add Makefile and GitHub Actions workflow
1 parent 3466833 commit ee498ac

2 files changed

Lines changed: 44 additions & 0 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-python@v5
14+
with:
15+
python-version: "3.12"
16+
cache: pip
17+
- name: Install dependencies
18+
run: pip install pandas numpy scikit-learn xgboost pytest
19+
- name: Run tests
20+
run: pytest -q
21+
# The leakage and metric tests run on hand-written fixtures, so the suite
22+
# needs no network and no downloaded data.

‎Makefile‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.PHONY: help install run tune test clean
2+
3+
help:
4+
@echo "install install dependencies"
5+
@echo "run full pipeline: data, snapshots, CV, holdout, figures"
6+
@echo "tune as above, plus the XGBoost grid search"
7+
@echo "test run the test suite (no network)"
8+
9+
install:
10+
pip install -r requirements.txt
11+
12+
run:
13+
python -m src.pipeline
14+
15+
tune:
16+
python -m src.pipeline --tune
17+
18+
test:
19+
python -m pytest -q
20+
21+
clean:
22+
rm -rf data/processed/* models/*.joblib reports/*.md reports/figures/*.png reports/*.csv

0 commit comments

Comments
 (0)