Skip to content

Commit

Permalink
Merge pull request #11 from capitalone/pypi
Browse files Browse the repository at this point in the history
pypi and citation
  • Loading branch information
ssharpe42 authored Sep 9, 2022
2 parents ababcdf + add6994 commit 29b773b
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 11 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/publish-python-package.yml
Original file line number Diff line number Diff line change
@@ -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/*
7 changes: 5 additions & 2 deletions .github/workflows/test-python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 14 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import re
from pathlib import Path
from typing import List
Expand Down Expand Up @@ -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
Expand All @@ -54,7 +57,7 @@
"flake8-docstrings",
"edgetest",
],
# "build": ["twine", "wheel"],
"build": ["twine", "wheel"],
}

EXTRAS_REQUIRE["dev"] = (
Expand Down Expand Up @@ -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
####################################################################################################
Expand All @@ -98,18 +106,15 @@ 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,
classifiers=CLASSIFIERS,
extras_require=EXTRAS_REQUIRE,
include_package_data=True,
zip_safe=False,
data_files=data_files,
)


Expand Down

0 comments on commit 29b773b

Please sign in to comment.