Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Default owners for everything in the repo. These users are requested for
# review on every pull request.
* @ab93 @BeataLuczywek @stenhaug
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Bug report
about: Something is not working as expected
labels: bug
---

**What happened**

**What you expected**

**Minimal reproducible example**

```python

```

**Environment**

- multilift version:
- Python version:
- OS:
- numpy / pandas / scikit-learn / lightgbm versions:

**Full traceback**

```

```
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Question or discussion
url: https://github.com/intuit/multilift/discussions
about: Ask usage questions and discuss ideas here rather than in issues.
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: Feature request
about: Suggest an addition or change
labels: enhancement
---

**Problem**

What are you trying to do that is hard or impossible today?

**Proposed solution**

**Alternatives considered**
10 changes: 10 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## Summary

<!-- What does this change and why? Link any related issue. -->

## Checklist

- [ ] `make lint` and `make test` pass locally
- [ ] Tests added or updated for the change
- [ ] Docs / docstrings updated if the public API changed
- [ ] `CHANGELOG.md` updated under **Unreleased**
139 changes: 139 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
name: CI

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

# One run per ref; a new push cancels the stale run.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

# Least privilege by default; jobs that need more request it explicitly.
permissions:
contents: read

env:
POETRY_VERSION: "2.4.1"
PYTHONUNBUFFERED: "1"
PIP_DISABLE_PIP_VERSION_CHECK: "1"

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Install Poetry
run: pipx install "poetry==${POETRY_VERSION}"
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: poetry
- run: poetry install --only main,dev --no-interaction
- name: Lock file must be consistent and resolve from PyPI only
run: |
poetry check --lock
if grep -q '^\[package\.source\]' poetry.lock; then
echo "::error file=poetry.lock::lock references a non-PyPI package source"
exit 1
fi
- run: poetry run isort --check-only --diff .
- run: poetry run black --check --diff .
- run: poetry run ruff check --output-format=github .

test:
name: Test (py${{ matrix.python-version }})
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v4
- name: Install libgomp (LightGBM runtime dependency)
run: sudo apt-get update -q && sudo apt-get install -y -q --no-install-recommends libgomp1
- name: Install Poetry
run: pipx install "poetry==${POETRY_VERSION}"
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: poetry
- run: poetry install --only main,dev --no-interaction
- name: Run tests
run: >
poetry run pytest
-p no:cacheprovider
-o log_cli=false
--cov=multilift
--cov-report=term
--cov-report=xml
--junitxml=junit.xml
- name: Upload test results
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: test-results-py${{ matrix.python-version }}
path: junit.xml
retention-days: 14
- name: Upload coverage
if: ${{ matrix.python-version == '3.12' && !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: coverage-xml
path: coverage.xml
retention-days: 14

docs:
name: Docs
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Install Poetry
run: pipx install "poetry==${POETRY_VERSION}"
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: poetry
- run: poetry install --only main,docs --no-interaction
- name: Build docs (warnings are errors)
run: poetry run sphinx-build -W --keep-going -b html docs docs/_build/html

build:
name: Build distribution
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Install Poetry
run: pipx install "poetry==${POETRY_VERSION}"
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: poetry build
- name: Check metadata renders on PyPI
run: pipx run twine check --strict dist/*
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
retention-days: 14

# Single required status check for branch protection: point the rule at
# "CI passed" instead of enumerating every matrix leg.
ci-passed:
name: CI passed
if: always()
needs: [lint, test, docs, build]
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- name: Fail if any dependency failed or was cancelled
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
run: exit 1
- run: echo "All CI jobs passed."
Loading
Loading