|
@@ -656,16 +656,15 @@ def create_xml_descriptors(): |
|
|
if available_app in white_list and available_app not in black_list: |
|
|
logger.warning("There is no adaptor for %s, check white list and versions" % available_app) |
|
|
# TODO Remove this default code when all apps are tested... |
|
|
fh = open("description/%s.xml" % available_app, "w") |
|
|
the_root = get_xml_description_from_application_name(available_app) |
|
|
ET.ElementTree(the_root).write(fh) |
|
|
fh.close() |
|
|
with open("description/%s.xml" % available_app, "w") as fh: |
|
|
the_root = get_xml_description_from_application_name(available_app) |
|
|
ET.ElementTree(the_root).write(fh) |
|
|
try: |
|
|
get_automatic_ut_from_xml_description(the_root) |
|
|
except: |
|
|
logger.error("Unit test for command %s must be fixed: %s" % (available_app, traceback.format_exc())) |
|
|
else: |
|
|
logger.warning("%s (not custom app) is not in white list." % available_app) |
|
|
logger.warning("%s (not custom app) is not in white list." % available_app) |
|
|
# except Exception, e: |
|
|
# logger.error(traceback.format_exc()) |
|
|
|
|
@@ -678,12 +677,11 @@ def create_html_description(): |
|
|
|
|
|
for available_app in otbApplication.Registry.GetAvailableApplications(): |
|
|
try: |
|
|
fh = open("description/doc/%s.html" % available_app, "w") |
|
|
app_instance = otbApplication.Registry.CreateApplication(available_app) |
|
|
app_instance.UpdateParameters() |
|
|
ct = describe_app(app_instance) |
|
|
fh.write(ct) |
|
|
fh.close() |
|
|
with open("description/doc/%s.html" % available_app, "w") as fh: |
|
|
app_instance = otbApplication.Registry.CreateApplication(available_app) |
|
|
app_instance.UpdateParameters() |
|
|
ct = describe_app(app_instance) |
|
|
fh.write(ct) |
|
|
except Exception: |
|
|
logger.error(traceback.format_exc()) |
|
|
|
|
@@ -694,7 +692,7 @@ def create_html_description(): |
|
|
if __name__ == "__main__": |
|
|
# Prepare the environment |
|
|
from qgis.core import QgsApplication |
|
|
|
|
|
|
|
|
app = QgsApplication([], True) |
|
|
QgsApplication.initQgis() |
|
|
|
|
|