Skip to content
Commits on Source (4)
doris (5.0.3~beta+dfsg-11) unstable; urgency=medium
* debian/control:
- add Replaces/Breaks to python3-doris for version << 5.0.3~beta+dfsg-10
(Closes: #934605)
- now doris Recommends python3-doris
- now python3-doris Depends on doris
- dorp gv and gmt from the list of recommended packages of python3-doris
* debian/patches:
- new 0010-Use-sys.executable.patch and 0011-Fix-doris_config.xml-path.patch
* Install doris_config.xml.
* Move from experimental to unstable.
-- Antonio Valentino <antonio.valentino@tiscali.it> Mon, 12 Aug 2019 16:55:09 +0000
doris (5.0.3~beta+dfsg-10) experimental; urgency=medium
* Set compat to 12.
......
......@@ -39,6 +39,7 @@ Depends: ${misc:Depends},
tcsh | c-shell
Recommends: gmt,
gv,
python3-doris,
snaphu
Suggests: eog,
imagemagick
......@@ -58,9 +59,12 @@ Description: Delft object-oriented radar interferometric software
Package: python3-doris
Section: contrib/python
Architecture: all
Replaces: doris (<< 5.0.3~beta+dfsg-10)
Breaks: doris (<< 5.0.3~beta+dfsg-10)
Depends: ${misc:Depends},
${python3:Depends},
${shlibs:Depends},
doris,
python3-fastkml,
python3-fiona,
python3-gdal,
......@@ -70,9 +74,7 @@ Depends: ${misc:Depends},
python3-scipy,
python3-shapely,
gdal-bin
Recommends: gmt,
gv,
snaphu
Recommends: snaphu
Description: Delft object-oriented radar interferometric software - Python tools
DORIS is an Interferometric Synthetic Aperture Radar (InSAR) processor
developed by the Delft Institute of Earth Observation and Space Systems
......
<paths>
<source_path>/usr/lib/python3/dist-packages/doris</source_path>
<doris_path>/usr/bin/doris</doris_path>
<cpxfiddle_path>debian/patches/0011-Fix-doris_config.xml-path.patch</cpxfiddle_path>
<snaphu_path>/usr/bin/snaphu</snaphu_path>
<scihub_username></scihub_username>
<scihub_password></scihub_password>
<usgs_username></usgs_username>
<usgs_password></usgs_password>
</paths>
......@@ -39,13 +39,13 @@ Forwarded: https://github.com/TUDelftGeodesy/Doris/issues/8
doris_stack/main_code/stack.py | 14 ++--
doris_stack/main_code/swath.py | 4 +-
install/init_cfg.py | 14 ++--
prepare_stack/create_datastack_bash.py | 12 +--
prepare_stack/create_datastack_bash.py | 6 +-
prepare_stack/create_dem.py | 18 ++--
prepare_stack/create_doris_input_xml.py | 28 +++----
prepare_stack/download_sentinel_data_orbits.py | 48 +++++------
prepare_stack/prepare_datastack.py | 8 +-
prepare_stack/prepare_datastack_main.py | 2 +-
41 files changed, 383 insertions(+), 382 deletions(-)
41 files changed, 380 insertions(+), 379 deletions(-)
diff --git a/bin/csk_dump_data.py b/bin/csk_dump_data.py
index ba54ada..f201650 100755
......@@ -2009,16 +2009,10 @@ index 29bf004..eb68d4f 100644
settings.find('.usgs_password').text = user_input
else:
diff --git a/prepare_stack/create_datastack_bash.py b/prepare_stack/create_datastack_bash.py
index 532f25d..19f1832 100644
index 532f25d..3113004 100644
--- a/prepare_stack/create_datastack_bash.py
+++ b/prepare_stack/create_datastack_bash.py
@@ -36,12 +36,12 @@ class CreateBash(object):
f.write('source_path=' + source_path + '\n')
f.write('export PYTHONPATH=$source_path:$PYTHONPATH \n')
f.write('export PATH=' + doris_folder + ':' + cpxfiddle_folder + ':' + snaphu_folder + ':' + '$PATH \n')
- f.write('python ' + doris_run_script + ' -p ' + processing + ' \n')
+ f.write('python3 ' + doris_run_script + ' -p ' + processing + ' \n')
@@ -41,7 +41,7 @@ class CreateBash(object):
f.close()
# make sure the file is executable
......@@ -2027,12 +2021,7 @@ index 532f25d..19f1832 100644
# Also create a download and dem creation bash script.
file_path = os.path.join(stack_folder, 'create_dem.sh')
@@ -54,11 +54,11 @@ class CreateBash(object):
f.write('\n')
f.write('source_path=' + source_path + '\n')
f.write('export PYTHONPATH=$source_path:$PYTHONPATH \n')
- f.write('python ' + doris_run_script + ' ' + processing + ' SRTM3 \n')
+ f.write('python3 ' + doris_run_script + ' ' + processing + ' SRTM3 \n')
@@ -58,7 +58,7 @@ class CreateBash(object):
f.close()
# make sure the file is executable
......@@ -2041,12 +2030,7 @@ index 532f25d..19f1832 100644
file_path = os.path.join(stack_folder, 'download_sentinel.sh')
f = open(file_path, 'w')
@@ -70,8 +70,8 @@ class CreateBash(object):
f.write('#!/bin/bash \n')
f.write('\n')
- f.write('python ' + doris_run_script + ' ' + processing + ' \n')
+ f.write('python3 ' + doris_run_script + ' ' + processing + ' \n')
@@ -74,4 +74,4 @@ class CreateBash(object):
f.close()
# make sure the file is executable
......
From: Antonio Valentino <antonio.valentino@tiscali.it>
Date: Mon, 12 Aug 2019 15:51:00 +0000
Subject: Use sys.executable
---
doris_stack/main_code/single_master_stack.py | 21 +++++++++++----------
doris_stack/main_code/stack.py | 4 ++--
prepare_stack/create_datastack_bash.py | 6 +++---
3 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/doris_stack/main_code/single_master_stack.py b/doris_stack/main_code/single_master_stack.py
index 368515b..cf1b101 100644
--- a/doris_stack/main_code/single_master_stack.py
+++ b/doris_stack/main_code/single_master_stack.py
@@ -1,4 +1,5 @@
import os
+import sys
import numpy as np
from datetime import datetime
from collections import OrderedDict
@@ -304,12 +305,12 @@ class SingleMaster(object):
os.chdir(path)
if ps is True:
master_file = self.burst_path(key=burst,dat_type='master',full_path=False)
- command1 = 'python -m ' + 'get_winpos' + ' ' + master_file + ' master.res 21 winpos_cc.asc'
+ command1 = sys.executable + ' -m ' + 'get_winpos' + ' ' + master_file + ' master.res 21 winpos_cc.asc'
job_list1.append({"path": path, "command": command1})
command2 = self.doris_path + ' ' + os.path.join(self.input_files, 'input.coarsecorr')
job_list2.append({"path": path, "command": command2})
if not self.parallel:
- os.system('python -m ' + 'get_winpos' + ' ' + master_file + ' master.res 21 winpos_cc.asc')
+ os.system(sys.executable + ' -m ' + 'get_winpos' + ' ' + master_file + ' master.res 21 winpos_cc.asc')
os.system(command2)
if ps is False:
command = self.doris_path + ' ' + os.path.join(self.input_files, 'input.coarsecorr')
@@ -401,7 +402,7 @@ class SingleMaster(object):
slave_deramped = self.burst_path(key=burst, dat_type='slave_deramped', full_path=False)
if not os.path.exists(os.path.join(path, slave_deramped)):
- command2 = 'python ' + os.path.join(self.function_path, 'do_deramp_SLC.py') + ' ' + slave_file + ' slave.res'
+ command2 = sys.executable + ' ' + os.path.join(self.function_path, 'do_deramp_SLC.py') + ' ' + slave_file + ' slave.res'
job_list2.append({"path": path, "command": command2})
if not self.parallel:
os.chdir(path)
@@ -423,7 +424,7 @@ class SingleMaster(object):
master_deramped = self.burst_path(key=burst, dat_type='slave_deramped', full_path=False)
if not os.path.exists(os.path.join(path, master_deramped)) or not master:
- command1 = 'python ' + os.path.join(self.function_path, 'do_deramp_SLC.py') + ' ' + master_file + ' slave.res'
+ command1 = sys.executable + ' ' + os.path.join(self.function_path, 'do_deramp_SLC.py') + ' ' + master_file + ' slave.res'
job_list1.append({"path": path, "command": command1})
if not self.parallel:
os.chdir(path)
@@ -469,7 +470,7 @@ class SingleMaster(object):
if not(self.parallel):
os.chdir(path)
if ps == True:
- command1 = 'python -m' + 'get_winpos' + ' ' + master_file + ' master.res 101 winpos_fine.asc'
+ command1 = sys.executable + ' -m' + 'get_winpos' + ' ' + master_file + ' master.res 101 winpos_fine.asc'
job_list1.append({"path": path, "command": command1})
command2 = self.doris_path + ' ' + os.path.join(self.input_files,'input.finecoreg_icc_pointscat')
job_list2.append({"path": path, "command": command2})
@@ -900,7 +901,7 @@ class SingleMaster(object):
if not os.path.exists(os.path.join(path, 'slave_rsmp_reramped.raw')):
# If we are before the ESD step and reramp is not jet done.
- command1 = 'python ' + os.path.join(self.function_path, 'do_reramp_SLC.py') + ' slave_rsmp.raw slave.res'
+ command1 = sys.executable + ' ' + os.path.join(self.function_path, 'do_reramp_SLC.py') + ' slave_rsmp.raw slave.res'
jobList1.append({"path": path, "command": command1})
if not self.parallel:
os.chdir(path)
@@ -1262,7 +1263,7 @@ class SingleMaster(object):
overlap = burst + '_' + next_burst
ps_select = '1'
master_date = self.master_date
- command = 'python ' + os.path.join(self.function_path, 'ESD_ps_ds.py') + ' ' + stack_folder + ' ' \
+ command = sys.executable + ' ' + os.path.join(self.function_path, 'ESD_ps_ds.py') + ' ' + stack_folder + ' ' \
+ overlap + ' ' + esd_type + ' ' + max_baseline + ' ' + master_date + ' ' + ps_select
jobList.append({"path": stack_folder, "command": command})
@@ -1374,7 +1375,7 @@ class SingleMaster(object):
else:
angle_pixel = str(offset / angle)
script = os.path.join(self.function_path, 'correct_ESD.py')
- command = 'python ' + script + ' ' + filename + ' ' + angle_pixel
+ command = sys.executable + ' ' + script + ' ' + filename + ' ' + angle_pixel
jobList.append({"path": path, "command": command})
self.stack[date][burst]['slave'].processes['readfiles']['ESD_correct'] = '1'
@@ -1634,7 +1635,7 @@ class SingleMaster(object):
command1 = self.doris_path + ' ' + os.path.join(self.input_files, 'input.subtrrefdem')
job_list1.append({"path": path, "command": command1})
if network:
- command2 = 'python ' + os.path.join(self.function_path, 'remove_dem_earth_phase.py') + ' ' + \
+ command2 = sys.executable + ' ' + os.path.join(self.function_path, 'remove_dem_earth_phase.py') + ' ' + \
self.stack_folder + ' ' + date + ' ' + burst
job_list2.append({"path": path, "command": command2})
if not self.parallel:
@@ -2028,7 +2029,7 @@ class SingleMaster(object):
final_path = os.path.join(path, master_file)
if not os.path.exists(final_path) or overwrite == True:
- command1 = 'python ' + os.path.join(self.function_path, 'concatenate_decatenate.py') + ' ' + path \
+ command1 = sys.executable + ' ' + os.path.join(self.function_path, 'concatenate_decatenate.py') + ' ' + path \
+ ' concatenate ' + burst_file + ' ' + dt.name + ' ' + multilooked + ' ' + res_type
job_list1.append({"path": path, "command": command1})
diff --git a/doris_stack/main_code/stack.py b/doris_stack/main_code/stack.py
index 71bac02..c30f872 100644
--- a/doris_stack/main_code/stack.py
+++ b/doris_stack/main_code/stack.py
@@ -628,7 +628,7 @@ class StackData(object):
self.datastack[date][swath][burst].write(res_name)
if not os.path.exists(res_name) or not os.path.exists(outdata):
- write_jobs.append('python ' + self.function_path + 'sentinel_dump_data_function.py ' + data + ' ' + res_name + ' ' + outdata)
+ write_jobs.append(sys.executable + ' ' + self.function_path + 'sentinel_dump_data_function.py ' + data + ' ' + res_name + ' ' + outdata)
burst_num.append(stack_no + '_' + xml_base[6] + '_' + xml_base[15:23])
# Burst are sorted in such a way that mainly read from different data files sorted by burst then swath then date.
@@ -666,7 +666,7 @@ class StackData(object):
shapefile = self.shape_filename
pol = self.polarisation[0]
overwrite = False
- command1 = ('python ' + self.function_path + 'load_shape_unzip.py ' + zipped_folder + ' ' + dest_folder +
+ command1 = (sys.executable + ' ' + self.function_path + 'load_shape_unzip.py ' + zipped_folder + ' ' + dest_folder +
' ' + shapefile + ' ' + pol + ' ' + str(overwrite))
jobList1.append({"path": self.path, "command": command1})
if not self.parallel:
diff --git a/prepare_stack/create_datastack_bash.py b/prepare_stack/create_datastack_bash.py
index 3113004..ab8bbfb 100644
--- a/prepare_stack/create_datastack_bash.py
+++ b/prepare_stack/create_datastack_bash.py
@@ -36,7 +36,7 @@ class CreateBash(object):
f.write('source_path=' + source_path + '\n')
f.write('export PYTHONPATH=$source_path:$PYTHONPATH \n')
f.write('export PATH=' + doris_folder + ':' + cpxfiddle_folder + ':' + snaphu_folder + ':' + '$PATH \n')
- f.write('python ' + doris_run_script + ' -p ' + processing + ' \n')
+ f.write(sys.executable + ' ' + doris_run_script + ' -p ' + processing + ' \n')
f.close()
@@ -54,7 +54,7 @@ class CreateBash(object):
f.write('\n')
f.write('source_path=' + source_path + '\n')
f.write('export PYTHONPATH=$source_path:$PYTHONPATH \n')
- f.write('python ' + doris_run_script + ' ' + processing + ' SRTM3 \n')
+ f.write(sys.executable + ' ' + doris_run_script + ' ' + processing + ' SRTM3 \n')
f.close()
# make sure the file is executable
@@ -70,7 +70,7 @@ class CreateBash(object):
f.write('#!/bin/bash \n')
f.write('\n')
- f.write('python ' + doris_run_script + ' ' + processing + ' \n')
+ f.write(sys.executable + ' ' + doris_run_script + ' ' + processing + ' \n')
f.close()
# make sure the file is executable
From: Antonio Valentino <antonio.valentino@tiscali.it>
Date: Mon, 12 Aug 2019 18:36:46 +0200
Subject: Fix doris_config.xml path
---
doris_stack/main_code/doris_config.py | 5 ++++-
doris_stack/main_code/grs_config.py | 5 ++++-
install/init_cfg.py | 2 +-
prepare_stack/create_datastack_bash.py | 7 +++++--
prepare_stack/create_dem.py | 7 +++++--
prepare_stack/download_sentinel_data_orbits.py | 5 ++++-
prepare_stack/prepare_datastack.py | 5 ++++-
7 files changed, 27 insertions(+), 9 deletions(-)
diff --git a/doris_stack/main_code/doris_config.py b/doris_stack/main_code/doris_config.py
index 43520b8..f380c00 100644
--- a/doris_stack/main_code/doris_config.py
+++ b/doris_stack/main_code/doris_config.py
@@ -10,7 +10,10 @@ class DorisConfig(object):
def __init__(self):
- xml_file = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))), 'install/doris_config.xml')
+ # xml_file = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))), 'install/doris_config.xml')
+ xml_file = os.environ.get('DORIS_CONFIG_FILE', os.path.expanduser('~/.doris_config.xml'))
+ if not os.path.isfile(xml_file):
+ xml_file = '/etc/doris_config.xml'
tree = ET.parse(xml_file)
settings = tree.getroot()
diff --git a/doris_stack/main_code/grs_config.py b/doris_stack/main_code/grs_config.py
index 80e61fc..0d13a7a 100644
--- a/doris_stack/main_code/grs_config.py
+++ b/doris_stack/main_code/grs_config.py
@@ -10,7 +10,10 @@ class GrsConfig(object):
def __init__(self):
- xml_file = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))), 'install/doris_config.xml')
+ # xml_file = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))), 'install/doris_config.xml')
+ xml_file = os.environ.get('DORIS_CONFIG_FILE', os.path.expanduser('~/.doris_config.xml'))
+ if not os.path.isfile(xml_file):
+ xml_file = '/etc/doris_config.xml'
tree = ET.parse(xml_file)
settings = tree.getroot()
diff --git a/install/init_cfg.py b/install/init_cfg.py
index eb68d4f..46df5bf 100644
--- a/install/init_cfg.py
+++ b/install/init_cfg.py
@@ -5,7 +5,7 @@ import os
def init_cfg():
template_xml_file = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'doris_config_template.xml')
- xml_file = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'doris_config.xml')
+ xml_file = 'doris_config.xml'
tree = ET.parse(template_xml_file)
settings = tree.getroot()
diff --git a/prepare_stack/create_datastack_bash.py b/prepare_stack/create_datastack_bash.py
index ab8bbfb..d926f88 100644
--- a/prepare_stack/create_datastack_bash.py
+++ b/prepare_stack/create_datastack_bash.py
@@ -12,8 +12,11 @@ class CreateBash(object):
def create(self, stack_folder, root_folder, nodes):
- xml_file = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))),
- 'install/doris_config.xml')
+ # xml_file = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))),
+ # 'install/doris_config.xml')
+ xml_file = os.environ.get('DORIS_CONFIG_FILE', os.path.expanduser('~/.doris_config.xml'))
+ if not os.path.isfile(xml_file):
+ xml_file = '/etc/doris_config.xml'
tree = ET.parse(xml_file)
settings = tree.getroot()
diff --git a/prepare_stack/create_dem.py b/prepare_stack/create_dem.py
index 233e730..184b997 100644
--- a/prepare_stack/create_dem.py
+++ b/prepare_stack/create_dem.py
@@ -755,8 +755,11 @@ if __name__ == "__main__":
tree_stack = ET.parse(xml_file)
settings_stack = tree_stack.getroot()[0]
- xml_file = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 'install',
- 'doris_config.xml')
+ # xml_file = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 'install',
+ # 'doris_config.xml')
+ xml_file = os.environ.get('DORIS_CONFIG_FILE', os.path.expanduser('~/.doris_config.xml'))
+ if not os.path.isfile(xml_file):
+ xml_file = '/etc/doris_config.xml'
print('reading xml file settings doris ' + xml_file)
tree_doris = ET.parse(xml_file)
settings_doris = tree_doris.getroot()
diff --git a/prepare_stack/download_sentinel_data_orbits.py b/prepare_stack/download_sentinel_data_orbits.py
index a434ef5..4b86990 100644
--- a/prepare_stack/download_sentinel_data_orbits.py
+++ b/prepare_stack/download_sentinel_data_orbits.py
@@ -448,7 +448,10 @@ if __name__ == "__main__":
# user settings
xml_name = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
- config_xml_file = os.path.join(os.path.join(xml_name, 'install', 'doris_config.xml'))
+ # config_xml_file = os.path.join(os.path.join(xml_name, 'install', 'doris_config.xml'))
+ config_xml_file = os.environ.get('DORIS_CONFIG_FILE', os.path.expanduser('~/.doris_config.xml'))
+ if not os.path.isfile(config_xml_file):
+ config_xml_file = '/etc/doris_config.xml'
print('reading xml file settings doris ' + config_xml_file)
tree = ET.parse(config_xml_file)
settings = tree.getroot()
diff --git a/prepare_stack/prepare_datastack.py b/prepare_stack/prepare_datastack.py
index d71a817..ed42bfc 100644
--- a/prepare_stack/prepare_datastack.py
+++ b/prepare_stack/prepare_datastack.py
@@ -35,7 +35,10 @@ class PrepareDatastack(object):
os.mkdir(os.path.join(doris_input_xml.get_value('datastack_folder'), foldername))
# Then create the dem file
- password_file = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))),'install', 'doris_config.xml')
+ # password_file = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))),'install', 'doris_config.xml')
+ password_file = os.environ.get('DORIS_CONFIG_FILE', os.path.expanduser('~/.doris_config.xml'))
+ if not os.path.isfile(password_file):
+ password_file = '/etc/doris_config.xml'
tree_doris = ET.parse(password_file)
settings_doris = tree_doris.getroot()
srtm_username = settings_doris.find('.usgs_username').text
......@@ -7,3 +7,5 @@
0007-drop-the-install-package.patch
0008-python3.patch
0009-Python-doris-package.patch
0010-Use-sys.executable.patch
0011-Fix-doris_config.xml-path.patch
usr/lib/python*
install/init_cfg.py usr/share/doris
install/*.xml usr/share/doris
debian/doris_config.xml /etc