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

Setting up the project #82

Closed
wants to merge 3 commits into from
Closed
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
36 changes: 4 additions & 32 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ on:
- completed
workflow_dispatch:


jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -28,40 +27,13 @@ jobs:
python-version: '3.10'

#----------------------------------------------
# ----- install & configure poetry -----
#----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true

#----------------------------------------------
# load cached venv if cache exists
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
#----------------------------------------------
# install dependencies if cache does not exist
# install dependencies
#----------------------------------------------
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
#----------------------------------------------
# install your root project, if required
#----------------------------------------------
- name: Install project
run: poetry install --no-interaction

run: pip install -r requirements.txt

#----------------------------------------------
# run test suite
#----------------------------------------------
- name: Run tests
run: |
source .venv/bin/activate
pytest tests/
run: pytest tests/
48 changes: 8 additions & 40 deletions .github/workflows/script_pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,63 +27,31 @@ jobs:
python-version: '3.10'

#----------------------------------------------
# ----- install & configure poetry -----
#----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true

#----------------------------------------------
# load cached venv if cache exists
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
#----------------------------------------------
# install dependencies if cache does not exist
# install dependencies
#----------------------------------------------
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
#----------------------------------------------
# install your root project, if required
#----------------------------------------------
- name: Install project
run: poetry install --no-interaction
run: pip install -r requirements.txt

#----------------------------------------------
# run data collection
#----------------------------------------------
- name: Run data collection script
run: |
source $VENV
python run_data_collection.py

run: python run_data_collection.py

#----------------------------------------------
# run updates
#----------------------------------------------
#- name: Run updates script
# run: |
# source $VENV
# python run_updates.py
# run: python run_updates.py

#----------------------------------------------
# run predictions
#----------------------------------------------
- name: Run predictions script
run: |
source $VENV
python run_predictions.py
run: python run_predictions.py

#----------------------------------------------
# run evaluation
#----------------------------------------------
- name: Run evaluation script
run: |
source $VENV
python run_evaluation_per_season.py
run: python run_evaluation_per_season.py
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
mlruns/**
htmlcov/**
poetry.lock
.coverage
/raw_files/**
/preprocessed_files/**
Expand Down
60 changes: 23 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# EuropeanFotballLeaguePredictor
# EuropeanFootballLeaguePredictor

EuropeanFootballLeaguePredictor is a predictor of europes top league games based on historic performances of teams, taking into account only advanced league table statistics. It uses traditional machine learning techniques and statistical modeling in order to deduct data driven predictions based on the team’s season performance and recent form. The EuropeanFootballLeaguePredictor includes EnglishPremierLegue, La Liga, Ligue 1, Bundesliga, Serie A.

Expand All @@ -14,48 +14,34 @@ The [EuropeanFootballLeaguePredictor Github Page](https://nickpadd.github.io/Eur


## How to run the project
### Installing Project Dependencies
### Haven’t installed the project yet? Time to dive in!
1. Clone this repository to your local machine or download the project files.

```bash
git clone https://github.com/nickpadd/EuropeanFootballLeaguePredictor

2. Navigate to the project directory using the command line.
```bash
cd EuropeanFootballLeaguePredictor

- Managing dependencies with Poetry:
- Installing poetry:
```bash
pip install poetry
```
- Installing project dependencies:
```bash
poetry install
```

- Running the poetry shell (a virtual environment with the dependencies installed):
```bash
poetry shell

- Alternative method via venv:
- Create a virtual environment using venv:
```bash
python3 -m venv venv
```
- Activate the virtual environment:
- On Windows:
```bash
venv\Scripts\activate
```
- On macOS/Linux:
```bash
source venv/bin/activate
```
- Install requirements:
```bash
pip install -r requirements.txt
```
3. Run the following command in the terminal:
- macOS/Linux users
```bash
bash run_project_setup.sh

- Windows users
```bash
run_project_setup.bat

The script will install the project dependencies and create a virtual environment for the project.<br>
**Wait until it's finished and don't close the terminal.**

### (Already) installed the project? Let's get started!
1. Open the terminal and navigate to the project folder *EuropeanFootballLeaguePredictor*.
2. Run the following command in the terminal:
- macOS/Linux users
```bash
source eflp_venv/bin/activate
- Windows users
```bash
eflp_venv\Scripts\activate

### Configuration
The configuration file europeanfootballleaguepredictor/config/config.yaml includes many of the models parameters such as:
Expand Down
Loading