Skip to content
Snippets Groups Projects
Commit 4f303cb5 authored by Pierre-Gilles Levallois's avatar Pierre-Gilles Levallois
Browse files

Python script is ready now

parent c29251b6
Branches
Tags
2 merge requests!5Db dump,!4Architecture OpenShift pour le recalcul
Pipeline #45138 passed
...@@ -40,53 +40,26 @@ check () { ...@@ -40,53 +40,26 @@ check () {
fi; fi;
} }
################################################################################ stage "Launch Initializations..."
# 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..."
cd $scripts_dir cd $scripts_dir
comment "Init communes" comment "Init communes"
python3 main.py initCommunes python3 main.py initCommunes
comment "Init Grid"
python3 main.py initGrid python3 main.py initGrid 5
comment "InitDatas"
python3 main.py 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 # python3 main.py computeAll
stage "Sleeping a while for debug purpose..." stage "Sleeping a while for debug purpose..."
sleep 300 sleep 3600
\ No newline at end of file \ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment