From 92f2c4701355fa7e722bb6517d9a0efc219cd490 Mon Sep 17 00:00:00 2001 From: midaa1 Date: Thu, 5 Feb 2026 16:45:46 +0200 Subject: [PATCH 1/5] Update GitHub Actions workflow to remove push trigger Removed push trigger for main branch and unused steps. --- .github/workflows/main.yml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dd51045c..8d68e718 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,27 +5,13 @@ name: CI # Controls when the action will run. on: # Triggers the workflow on push or pull request events but only for the main branch - push: - branches: [main] pull_request: branches: [main] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - # This workflow contains a single job called "build" build: - # The type of runner that the job will run on runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 - - uses: akhileshns/heroku-deploy@v3.12.12 # This is the action - with: - heroku_api_key: ${{secrets.HEROKU_API_KEY}} # Located in GitHub secrets - heroku_app_name: "web-eye-tracker-1204" # Must be unique in Heroku - heroku_email: "karine.pistili@gmail.com" From f425920fe58aa4e0a04800f162e3305c68f6717a Mon Sep 17 00:00:00 2001 From: midaa1 Date: Thu, 5 Feb 2026 16:46:46 +0200 Subject: [PATCH 2/5] Refactor CI workflow configuration --- .github/workflows/main.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8d68e718..29480fcc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,15 +1,10 @@ -# This is a basic workflow to help you get started with Actions - name: CI -# Controls when the action will run. on: - # Triggers the workflow on push or pull request events but only for the main branch pull_request: branches: [main] - - # Allows you to run this workflow manually from the Actions tab workflow_dispatch: + jobs: build: runs-on: ubuntu-latest From 98e1b5099971df5c3d6b4775e8531aaa149cfbe2 Mon Sep 17 00:00:00 2001 From: midaa1 Date: Thu, 5 Feb 2026 16:49:31 +0200 Subject: [PATCH 3/5] Enhance CI workflow with Heroku deployment steps Added push event trigger for CI workflow and included steps for Heroku CLI installation and deployment. --- .github/workflows/main.yml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 29480fcc..362ded0d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,6 +1,8 @@ name: CI on: + push: + branches: [main] pull_request: branches: [main] workflow_dispatch: @@ -8,5 +10,24 @@ on: jobs: build: runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v2 + # Checkout repository + - name: Checkout code + uses: actions/checkout@v2 + + # Install Heroku CLI + - name: Install Heroku CLI + run: curl https://cli-assets.heroku.com/install-ubuntu.sh | sh + + # Verify Heroku installation (optional but useful) + - name: Verify Heroku CLI + run: heroku --version + + # Deploy to Heroku + - name: Deploy to Heroku + uses: akhileshns/heroku-deploy@v3.12.12 + with: + heroku_api_key: ${{ secrets.HEROKU_API_KEY }} + heroku_app_name: "web-eye-tracker-1204" + heroku_email: "karine.pistili@gmail.com" From a7a152511b8875c8eecdeb44f41a670abb960eda Mon Sep 17 00:00:00 2001 From: midaa1 Date: Thu, 5 Feb 2026 16:51:13 +0200 Subject: [PATCH 4/5] Update CI workflow to remove Heroku deployment Removed push trigger and Heroku deployment steps from CI workflow. --- .github/workflows/main.yml | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 362ded0d..29480fcc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,8 +1,6 @@ name: CI on: - push: - branches: [main] pull_request: branches: [main] workflow_dispatch: @@ -10,24 +8,5 @@ on: jobs: build: runs-on: ubuntu-latest - steps: - # Checkout repository - - name: Checkout code - uses: actions/checkout@v2 - - # Install Heroku CLI - - name: Install Heroku CLI - run: curl https://cli-assets.heroku.com/install-ubuntu.sh | sh - - # Verify Heroku installation (optional but useful) - - name: Verify Heroku CLI - run: heroku --version - - # Deploy to Heroku - - name: Deploy to Heroku - uses: akhileshns/heroku-deploy@v3.12.12 - with: - heroku_api_key: ${{ secrets.HEROKU_API_KEY }} - heroku_app_name: "web-eye-tracker-1204" - heroku_email: "karine.pistili@gmail.com" + - uses: actions/checkout@v2 From adbb988b2f2f75c002adfe5a5c251e55c335c392 Mon Sep 17 00:00:00 2001 From: midaa1 Date: Mon, 2 Mar 2026 12:12:50 +0200 Subject: [PATCH 5/5] fixing race condition problem --- app/routes/session.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/routes/session.py b/app/routes/session.py index 1db18593..fd6d0ea7 100644 --- a/app/routes/session.py +++ b/app/routes/session.py @@ -6,7 +6,7 @@ import csv import math import numpy as np - +import uuid from pathlib import Path import os import pandas as pd @@ -24,6 +24,7 @@ # Constants + ALLOWED_EXTENSIONS = {"txt", "webm"} COLLECTION_NAME = "session" @@ -162,7 +163,7 @@ def batch_predict(): base_path = Path().absolute() / "app/services/calib_validation/csv/data" calib_csv_path = base_path / f"{calib_id}_fixed_train_data.csv" - predict_csv_path = base_path / "temp_batch_predict.csv" + predict_csv_path = base_path / f"temp_batch_predict_{uuid.uuid4().hex}.csv" # CSV temporário with open(predict_csv_path, "w", newline="") as csvfile: @@ -187,7 +188,8 @@ def batch_predict(): screen_width=screen_width, screen_height=screen_height, ) - + os.remove(predict_csv_path) + return jsonify(convert_nan_to_none(result)) except Exception as e: