Skip to content
This repository has been archived by the owner on Jan 1, 2025. It is now read-only.

Commit

Permalink
MAJOR UPDATE - Wrapup of Version 2. Repositioning project around paid…
Browse files Browse the repository at this point in the history
… data sources and custom model development.
  • Loading branch information
jeffjohannsen committed Nov 29, 2023
1 parent 27ddec7 commit 1173875
Show file tree
Hide file tree
Showing 3,172 changed files with 906,992 additions and 79,541 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
189 changes: 143 additions & 46 deletions README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

load_dotenv()
NBA_BETTING_BASE_DIR = os.getenv("NBA_BETTING_BASE_DIR")
EMAIL_ADDRESS = os.getenv("EMAIL_ADDRESS")

# Define the DAG
dag = DAG(
Expand All @@ -17,7 +18,7 @@
"retries": 0,
"retry_delay": timedelta(minutes=5),
"start_date": pendulum.datetime(2023, 5, 1),
"email": ["[email protected]"],
"email": [EMAIL_ADDRESS],
"email_on_failure": True,
"email_on_retry": True,
},
Expand Down
6 changes: 5 additions & 1 deletion airflow_dags/daily_update/etl_daily_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,23 @@
import pendulum
from airflow import DAG
from airflow.decorators import task
from dotenv import load_dotenv

here = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.join(here, "../../"))

from src.etl.main_etl import ETLPipeline

load_dotenv()
EMAIL_ADDRESS = os.getenv("EMAIL_ADDRESS")

# Define default arguments
default_args = {
"owner": "Jeff",
"retries": 0,
"retry_delay": timedelta(minutes=5),
"start_date": pendulum.datetime(2023, 5, 1),
"email": ["[email protected]"],
"email": [EMAIL_ADDRESS],
"email_on_failure": True,
"email_on_retry": True,
}
Expand Down
6 changes: 5 additions & 1 deletion airflow_dags/daily_update/odds_api_daily_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@
import pendulum
from airflow import DAG
from airflow.decorators import task
from dotenv import load_dotenv

here = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.join(here, "../../"))

from src.data_sources.game.odds_api import update_game_data

load_dotenv()
EMAIL_ADDRESS = os.getenv("EMAIL_ADDRESS")

# Define the DAG
dag = DAG(
"Odds_Api_Daily_Update",
Expand All @@ -19,7 +23,7 @@
"retries": 0,
"retry_delay": timedelta(minutes=5),
"start_date": pendulum.datetime(2023, 5, 1),
"email": ["[email protected]"],
"email": [EMAIL_ADDRESS],
"email_on_failure": True,
"email_on_retry": True,
},
Expand Down
6 changes: 5 additions & 1 deletion airflow_dags/daily_update/predictions_daily_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,23 @@
import pendulum
from airflow import DAG
from airflow.decorators import task
from dotenv import load_dotenv

here = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.join(here, "../../"))

from src.bet_management.bet_decisions import main_predictions

load_dotenv()
EMAIL_ADDRESS = os.getenv("EMAIL_ADDRESS")

# Define default arguments
default_args = {
"owner": "Jeff",
"retries": 0,
"retry_delay": timedelta(minutes=5),
"start_date": pendulum.datetime(2023, 5, 1),
"email": ["[email protected]"],
"email": [EMAIL_ADDRESS],
"email_on_failure": True,
"email_on_retry": True,
}
Expand Down
3 changes: 2 additions & 1 deletion airflow_dags/daily_update/team_nbastats_daily_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

load_dotenv()
NBA_BETTING_BASE_DIR = os.getenv("NBA_BETTING_BASE_DIR")
EMAIL_ADDRESS = os.getenv("EMAIL_ADDRESS")

# Define the DAG
dag = DAG(
Expand All @@ -17,7 +18,7 @@
"retries": 0,
"retry_delay": timedelta(minutes=5),
"start_date": pendulum.datetime(2023, 5, 1),
"email": ["[email protected]"],
"email": [EMAIL_ADDRESS],
"email_on_failure": True,
"email_on_retry": True,
},
Expand Down
17 changes: 15 additions & 2 deletions airflow_dags/financials/betting_account_update.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,28 @@
# Import necessary modules
import os
import sys
from datetime import timedelta

import pendulum
from airflow import DAG
from airflow.decorators import task
from dotenv import load_dotenv

# Get the current directory
here = os.path.dirname(os.path.realpath(__file__))

# Add the parent directory to the sys path
sys.path.append(os.path.join(here, "../../"))

# Import the function to update the betting account balance
from src.bet_management.financials import update_betting_account_balance

# Load environment variables from .env file
load_dotenv()

# Get the email address from the environment variables
EMAIL_ADDRESS = os.getenv("EMAIL_ADDRESS")

# Define the DAG
dag = DAG(
"Betting_Account_Balance_Daily_Update",
Expand All @@ -18,12 +31,12 @@
"retries": 0,
"retry_delay": timedelta(minutes=5),
"start_date": pendulum.datetime(2023, 5, 1),
"email": ["[email protected]"],
"email": [EMAIL_ADDRESS],
"email_on_failure": True,
"email_on_retry": True,
},
description="A DAG to update betting account balance daily",
schedule="0 6 * * *", # 12am MT
schedule="0 6 * * *", # Run at 12am MT
catchup=False,
)

Expand Down
1 change: 0 additions & 1 deletion docs/_config.yml

This file was deleted.

Binary file removed docs/images/cls_model_accuracy.png
Binary file not shown.
Binary file removed docs/images/header-nba.jpg
Binary file not shown.
Binary file removed docs/images/web_app.png
Binary file not shown.
190 changes: 0 additions & 190 deletions docs/index.html

This file was deleted.

2 changes: 2 additions & 0 deletions docs/website/.bundle/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
BUNDLE_PATH: "vendor/bundle"
File renamed without changes.
3 changes: 3 additions & 0 deletions docs/website/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins
gem 'webrick', '~> 1.7'
Loading

0 comments on commit 1173875

Please sign in to comment.