Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename ci file #19

Open
wants to merge 10 commits into
base: 1_starting_ci
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
- name: Install dev dependencies
run: pip install -r requirements_test.txt
- name: Run Linter
run: "Trainee should add command to run flake8"
run: python -m flake8
- name: Run Vulture
run: "Trainee should add command to run vulture"
run: python -m vulture . --min-confidence 100
- name: Run tests
run: "Trainee should add command to run test"
run: python -m pytest --cov=formation_indus_ds_avancee/ tests/test_unit/ -vv -p no:warnings


4 changes: 2 additions & 2 deletions dags/get_data_from_engie_hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
from airflow.operators.python_operator import PythonOperator
from airflow.utils.dates import days_ago

sys.path.insert(0, os.path.abspath(os.path.dirname(os.path.dirname(__file__)))) # So that airflow can find config files

from dags.config import TRAIN_DATA_PATH, GENERATED_DATA_FOLDER
from formation_indus_ds_avancee.data_loading import get_data_from_csv

sys.path.insert(0, os.path.abspath(os.path.dirname(os.path.dirname(__file__)))) # So that airflow can find config files

dag = DAG(dag_id='data_generator',
description='Get data every 2min from Engie hub CSV',
catchup=False,
Expand Down
4 changes: 2 additions & 2 deletions dags/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
import sys
from datetime import timedelta

sys.path.insert(0, os.path.abspath(os.path.dirname(os.path.dirname(__file__)))) # So that airflow can find config files

from airflow import DAG
from airflow.operators.python_operator import PythonOperator
from airflow.utils.dates import days_ago
Expand All @@ -12,6 +10,8 @@
from formation_indus_ds_avancee.feature_engineering import prepare_features_with_io
from formation_indus_ds_avancee.train_and_predict import train_model_with_io

sys.path.insert(0, os.path.abspath(os.path.dirname(os.path.dirname(__file__)))) # So that airflow can find config files

dag = DAG(dag_id='train',
description='Training DAG',
start_date=days_ago(1),
Expand Down
4 changes: 3 additions & 1 deletion requirements_test.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
behave
pytest
pytest-cov
pytest-cov
vulture
flake8