Skip to content

Commit

Permalink
Merge pull request #18 from EthicallyAI/dev
Browse files Browse the repository at this point in the history
Version 0.0.3 - Properly Merged
  • Loading branch information
Shlomi Hod authored Apr 10, 2019
2 parents 170db57 + da1a833 commit 8af2aa8
Show file tree
Hide file tree
Showing 75 changed files with 71,168 additions and 9,336 deletions.
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@ pip-selfcheck.json

### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
# !.vscode/settings.json
# !.vscode/tasks.json
# !.vscode/launch.json
# !.vscode/extensions.json


# End of https://www.gitignore.io/api/macos,linux,python,jupyternotebook,visualstudiocode
3 changes: 2 additions & 1 deletion .pylint.ini
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,8 @@ ignore-docstrings=yes
ignore-imports=no

# Minimum lines number of a similarity.
min-similarity-lines=4
min-similarity-lines=100
#4


[SPELLING]
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ cache:
env:
global:
- RANDOM_SEED=0
- BOTO_CONFIG=/dev/null # https://github.com/travis-ci/travis-ci/issues/7940

before_install:
- pip install pipenv
Expand Down
2 changes: 1 addition & 1 deletion .verchew.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ version = Python 3.5.
[pipenv]

cli = pipenv
versions = 10. | 11.
versions = 10. | 11. | 2018.11 | 2018.10

[Graphviz]

Expand Down
23 changes: 23 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
Revision History
================

0.0.3 (2019/04/10)
------------------

- Fairness in Classification

- Three demographic fairness criteria

- Independence
- Separation
- Sufficiency

- Equalized odds post-processing algorithmic interventions
- Complete two notebook demos (FICO and COMPAS)

- Words embedding bias

- Measuring bias with WEAT method

- Documentation improvements

- Fixing security issues with dependencies


0.0.2 (2018/09/01)
------------------

Expand Down
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ graft */*/files
recursive-include ethically/we/data *.txt *.tsv *.json *.bin
recursive-include ethically/we/data/evaluation *.txt *.tsv *.json *.bin
recursive-include ethically/tests/data *.txt *.tsv *.json *.bin
recursive-include ethically/dataset *.txt *.csv *.json *.bin *.data *.names *.test

recursive-include docs/notebooks *.png
recursive-include docs/notebooks/* *.png
29 changes: 19 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ DEPENDENCIES = $(VENV)/.pipenv-$(shell bin/checksum Pipfile* setup.py)
install: $(DEPENDENCIES)

$(DEPENDENCIES):
pipenv run python setup.py develop
$(SETUP) develop
pipenv install --dev
@ touch $@

Expand All @@ -61,9 +61,10 @@ ISORT := pipenv run isort
PYLINT := pipenv run pylint
PYCODESTYLE := pipenv run pycodestyle
PYDOCSTYLE := pipenv run pydocstyle
RSTLINT := pipenv run rst-lint

.PHONY: check
check: isort pylint pycodestyle pydocstyle ## Run linters and static analysis
check: isort pylint pycodestyle pydocstyle rstlint ## Run linters and static analysis

.PHONY: isort
isort: install
Expand All @@ -83,9 +84,7 @@ pydocstyle: install

.PHONY: rstlint
rstlint: install
rst-lint README.rst
rst-lint CHANGELOG.rst
rst-lint CONTRIBUTING.rst
$(RSTLINT) README.rst CHANGELOG.rst CONTRIBUTING.rst

# TESTS #######################################################################

Expand Down Expand Up @@ -139,8 +138,14 @@ docs:
ln -sf `realpath CONTRIBUTING.rst --relative-to=docs/about` docs/about/contributing.rst
ln -sf `realpath LICENSE --relative-to=docs/about` docs/about/license.rst
cd docs/notebooks && find *.ipynb -exec jupyter nbconvert --to rst {} \;
cd docs && sphinx-apidoc -o api ../ethically && make html
cd docs && make html
@echo "\033[95m\n\nBuild successful! View the docs homepage at docs/_build/html/index.html.\n\033[0m"
# && sphinx-apidoc -o api ../ethically

.PHONY: show
show: docs
sleep 5 && open http://localhost:8000/docs/_build/html &
pipenv run python -m "http.server"

.PHONY: publish
publish: docs
Expand Down Expand Up @@ -190,9 +195,11 @@ build: dist
dist: install $(DIST_FILES)
$(DIST_FILES): $(MODULES)
rm -f $(DIST_FILES)
pipenv run python setup.py check --strict --metadata --restructuredtext
pipenv run python setup.py sdist
pipenv run python setup.py bdist_wheel
$(SETUP) check --strict --metadata --restructuredtext
$(SETUP) sdist
$(SETUP) bdist_wheel
$(TWINE) check dist/*


.PHONY: exe
exe: install $(EXE_FILES)
Expand All @@ -205,6 +212,7 @@ $(PROJECT).spec:

# RELEASE #####################################################################

SETUP := pipenv run python setup.py
TWINE := pipenv run twine

.PHONY: upload
Expand Down Expand Up @@ -242,7 +250,8 @@ clean-all: clean
.PHONY: .clean-docs
.clean-docs:
# rm -rf *.rst docs/apidocs *.html docs/*.png site
cd docs && make clean && rm -rf api
cd docs && make clean
cd docs/notebooks && find . ! -name '*.ipynb' -type f -exec rm -rf {} + && rm -rf -- ./*/

.PHONY: .clean-build
.clean-build:
Expand Down
17 changes: 6 additions & 11 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -1,50 +1,45 @@
[[source]]

url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[requires]

python_version = "3.5"

[dev-packages]
[packages]
ethically = {editable = true,path = "."}

[dev-packages]
# Linters
isort = "*"
pylint = "*"
pycodestyle = "*"
pep8 = "*"
pydocstyle = "*"
restructuredtext_lint = "*"

# Testing
pytest = "~= 3.3"
pytest-describe = "*"
pytest-expecter = "*"
pytest-random = "*"
pytest-cov = "*"
freezegun = "*"

# Reports
coverage-space = "*"

# Documentation
sphinx = "*"
nbconvert = "*"
docutils = "*"
pygments = "*"

# Build
wheel = "*"
pyinstaller = "*"
readme_renderer = "*"

# Release
setuptools = ">= 38.6.0"
twine = ">= 1.11.0"

# Tooling
jupyter = "*"
notebook = ">=5.7.8"
requests = ">=2.20.0"
sniffer = "*"
MacFSEvents = { version = "*", sys_platform = "== 'darwin'" }
pync = { version = "*", sys_platform = "== 'darwin'" }
Loading

0 comments on commit 8af2aa8

Please sign in to comment.