Reorganized directory structure, scripts --> stages

Former-commit-id: 9924286e50
pull/1161/head
Piero Toffanin 2019-05-06 15:42:49 -04:00
rodzic ff3435f4b3
commit 93a4d85890
18 zmienionych plików z 8 dodań i 5 usunięć

Wyświetl plik

@ -4,8 +4,8 @@ from opendm import io
import multiprocessing import multiprocessing
# Define some needed locations # Define some needed locations
scripts_path = os.path.abspath(os.path.dirname(__file__)) current_path = os.path.abspath(os.path.dirname(__file__))
root_path, _ = os.path.split(scripts_path) root_path, _ = os.path.split(current_path)
superbuild_path = os.path.join(root_path, 'SuperBuild') superbuild_path = os.path.join(root_path, 'SuperBuild')
superbuild_bin_path = os.path.join(superbuild_path, 'install', 'bin') superbuild_bin_path = os.path.join(superbuild_path, 'install', 'bin')

Wyświetl plik

@ -92,7 +92,7 @@ class GrassContext:
# Execute it # Execute it
log.ODM_INFO("Executing grass script from {}: {} --tmp-location {} --exec bash script.sh".format(self.get_cwd(), self.grass_binary, self.location)) log.ODM_INFO("Executing grass script from {}: {} --tmp-location {} --exec bash script.sh".format(self.get_cwd(), self.grass_binary, self.location))
env = os.environ.copy() env = os.environ.copy()
env["GRASS_ADDON_PATH"] = env.get("GRASS_ADDON_PATH", "") + os.path.abspath(os.path.join("scripts/grass_addons")) env["GRASS_ADDON_PATH"] = env.get("GRASS_ADDON_PATH", "") + os.path.abspath(os.path.join("opendm/grass/addons"))
filename = os.path.join(self.get_cwd(), 'output.log') filename = os.path.join(self.get_cwd(), 'output.log')
with open(filename, 'wb') as writer, open(filename, 'rb', 1) as reader: with open(filename, 'wb') as writer, open(filename, 'rb', 1) as reader:

Wyświetl plik

@ -22,7 +22,10 @@ class HybridDistributedExecutor:
if not self.project_paths: if not self.project_paths:
return return
# TODO: build queue
# TODO: local thread worker

2
run.py
Wyświetl plik

@ -8,7 +8,7 @@ from opendm import io
import os import os
from pipes import quote from pipes import quote
from scripts.odm_app import ODMApp from stages.odm_app import ODMApp
if __name__ == '__main__': if __name__ == '__main__':
log.init() log.init()