Skip to content

Commit

Permalink
Summary
Browse files Browse the repository at this point in the history
  • Loading branch information
Illia-Kryvoviaz committed Jun 7, 2023
1 parent deff04d commit c6c90fd
Show file tree
Hide file tree
Showing 295 changed files with 79,793 additions and 942 deletions.
102 changes: 102 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Continuous Integration

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
paths-ignore:
- '*.md'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build-py:
runs-on: ubuntu-18.04

strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9]

env:
UCI_DB: "https://archive.ics.uci.edu/ml/machine-learning-databases"
PROPUBLICA_GH: "https://raw.githubusercontent.com/propublica/compas-analysis/bafff5da3f2e45eca6c2d5055faad269defd135a"

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Check out repo
uses: actions/checkout@v3

- name: Set up R
uses: r-lib/actions/setup-r@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -e '.[all]'
pip install flake8
pip list
python -m rpy2.situation
- name: Download datasets
run: |
wget ${UCI_DB}/adult/adult.data -P aif360/data/raw/adult/
wget ${UCI_DB}/adult/adult.test -P aif360/data/raw/adult/
wget ${UCI_DB}/adult/adult.names -P aif360/data/raw/adult/
wget ${UCI_DB}/statlog/german/german.data -P aif360/data/raw/german/
wget ${UCI_DB}/statlog/german/german.doc -P aif360/data/raw/german/
wget ${PROPUBLICA_GH}/compas-scores-two-years.csv -P aif360/data/raw/compas/
(cd aif360/data/raw/meps;Rscript generate_data.R <<< y)
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: pytest tests

build-r:
runs-on: ubuntu-18.04

strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9]

steps:
- name: Check out repo
uses: actions/checkout@v3

- name: Set up R
uses: r-lib/actions/setup-r@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install R dependencies
run: install.packages(c("reticulate", "rstudioapi", "testthat"))
shell: Rscript {0}

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install '.[all]'
- name: Install R package
run: R CMD INSTALL aif360/aif360-r
118 changes: 21 additions & 97 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,104 +1,28 @@
# Byte-compiled / optimized / DLL files
.DS_Store
**/.DS_Store
*.pyc
**/*.pyc
.cache/
.ipynb_checkpoints/
.pytest_cache/
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so
.venv
.idea/
.vscode/

# Distribution / packaging
.Python
.eggs/
aif360.egg-info
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject
.coverage*
coverage.txt

# mkdocs documentation
/site
docs/build/
docs/source/modules/generated

# mypy
.mypy_cache/
aif360/version.py
aif360/data/raw/**
!aif360/data/raw/*/*.md
aif360/sklearn/data/
.Rproj.user
18 changes: 18 additions & 0 deletions AIF360.Rproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Version: 1.0

RestoreWorkspace: Default
SaveWorkspace: Default
AlwaysSaveHistory: Default

EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8

RnwWeave: Sweave
LaTeX: pdfLaTeX

BuildType: Package
PackageUseDevtools: Yes
PackagePath: aif360/aif360-r
PackageInstallArgs: --no-multiarch --with-keep.source
42 changes: 42 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
This is an open source project, and we appreciate your help!

We use the GitHub issue tracker to discuss new features and non-trivial bugs.

To contribute code, documentation, or tests, please submit a pull request to
the GitHub repository. The pull request template includes a disclaimer based
on the [Developer's Certificate of Origin 1.1](https://elinux.org/Developer_Certificate_Of_Origin)
and provides your assurance to the community that you wrote the code you are
contributing or have the right to pass on the code that you are contributing.

Please follow the guidelines specified in [MAINTAINERS](MAINTAINERS.md) before
submitting your pull request.

Generally, we expect two maintainers to review your pull
request before it is approved for merging. For more details, see the
[MAINTAINERS](MAINTAINERS.md) page.

## Contributors

Below is an (incomplete) list of people (in alphabetical order) who contributed to this project
via code, tests, or documentation:

* Rachel Bellamy
* Kuntal Dey
* Mike Hind
* Sam Hoffman
* Stephanie Houde
* Kalapriya Kannan
* Pranay Lohia
* Jacquelyn Martino
* Sameep Mehta
* Saška Mojsilović
* Seema Nagar
* Karthi Natesan Ramamurthy
* John Richards
* Dipti Saha
* Prasanna Sattigeri
* Animesh Singh
* Moninder Singh
* Kush Varshney
* Dakuo Wang
* Yunfeng Zhan
3 changes: 2 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -186,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]
Copyright 2018-2021 The AI Fairness 360 (AIF360) Authors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
79 changes: 79 additions & 0 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Maintainers Guide

Following is the current list of maintainers on this project

The maintainers are listed in alphabetical order.
- Michael Hind ([michaelhind](https://github.com/michaelhind))
- Sam Hoffman ([hoffmansc](https://github.com/hoffmansc))
- Karthi Natesan Ramamurthy ([nrkarthikeyan](https://github.com/nrkarthikeyan))
- Stacey Ronaghan ([srnghn](https://github.com/srnghn))
- Prasanna Sattigeri ([pronics2004](https://github.com/pronics2004))
- Animesh Singh ([animeshsingh](https://github.com/animeshsingh))
- Saishruthi Swaminathan ([SSaishruthi](https://github.com/SSaishruthi))
- Kush Varshney ([krvarshney](https://github.com/krvarshney))
- Gabriela de Queiroz ([gdequeiroz](https://github.com/gdequeiroz))

## Methodology

This repository does not have a traditional release management cycle, but
should instead be maintained as a useful, working, and polished reference at
all times. While all work can therefore be focused on the master branch, the
quality of this branch should never be compromised.

The remainder of this document details how to merge pull requests to the
repositories.

## Merge approval

The project maintainers use LGTM (Looks Good To Me) in comments on the pull
request to indicate acceptance prior to merging. A change requires LGTMs from
two project maintainers. If the code is written by a maintainer, the change
only requires one additional LGTM.

## Reviewing Pull Requests

We recommend reviewing pull requests directly within GitHub. This allows a
public commentary on changes, providing transparency for all users. When
providing feedback be civil, courteous, and kind. Disagreement is fine, so long
as the discourse is carried out politely. If we see a record of uncivil or
abusive comments, we will revoke your commit privileges and invite you to leave
the project.

During your review, consider the following points:

### Does the change have positive impact?

Some proposed changes may not represent a positive impact to the project. Ask
whether or not the change will make understanding the code easier, or if it
could simply be a personal preference on the part of the author (see
[bikeshedding](https://en.wiktionary.org/wiki/bikeshedding)).

Pull requests that do not have a clear positive impact should be closed without
merging.

### Do the changes make sense?

If you do not understand what the changes are or what they accomplish, ask the
author for clarification. Ask the author to add comments and/or clarify test
case names to make the intentions clear.

At times, such clarification will reveal that the author may not be using the
code correctly, or is unaware of features that accommodate their needs. If you
feel this is the case, work up a code sample that would address the pull
request for them, and feel free to close the pull request once they confirm.

### Does the change introduce a new feature?

For any given pull request, ask yourself "is this a new feature?" If so, does
the pull request (or associated issue) contain narrative indicating the need
for the feature? If not, ask them to provide that information.

Are new unit tests in place that test all new behaviors introduced? If not, do
not merge the feature until they are! Is documentation in place for the new
feature? (See the documentation guidelines). If not do not merge the feature
until it is! Is the feature necessary for general use cases? Try and keep the
scope of any given component narrow. If a proposed feature does not fit that
scope, recommend to the user that they maintain the feature on their own, and
close the request. You may also recommend that they see if the feature gains
traction among other users, and suggest they re-submit when they can show such
support.
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
recursive-include aif360/data/ *
include LICENSE
Loading

0 comments on commit c6c90fd

Please sign in to comment.