Skip to content
Open
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
14 changes: 4 additions & 10 deletions .github/workflows/notebook-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,12 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
- name: Install uv
run: |
python -m pip install --upgrade pip
- name: Install core dependencies
pip install uv
- name: Install all dependencies
run: |
pip install -r requirements.txt
- name: Install deep learning dependencies
run: |
pip install -r requirements-deeplearning.txt
- name: Install test dependencies
run: |
pip install -r requirements-test.txt
uv pip install --system -e .[deeplearning,test]
- name: Test with pytest
run: |
# pytest
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/python-linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install uv
run: |
pip install uv
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-linting.txt
uv pip install --system -e .[linting]
- name: Check sorted python imports using isort
run: |
isort . -c
Expand Down
17 changes: 6 additions & 11 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,12 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
- name: Install uv
run: |
python -m pip install --upgrade pip
- name: Install core dependencies
pip install uv
- name: Install all dependencies
run: |
pip install -r requirements.txt
- name: Install deep learning dependencies
run: |
pip install -r requirements-deeplearning.txt
- name: Install test dependencies
run: |
pip install -r requirements-test.txt
uv pip install --system -e .[deeplearning,test]
- name: Test with pytest
run: |
# pytest
Expand All @@ -62,5 +56,6 @@ jobs:
# verbose: true
- name: Check package consistency with twine
run: |
python setup.py check sdist bdist_wheel
pip install build twine
python -m build
twine check dist/*
10 changes: 6 additions & 4 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install uv
run: |
pip install uv
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
uv pip install --system build twine
- name: Build
run: |
python setup.py sdist bdist_wheel
python -m build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
95 changes: 95 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
[build-system]
requires = ["setuptools>=42", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "dice_ml"
version = "0.11"
authors = [
{name = "Ramaravind Mothilal", email = "raam.arvind93@gmail.com"},
{name = "Amit Sharma"},
{name = "Chenhao Tan"}
]
description = "Generate Diverse Counterfactual Explanations for any machine learning model."
readme = "README.rst"
requires-python = ">=3.9"
license = {text = "MIT"}
classifiers = [
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
keywords = ["machine-learning", "explanation", "interpretability", "counterfactual"]
dependencies = [
"jsonschema",
"numpy>=1.20.0",
"pandas>=2.0.0",
"scikit-learn",
"tqdm",
"raiutils>=0.4.0",
"xgboost",
"lightgbm",
]

[project.urls]
"Homepage" = "https://github.com/interpretml/DiCE"
"Download" = "https://github.com/interpretml/DiCE/archive/v0.11.tar.gz"

[project.optional-dependencies]
deeplearning = [
"numpy<2.0.0",
"tensorflow>=1.13.1",
"torch",
]
test = [
"ipython",
"jupyter",
"pytest==8.3.5",
"pytest-cov",
"twine",
"pytest-mock",
"rai_test_utils",
]
linting = [
"flake8",
"flake8-bugbear",
"flake8-blind-except",
"flake8-breakpoint",
"flake8-builtins",
"flake8-logging-format",
"flake8-pytest-style",
"flake8-all-not-strings",
"isort",
"packaging",
]
dev = [
"ipython",
"jupyter",
"pytest==8.3.5",
"pytest-cov",
"twine",
"pytest-mock",
"rai_test_utils",
"flake8",
"flake8-bugbear",
"flake8-blind-except",
"flake8-breakpoint",
"flake8-builtins",
"flake8-logging-format",
"flake8-pytest-style",
"flake8-all-not-strings",
"isort",
"packaging",
]

[tool.setuptools]
packages = {find = {exclude = ["tests*"]}}
include-package-data = true

[tool.setuptools.package-data]
"*" = ["*.h5", "counterfactual_explanations_v1.0.json", "counterfactual_explanations_v2.0.json"]
2 changes: 0 additions & 2 deletions requirements-deeplearning.txt

This file was deleted.

10 changes: 0 additions & 10 deletions requirements-linting.txt

This file was deleted.

7 changes: 0 additions & 7 deletions requirements-test.txt

This file was deleted.

8 changes: 0 additions & 8 deletions requirements.txt

This file was deleted.

53 changes: 0 additions & 53 deletions setup.py

This file was deleted.

Loading