-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
55 changed files
with
21,142 additions
and
481 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[run] | ||
omit = sklift/tests/*,*__init__.py* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,29 +3,67 @@ name: Python package | |
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
|
||
pull_request_target: | ||
|
||
jobs: | ||
test: | ||
name: Check tests | ||
runs-on: ${{ matrix.operating-system }} | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
# fix the python version and the operating system for codecoverage commentator | ||
USING_COVERAGE_PY: '3.8' | ||
USING_COVERAGE_OS: 'ubuntu-latest' | ||
outputs: | ||
# fix the results of pytest for unix | ||
output1: ${{ steps.pytest.outputs.exit_code }} | ||
|
||
strategy: | ||
matrix: | ||
operating-system: [ubuntu-latest, windows-latest, macos-latest] | ||
python-version: [3.6, 3.7, 3.8, 3.9] | ||
os: ['ubuntu-latest', 'windows-latest', 'macos-latest'] | ||
python-version: ['3.6', '3.7', '3.8', '3.9'] | ||
# GitHub does not cancel all in-progress jobs if any matrix job fails | ||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies and lints | ||
run: pip install pytest .[tests] | ||
- name: Run PyTest | ||
run: pytest | ||
- uses: actions/checkout@v2 | ||
# Install python | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
# Update pip and install dependencies | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install . -r test_requirements.txt -r requirements.txt | ||
# Pytest in windows | ||
- name: Run PyTest windows | ||
if: ${{ matrix.os == 'windows-latest' }} | ||
run: | | ||
pytest | tee pytest-coverage.txt | ||
# Pytest in unix. Exit code of this run captures the exit status of tee and not of pytest | ||
# So, use $PIPESTATUS that holds the exit status of each command in pipeline | ||
- name: Run PyTest unix | ||
if: ${{ matrix.os != 'windows-latest' }} | ||
id: pytest | ||
run: | | ||
pytest | tee pytest-coverage.txt; | ||
exit_code=${PIPESTATUS[0]}; | ||
echo "::set-output name=exit_code::$exit_code" | ||
# Сomment on the results of the test coverage | ||
- name: Comment coverage | ||
if: contains(env.USING_COVERAGE_PY, matrix.python-version) && contains(env.USING_COVERAGE_OS, matrix.os) | ||
uses: MishaKav/[email protected] | ||
with: | ||
pytest-coverage-path: ./pytest-coverage.txt | ||
junitxml-path: ./pytest.xml | ||
# For unix workflow should have failed if exit code of pytest were 1 | ||
- name: Check fail of pytest unix | ||
if: ${{ matrix.os != 'windows-latest' && steps.pytest.outputs.exit_code == 1 }} | ||
uses: actions/github-script@v3 | ||
with: | ||
script: | | ||
core.setFailed('Some tests failed!') | ||
check_sphinx_build: | ||
name: Check Sphinx build for docs | ||
|
@@ -34,15 +72,15 @@ jobs: | |
matrix: | ||
python-version: [3.8] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Update pip | ||
run: python -m pip install --upgrade pip | ||
- name: Install dependencies | ||
run: pip install -r docs/requirements.txt | ||
- name: Run Sphinx | ||
run: sphinx-build -b html docs /tmp/_docs_build | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Update pip and install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r docs/requirements.txt -r requirements.txt | ||
- name: Run Sphinx | ||
run: sphinx-build -W -b html docs /tmp/_docs_build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,6 +62,7 @@ coverage.xml | |
*.cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
pytest.xml | ||
|
||
# Translations | ||
*.mo | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
:orphan: | ||
|
||
******************* | ||
404 Page Not Found | ||
******************* | ||
|
||
.. image:: _static/images/sklift_404.png | ||
:alt: 404 Page not found | ||
:align: center | ||
:width: 250 px | ||
:height: 250 px | ||
|
||
Sorry, we couldn't find that page. | ||
|
||
Try using the search box or go to the `homepage <https://www.uplift-modeling.com/en/latest/index.html>`__. |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.. _Megafon: | ||
|
||
*************************************** | ||
`sklift.datasets <./>`_.fetch_megafon | ||
*************************************** | ||
|
||
.. autofunction:: sklift.datasets.datasets.fetch_megafon | ||
|
||
.. include:: ../../../sklift/datasets/descr/megafon.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,5 @@ | |
./fetch_lenta | ||
./fetch_x5 | ||
./fetch_criteo | ||
./fetch_hillstrom | ||
./fetch_hillstrom | ||
./fetch_megafon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
************************************************* | ||
`sklift.metrics <./>`_.average_squared_deviation | ||
************************************************* | ||
|
||
.. autofunction:: sklift.metrics.metrics.average_squared_deviation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
********************************************** | ||
`sklift.metrics <./>`_.make_uplift_scorer | ||
********************************************** | ||
|
||
.. autofunction:: sklift.metrics.metrics.make_uplift_scorer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
c9dd56a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage Report