Skip to content

Commit

Permalink
Merge pull request #20 from 16bravo/bugfix/corrections_yaml_v2
Browse files Browse the repository at this point in the history
corrections yaml chemin acces
  • Loading branch information
16bravo authored Dec 20, 2023
2 parents 1101d8b + ad2dbc6 commit 95e415f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/init_database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Vérifier l'existence de la base de données
id: check-db
run: |
if [ -f ./data/BranvoRanking.db ]; then
if [ -f data/BranvoRanking.db ]; then
echo "Database exists already. No need for init."
echo "::set-output name=init_required::false"
else
Expand Down
4 changes: 2 additions & 2 deletions scripts/db_initialisation.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#Filtre sur la validité des matches
# Chargement des données depuis les fichiers CSV
# matches a été généré avec l'API Kaggle
teams_db = pd.read_excel('./data/teams_db.xlsx')
teams_db = pd.read_excel('data/teams_db.xlsx')

# Fusion des DataFrames sur les colonnes home_team et away_team
merged_df = pd.merge(matches, teams_db[['team', 'tricode']], how='inner', left_on='home_team', right_on='team')
Expand Down Expand Up @@ -210,7 +210,7 @@
# ## Création de la base et des tables

# Chemin et nom de la base de données
database_path = './data/BravoRanking.db'
database_path = 'data/BravoRanking.db'

# Connexion à la base de données (la base sera créée si elle n'existe pas)
conn = sqlite3.connect(database_path)
Expand Down
4 changes: 2 additions & 2 deletions scripts/json_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import json

# Connexion à la base de données SQLite
database_path = "./data/BravoRanking.db"
database_path = "data/BravoRanking.db"
connection = sqlite3.connect(database_path)
cursor = connection.cursor()

Expand Down Expand Up @@ -32,7 +32,7 @@
connection.close()

# Exportation des données vers un fichier JSON
json_path = "./data/LastMonthRanking.json"
json_path = "data/LastMonthRanking.json"
with open(json_path, "w", encoding="utf-8") as json_file:
json.dump(data, json_file, indent=2)

Expand Down

0 comments on commit 95e415f

Please sign in to comment.