diff --git a/.github/workflows/publish-python-package.yml b/.github/workflows/publish-python-package.yml new file mode 100644 index 0000000..e7d8f68 --- /dev/null +++ b/.github/workflows/publish-python-package.yml @@ -0,0 +1,32 @@ +# This workflow will upload a Python Package using Twine when a release is created +# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries + +name: Publish Python Package + +on: + release: + types: [created] + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.9" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + pip install setuptools wheel twine + - name: Build and publish + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + TWINE_REPOSITORY: pypi + run: | + python setup.py sdist bdist_wheel + twine upload dist/* diff --git a/.github/workflows/test-python-package.yml b/.github/workflows/test-python-package.yml index 2354b7f..5718d42 100644 --- a/.github/workflows/test-python-package.yml +++ b/.github/workflows/test-python-package.yml @@ -12,13 +12,16 @@ on: jobs: build: runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.8, 3.9] steps: - uses: actions/checkout@v3 - - name: Set up Python 3.9 + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: ${{ matrix.python-version }} - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/README.md b/README.md index 5346122..995de9f 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,19 @@ To run tests: python -m pytest tests/unittests ``` +### Citing +If you use `ablation` in your work, please cite our paper: + +``` +@inproceedings{hameed:basedxai:2022, + author = {Hameed, Isha and Sharpe, Samuel and Barcklow, Daniel and Au-Yeung, Justin and Verma, Sahil and Huang, Jocelyn and Barr, Brian and Bruss, C. Bayan}, + title = {{BASED-XAI: Breaking Ablation Studies Down for Explainable Artificial Intelligence}}, + year = {2022}, + maintitle = {ACM SIGKDD International Conference on Knowledge Discovery and Data Mining}, + booktitle = {Workshop on Machine Learning in Finance}, +} +``` + ### Contributors We welcome Your interest in Capital One’s Open Source Projects (the diff --git a/setup.py b/setup.py index 9904333..e2195fb 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,4 @@ +import os import re from pathlib import Path from typing import List @@ -26,11 +27,13 @@ # fmt: on CLASSIFIERS = [ - "Intended Audience :: Everyone", + "Intended Audience :: Science/Research", + "Topic :: Scientific/Engineering :: Artificial Intelligence", "Natural Language :: English", "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3.9", + "License :: OSI Approved :: Apache Software License", + "Development Status :: 3 - Alpha", + "Programming Language :: Python :: 3", ] # No versioning on extras for dev, always grab the latest @@ -54,7 +57,7 @@ "flake8-docstrings", "edgetest", ], - # "build": ["twine", "wheel"], + "build": ["twine", "wheel"], } EXTRAS_REQUIRE["dev"] = ( @@ -84,6 +87,11 @@ def find_meta(meta): URL = find_meta("url") LONG = "Ablation studies for evaluating XAI methods" +data_dir = "ablation/data" +data_files = [ + (d, [os.path.join(d, f) for f in files]) + for d, _, files in os.walk(data_dir) +] #################################################################################################### # Installation functions #################################################################################################### @@ -98,11 +106,7 @@ def install_pkg(): long_description=LONG, url=URL, project_urls=PROJECT_URLS, - # author=find_meta("author"), - # author_email=find_meta("email"), - # maintainer=find_meta("author"), - # maintainer_email=find_meta("email"), - # license=LICENSE, + author="Samuel Sharpe, Daniel Barcklow, Isha Hameed, Justin Au-Yeung, Brian Barr", python_requires=">=3.8.0", packages=PACKAGES, install_requires=INSTALL_REQUIRES, @@ -110,6 +114,7 @@ def install_pkg(): extras_require=EXTRAS_REQUIRE, include_package_data=True, zip_safe=False, + data_files=data_files, )