Skip to content

Commit d8b82b1

Browse files
committed
updating requirements, adding pre-commit, and formatting code with black
1 parent ad24076 commit d8b82b1

28 files changed

+209
-170
lines changed

.pre-commit-config.yaml

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,31 @@
1-
---
21
repos:
32

4-
-
5-
repo: https://github.com/ambv/black
6-
rev: 20.8b1
7-
hooks:
8-
-
9-
id: black
10-
language_version: python3
3+
- repo: https://github.com/pre-commit/pre-commit-hooks
4+
rev: v2.3.0
5+
hooks:
6+
- id: check-yaml
7+
- id: end-of-file-fixer
8+
- id: trailing-whitespace
9+
- id: check-added-large-files
10+
- id: debug-statements
11+
language_version: python3
1112

12-
- repo: local
13-
hooks:
14-
- id: python-tests
15-
name: pytests
16-
entry: pytest src/tests
17-
language: python
18-
additional_dependencies: [pre-commit, pytest, pandas, sklearn, matplotlib]
19-
always_run: true
20-
pass_filenames: false
13+
- repo: https://github.com/psf/black
14+
rev: 22.10.0
15+
hooks:
16+
- id: black
17+
args: [--safe]
18+
19+
- repo: local
20+
hooks:
21+
- id: pylint
22+
name: pylint
23+
files: .
24+
entry: pylint
25+
language: system
26+
types: [python3]
27+
args: [
28+
"-rn", # Only display messages
29+
"-sn", # Don't display the score
30+
"--rcfile=.pylintrc", # Link to your config file
31+
]

data/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ Finally, you can download the dataset using the following command:
1212
bash download_data.sh
1313
```
1414

15-
The dataset will be temporarily saved locally (inside the `data` folder) and transferred to your AWS S3 bucket. After that, the dataset will be deleted. If you choose to not use an AWS S3 Bucket, then the dataset will be stored into the `data` folder.
15+
The dataset will be temporarily saved locally (inside the `data` folder) and transferred to your AWS S3 bucket. After that, the dataset will be deleted. If you choose to not use an AWS S3 Bucket, then the dataset will be stored into the `data` folder.

data/download_data.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,3 @@ if [[ "$CONFIG_S3" != "YOUR_S3_BUCKET_URL" ]]; then
3939

4040
# deleting the create folder
4141
rm Original_ObesityDataSet.csv
42-

notebooks/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Here go the notebooks used for research and development. The main idea is to try
44

55
## Setup Credentials
66

7-
If you haven't your credentials yet, please check the `docs` folder first before following along.
7+
If you haven't your credentials yet, please check the `docs` folder first before following along.
88

99
1. Set your `AWS Credentials` and `Kaggle API Credentials` (used to download the dataset) in the `credentials.yaml` file.
1010

@@ -44,4 +44,4 @@ sudo docker log <CONTAINER_ID>
4444
- Run the `EDA` notebook.
4545
- Run the `Data Processing` notebook.
4646
- Run the `Experimentations` notebook (will test different Machine Learning models, different hyperparameters for each model, and do some feature engineering and selection).
47-
- Register the best models to the MLflow model registry using the `Experimentations` notebook (last cell) or the MLflow's user interface.
47+
- Register the best models to the MLflow model registry using the `Experimentations` notebook (last cell) or the MLflow's user interface.

notebooks/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.1.0
1+
1.3.0

notebooks/dev_Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ WORKDIR /e2e-project
1717
RUN pip install --no-cache-dir -U pip
1818

1919
# installing requirements
20-
RUN pip install -r notebooks/requirements_dev.txt
20+
RUN pip install -r notebooks/requirements_dev.txt

notebooks/docs/SETUP_AWS.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ aws ec2 authorize-security-group-ingress \
196196
--group-id "sg-0613261580cd87115" \
197197
--protocol tcp \
198198
--port 5000 \
199-
--cidr "0.0.0.0/0"
199+
--cidr "0.0.0.0/0"
200200
```
201201

202202
The output should look like this:
@@ -224,7 +224,7 @@ aws ec2 authorize-security-group-ingress \
224224
--group-id "sg-0613261580cd87115" \
225225
--protocol tcp \
226226
--port 22 \
227-
--cidr "18.206.107.24/29"
227+
--cidr "18.206.107.24/29"
228228
```
229229

230230
The output should look like this:
@@ -579,4 +579,4 @@ pipenv install mlflow boto3 psycopg2-binary awscli
579579
pipenv shell
580580

581581
aws configure
582-
```
582+
```

notebooks/docs/SETUP_KAGGLE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Setting up Kaggle's Account
22

3-
To use the Kaggle API, sign up for a Kaggle account at https://www.kaggle.com. Then go to the 'Account' tab of your user profile (https://www.kaggle.com/<username>/account) and select 'Create API Token'. This will trigger the download of kaggle.json, a file containing your API credentials. Set your `Kaggle API Credentials` (used to download the dataset) in the `credentials.yaml` file.
3+
To use the Kaggle API, sign up for a Kaggle account at https://www.kaggle.com. Then go to the 'Account' tab of your user profile (https://www.kaggle.com/<username>/account) and select 'Create API Token'. This will trigger the download of kaggle.json, a file containing your API credentials. Set your `Kaggle API Credentials` (used to download the dataset) in the `credentials.yaml` file.

notebooks/requirements_dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ optuna==3.6.1
1212
pandas==1.5.2
1313
scikit_learn==1.3.2
1414
seaborn==0.13.2
15-
xgboost==2.1.1
15+
xgboost==2.1.1

requirements.txt

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
scikit-learn>=0.23
2-
pandas
3-
seaborn
4-
matplotlib
5-
joblib
6-
numpy
7-
ibm_watson_machine_learning
8-
pyyaml
9-
pytest
10-
pytest-dependency
11-
pre-commit
1+
boto3==1.35.6
2+
fastapi==0.115.5
3+
joblib==1.3.2
4+
loguru==0.7.2
5+
mlflow==2.17.2
6+
numpy==2.1.3
7+
pandas==1.5.2
8+
pydantic==2.9.2
9+
pytest==8.3.3
10+
PyYAML==6.0.2
11+
scikit_learn==1.3.2
12+
xgboost==2.1.2

0 commit comments

Comments
 (0)