From de21d9dcdd0387f63ddde7ea126dc3097eba9e42 Mon Sep 17 00:00:00 2001 From: GliderGeek Date: Wed, 11 Jul 2018 16:55:40 +0200 Subject: [PATCH] skip competitors for which analysis fails --- CHANGES.md | 2 ++ PySoar/analysis.py | 8 +++++++- requirements.txt | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 12b1185..7a890f3 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,7 @@ Master - Use opensoar and aerofiles functionalities (#100, #123) +- Do not skip HC contestants +- Skip contestant for which analysis fails v0.56.3 - Fix aat with fixed sector orientation diff --git a/PySoar/analysis.py b/PySoar/analysis.py index 56340c2..254365d 100644 --- a/PySoar/analysis.py +++ b/PySoar/analysis.py @@ -57,7 +57,13 @@ def run(url, source, url_status=None, download_progress_label=None, analysis_pro return classification_method = 'pysoar' - competition_day.analyse_flights(classification_method, analysis_progress) + failed_comp_ids = competition_day.analyse_flights(classification_method, analysis_progress, + skip_failed_analyses=True) + + # remove failed competitors for which the analysis failed + for competitor in competition_day.competitors: + if competitor.competition_id in failed_comp_ids: + competition_day.competitors.remove(competitor) for competitor in competition_day.competitors: diff --git a/requirements.txt b/requirements.txt index bbb67db..ba53bc2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,4 @@ xlwt==1.3.0 numpy==1.12.0b1 pyinstaller==3.2 aerofiles==0.4.1 -opensoar==0.1.0 +opensoar==0.1.1