From 4f303cb55259b55c5c38e4848492f79010cabfd1 Mon Sep 17 00:00:00 2001
From: Pierre-Gilles Levallois <pierregilles.levallois@gmail.com>
Date: Wed, 26 Oct 2022 16:42:58 +0200
Subject: [PATCH] Python script is ready now

---
 Dockerfiles/python/scripts/launch.sh | 53 +++++++---------------------
 1 file changed, 13 insertions(+), 40 deletions(-)

diff --git a/Dockerfiles/python/scripts/launch.sh b/Dockerfiles/python/scripts/launch.sh
index ee9f848..32c4f94 100644
--- a/Dockerfiles/python/scripts/launch.sh
+++ b/Dockerfiles/python/scripts/launch.sh
@@ -40,53 +40,26 @@ check () {
   fi;
 }
 
-################################################################################
-# mkdir -p $data_dir
-
-# stage "Check source files in $data_dir"
-# cd $data_dir
-
-# current_commit=$(git rev-parse --short HEAD)
-# if [ $? -eq 128 ]; then
-#   comment "Data repository is empty. Is this your first time, young Padawan ?"
-#   comment "Cloning repo, it can take a while..."
-#   cd ..
-#   git clone $DATA_REPO 
-#   need_update=0
-# else
-#   comment "Current commit is $current_commit"
-#   cd $data_dir
-# fi;
-
-# # Checking for update...
-# [ $(git rev-parse HEAD) = $(git ls-remote $(git rev-parse --abbrev-ref @{u} | sed 's/\// /g') | cut -f1) ] &&  need_update=0 ||  need_update=1
-
-# if [ $need_update -eq 0 ]; then
-#   # We are up to date
-#   comment "\e[32mData are up to date."
-# else
-#   comment "\e[93mNew version of source data is available !\e[39m"
-#   git pull origin main
-#   new_commit=$(git rev-parse --short HEAD)
-#   comment "New commit is : \e[93m'$new_commit'\e[39m"
-#   git diff --compact-summary $current_commit $new_commit
-# fi;
-
-stage "Launch computations..."
+stage "Launch Initializations..."
 cd $scripts_dir
 comment "Init communes"
 python3 main.py initCommunes
-
-python3 main.py initGrid
+comment "Init Grid"
+python3 main.py initGrid 5
+comment "InitDatas"
 python3 main.py initDatas
 
-# Multiprocessing task
-# python3 main.py computeFactors
 
-# python3 main.py computeIndices
+stage "Launch Computations..."
+
+comment "Computing factors"
+python3 main.py computeFactors # Possibly Multiprocessing task, Should have a list of townships
+
+comment "Computing Indices"
+python3 main.py computeIndices
 
-# Launching everything, it is possible to give a list of township
+# Launching everything, it is possible to give a list of townships
 # python3 main.py computeAll
 
 stage "Sleeping a while for debug purpose..."
-sleep 300
\ No newline at end of file
+sleep 3600
\ No newline at end of file
-- 
GitLab