-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from transferwise/pre-commit-check
Pre commit check cleanup
- Loading branch information
Showing
54 changed files
with
899 additions
and
454 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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 |
---|---|---|
@@ -1 +1 @@ | ||
* @transferwise/customer-understanding-data-science | ||
* @transferwise/customer-understanding-data-science |
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,18 @@ | ||
name: pre-commit check | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
pre-commit: | ||
name: Pre-commit check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.9 | ||
- uses: pre-commit/[email protected] |
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 |
---|---|---|
|
@@ -40,4 +40,3 @@ jobs: | |
|
||
- name: Run tests via pytest | ||
run: poetry run pytest | ||
|
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,52 @@ | ||
# File introduces automated checks triggered on git events | ||
# to enable run `pip install pre-commit && pre-commit install` | ||
# Update this file: | ||
# pre-commit autoupdate | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.3.0 | ||
hooks: | ||
- id: check-case-conflict | ||
- id: check-docstring-first | ||
- id: check-added-large-files | ||
- id: check-json | ||
- id: check-yaml | ||
- id: check-merge-conflict | ||
- id: debug-statements | ||
#- id: detect-aws-credentials | ||
# args: [--allow-missing-credentials] | ||
#- id: detect-private-key | ||
#- id: double-quote-string-fixer | ||
- id: end-of-file-fixer | ||
- id: requirements-txt-fixer | ||
- id: trailing-whitespace | ||
|
||
- repo: https://github.com/pycqa/flake8 | ||
rev: 5.0.4 | ||
hooks: | ||
- id: flake8 | ||
args: | ||
- --max-line-length=88 | ||
|
||
- repo: https://github.com/pycqa/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
|
||
# - repo: https://github.com/pycqa/pylint | ||
# rev: v2.15.4 | ||
# hooks: | ||
# - id: pylint | ||
# args: | ||
# - --disable=too-many-arguments | ||
|
||
# - repo: https://github.com/pre-commit/mirrors-mypy | ||
# rev: v0.982 | ||
# hooks: | ||
# - id: mypy | ||
# additional_dependencies: | ||
# - types-requests | ||
# - types-protobuf | ||
# - types-tqdm | ||
# - types-python-dateutil |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# TW Experimentation: A library for automated A/B testing | ||
|
||
|
||
**TW Experimentation** is a library to design experiments, check data, run statistical tests and make decisions | ||
**TW Experimentation** is a library to design experiments, check data, run statistical tests and make decisions | ||
|
||
<summary><strong><em>Table of Contents</em></strong></summary> | ||
|
||
|
@@ -67,27 +67,27 @@ For running streamlit app please just open the terminal and run: | |
run_tw_experimentation_streamlit | ||
``` | ||
|
||
2. You can install the package via the dependency manager poetry after cloning/git pull/download it as a zip from this repository. | ||
2. You can install the package via the dependency manager poetry after cloning/git pull/download it as a zip from this repository. | ||
|
||
To do so, clone the repository by running | ||
``` | ||
git clone [email protected]:transferwise/tw-experimentation.git | ||
``` | ||
from terminal. | ||
To set up poetry, run | ||
To set up poetry, run | ||
``` | ||
make set-up-poetry-mac | ||
``` | ||
for mac (or linux) and | ||
``` | ||
make set-up-poetry-windows | ||
``` | ||
for windows. | ||
Then, run | ||
for windows. | ||
Then, run | ||
``` | ||
make run-streamlit-poetry | ||
``` | ||
from the root of the package folder. | ||
``` | ||
from the root of the package folder. | ||
|
||
3. **Alernative:** TW Experimentation requires the following libraries to work which you can find in the .yml file. To install requirements please make sure you have installed the package manager Anaconda and then run the following commands in the terminal: | ||
|
||
|
@@ -112,8 +112,8 @@ conda install -c conda-forge jax | |
|
||
Make sure you have followed the installation instructions. | ||
|
||
### Notebooks | ||
You can use the jupyter notebooks `1_pre_experiment.ipynb` or `2_integrity_checks + evaluation.ipynb` for experiments design and evaluation. | ||
### Notebooks | ||
You can use the jupyter notebooks `1_pre_experiment.ipynb` or `2_integrity_checks + evaluation.ipynb` for experiments design and evaluation. | ||
The tw experimentation package can be used for different things, for example for analyzing results: | ||
|
||
```Python | ||
|
@@ -148,7 +148,7 @@ run_tw_experimentation_streamlit | |
|
||
Or: | ||
|
||
Open terminal and navigate to the repository. | ||
Open terminal and navigate to the repository. | ||
Then navigate to the folder `./tw_experimentation/streamlit`. | ||
|
||
Now run the command `streamlit run Main.py` and the app should open in your browser. | ||
|
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 |
---|---|---|
|
@@ -25,4 +25,4 @@ dependencies: | |
- snowflake_sqlalchemy | ||
- cloudpickle | ||
- jupyter | ||
- streamlit-extras | ||
- streamlit-extras |
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 |
---|---|---|
@@ -1,32 +1,32 @@ | ||
numpy~=1.23.5 | ||
pandas<=1.5.3 | ||
pytest | ||
scipy | ||
scikit_learn | ||
matplotlib | ||
dcor | ||
holidays | ||
setuptools==65.5.1 | ||
ipykernel | ||
boto3 | ||
|
||
#other | ||
causaltune | ||
cloudpickle | ||
dcor | ||
dill | ||
fsspec | ||
s3fs | ||
mlflow | ||
ipywidgets | ||
holidays | ||
ipykernel | ||
ipympl | ||
ipywidgets | ||
jupyter | ||
matplotlib | ||
mlflow | ||
networkx | ||
sympy | ||
|
||
#other | ||
causaltune | ||
statsmodels | ||
numpy~=1.23.5 | ||
numpyro | ||
pandas<=1.5.3 | ||
plotly | ||
pytest | ||
s3fs | ||
scikit_learn | ||
scipy | ||
seaborn | ||
setuptools==65.5.1 | ||
snowflake_sqlalchemy | ||
SQLAlchemy | ||
cloudpickle | ||
jupyter | ||
numpyro | ||
statsmodels | ||
streamlit | ||
sympy | ||
wise-pizza>=0.2.0 |
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
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
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.