Skip to content

Commit cba0d4e

Browse files
authored
Merge pull request #2 from OSS-Pole-Emploi/update/update_ci
Updated the CI to include python versions
2 parents d560b56 + e425fae commit cba0d4e

File tree

5 files changed

+15
-43
lines changed

5 files changed

+15
-43
lines changed

.github/workflows/ci.yml

+1-34
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,12 @@ on:
77
- main
88

99
jobs:
10-
pre-commit:
11-
runs-on: ubuntu-latest
12-
steps:
13-
- uses: actions/checkout@v2
14-
- uses: actions/setup-python@v2
15-
- uses: pre-commit/[email protected]
1610

1711
checks:
1812
runs-on: ubuntu-latest
1913
strategy:
2014
matrix:
21-
python-version:
22-
- 3.6
23-
- 3.7
24-
- 3.8
25-
- 3.9
15+
python-version: ["3.8", "3.9", "3.10", "3.11"]
2616
name: Check Python ${{ matrix.python-version }}
2717
steps:
2818
- uses: actions/checkout@v2
@@ -40,26 +30,3 @@ jobs:
4030

4131
- name: Test
4232
run: python -m pytest
43-
44-
build-docs:
45-
runs-on: ubuntu-latest
46-
steps:
47-
- uses: actions/checkout@v2
48-
49-
- uses: actions/setup-python@v2
50-
with:
51-
python-version: 3.8
52-
53-
- name: Install
54-
run: python -m pip install -e .[doc]
55-
56-
- name: Build docs
57-
run: |
58-
cd docs
59-
make html
60-
61-
- name: Upload docs artifact
62-
uses: actions/upload-artifact@v2
63-
with:
64-
name: Documentation
65-
path: docs/_build/html/*

.github/workflows/publish-pypi.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
fetch-depth: 0
1515
ref: ${{ github.event.release.tag_name }}
1616

17-
- name: Set up Python 3.7
17+
- name: Set up Python 3.11
1818
uses: actions/setup-python@v1
1919
with:
20-
python-version: 3.7
20+
python-version: 3.11
2121

2222
- name: Install pypa/build
2323
run: python -m pip install build --user

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
This is a fork of the fairlens project. We went back to version 0.1.0 and modified some dependencies in order to include it in gabarit (https://github.com/OSS-Pole-Emploi/gabarit)
2+
3+
14
![FairLens Logo](docs/_static/FairLens_759x196.png)
25

36
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)][sdk_colab_url]
@@ -10,6 +13,8 @@
1013
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
1114
![GitHub Repo stars](https://img.shields.io/github/stars/synthesized-io/fairlens?style=social)
1215

16+
17+
1318
# FairLens
1419

1520
FairLens is an open source Python library for automatically discovering bias and measuring fairness in data. The package can be used to quickly identify bias, and provides multiple metrics to measure fairness across a range of sensitive and legally protected characteristics such as age, race and sex.

setup.cfg

+6-6
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ test =
5555
pyemd>=1.0.0
5656

5757
doc =
58-
sphinx==3.5.4
59-
ipython==7.23.1
60-
m2r2==0.2.7
61-
pydata-sphinx-theme==0.6.3
62-
sphinx-panels==0.6.0
63-
sphinxcontrib-bibtex==2.3.0
58+
sphinx==7.2.6
59+
ipython==8.16.1
60+
m2r2==0.3.3.post2
61+
pydata-sphinx-theme==0.14.2
62+
sphinx-panels==0.4.1
63+
sphinxcontrib-bibtex==2.6.1
6464

6565
[flake8]
6666
max-line-length = 120

src/fairlens/metrics/significance.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def binominal_proportion_p_value(p_obs: float, p_null: float, n: int, alternativ
3636
The p-value under the null hypothesis.
3737
"""
3838

39-
k = np.ceil(p_obs * n)
39+
k = int(np.ceil(p_obs * n))
4040
result = binomtest(k, n, p_null, alternative)
4141
return result.pvalue
4242

0 commit comments

Comments
 (0)