Commit 396701b0 authored by Antoine Regimbeau's avatar Antoine Regimbeau

Merge branch 'ci_hidden_key' into packaging_ci

parents e9cb6d26 34d4de51
Pipeline #1446 canceled with stages
in 1 minute and 45 seconds
...@@ -18,22 +18,10 @@ variables: ...@@ -18,22 +18,10 @@ variables:
# The fetch strategy fails with LFS and GitLab # The fetch strategy fails with LFS and GitLab
GIT_STRATEGY: "clone" GIT_STRATEGY: "clone"
before_script:
# make sure LFS hooks are installed
- git lfs install
# Provision efficiently the local LFS cache before checkout
- git lfs fetch origin $CI_COMMIT_SHA
# Checkout the expected branch
- git checkout -f -q $CI_COMMIT_SHA
after_script:
- python3 CI/cdash_handler.py $CI_COMMIT_SHA $CI_PROJECT_ID $CI_PROJECT_DIR $K8S_SECRET_CDASH
stages: stages:
- precheck - precheck
- prepare - prepare
- build - build
- package
.general: .general:
retry: retry:
...@@ -48,9 +36,10 @@ fast-build: ...@@ -48,9 +36,10 @@ fast-build:
stage: precheck stage: precheck
image: $BUILD_IMAGE_REGISTRY/otb-ubuntu-native-develop:latest image: $BUILD_IMAGE_REGISTRY/otb-ubuntu-native-develop:latest
before_script: before_script:
- export GIT_LFS_SKIP_SMUDGE=1
- git checkout -f -q $CI_COMMIT_SHA - git checkout -f -q $CI_COMMIT_SHA
- python3 CI/check_twin_pipelines.py - python3 CI/check_twin_pipelines.py
after_script:
- python3 CI/cdash_handler.py $CI_COMMIT_SHA $CI_PROJECT_ID $CI_PROJECT_DIR $K8S_SECRET_CDASH $CI_MERGE_REQUEST_REF_PATH
script: script:
- ctest -V -S CI/main_ci.cmake -DIMAGE_NAME:string=ubuntu-18.04-fast - ctest -V -S CI/main_ci.cmake -DIMAGE_NAME:string=ubuntu-18.04-fast
- ccache -s - ccache -s
...@@ -60,7 +49,14 @@ fast-build: ...@@ -60,7 +49,14 @@ fast-build:
extends: .general extends: .general
only: [merge_requests] only: [merge_requests]
stage: build stage: build
dependencies: [] before_script:
- git lfs install --skip-repo
# Provision efficiently the local LFS cache before checkout
- git lfs fetch origin $CI_COMMIT_SHA
# Checkout the expected branch
- git checkout -f -q $CI_COMMIT_SHA
after_script:
- python3 CI/cdash_handler.py $CI_COMMIT_SHA $CI_PROJECT_ID $CI_PROJECT_DIR $K8S_SECRET_CDASH $CI_MERGE_REQUEST_REF_PATH
debian-build: debian-build:
extends: .common-build extends: .common-build
...@@ -84,51 +80,29 @@ ubuntu-llvm: ...@@ -84,51 +80,29 @@ ubuntu-llvm:
only: [merge_requests] only: [merge_requests]
stage: prepare stage: prepare
before_script: before_script:
# This override the previous before_script
- git checkout -f -q $CI_COMMIT_SHA - git checkout -f -q $CI_COMMIT_SHA
# We are now doing the git-lfs install - git lfs install --skip-repo
# This is done after the checkout so we avoid downloading Data
# But we need it to upload the archive
- git-lfs install
- git config --global user.email "otbbot@orfeo-toolbox.org"
- git config --global user.name "otbbot"
- eval $(ssh-agent -s)
- ssh-add <(echo "$K8S_SECRET_SSH")
# This is for debug, we are checking the owner of the ssh key
- ssh -o StrictHostKeyChecking=no -T git@gitlab.orfeo-toolbox.org
after_script:
- echo "Nothing to do for after_script"
artifacts: artifacts:
expire_in: 24 hrs expire_in: 24 hrs
when: on_success
paths: paths:
# This recovers logs from superbuild build
# - build/*/*/*/*.log
- sb_branch.txt - sb_branch.txt
artifacts:
expire_in: 2 days
when : on_failure
paths:
# This recovers logs from superbuild build
- build/*/*/*/*.log
## Ubuntu superbuild
ubuntu-superbuild-prepare: ubuntu-superbuild-prepare:
extends: .common-prepare extends: .common-prepare
image: $BUILD_IMAGE_REGISTRY/otb-ubuntu-superbuild-base:18.04 image: $BUILD_IMAGE_REGISTRY/otb-ubuntu-superbuild-base:18.04
script: script:
- ctest -V -S CI/prepare_superbuild.cmake -DIMAGE_NAME:string=otb-ubuntu-superbuild-base - ctest -VV -S CI/prepare_superbuild.cmake -DIMAGE_NAME:string=otb-ubuntu-superbuild-base
centos-superbuild-prepare:
extends: .common-prepare
image: $BUILD_IMAGE_REGISTRY/otb-centos-superbuild-base:6.6
script:
- ctest -V -S CI/prepare_superbuild.cmake -DIMAGE_NAME:string=otb-centos-superbuild-base
.superbuild-build:
only: [merge_requests]
extends: .common-build
artifacts:
expire_in: 1 week
paths:
# - build/*/*/*/*.log
- build_packages/*/*/*/*.log
- build_packages/OTB-*.run
ubuntu-superbuild-build: ubuntu-superbuild-build:
extends: .superbuild-build extends: .common-build
image: $BUILD_IMAGE_REGISTRY/otb-ubuntu-superbuild-base:18.04 image: $BUILD_IMAGE_REGISTRY/otb-ubuntu-superbuild-base:18.04
script: script:
- xvfb-run -a -n 1 -s "-screen 0 1024x768x24 -dpi 96" ctest -V -S CI/main_superbuild.cmake -DIMAGE_NAME:string=otb-ubuntu-superbuild-base - xvfb-run -a -n 1 -s "-screen 0 1024x768x24 -dpi 96" ctest -V -S CI/main_superbuild.cmake -DIMAGE_NAME:string=otb-ubuntu-superbuild-base
...@@ -136,8 +110,15 @@ ubuntu-superbuild-build: ...@@ -136,8 +110,15 @@ ubuntu-superbuild-build:
dependencies: dependencies:
- ubuntu-superbuild-prepare - ubuntu-superbuild-prepare
## Centos superbuild
centos-superbuild-prepare:
extends: .common-prepare
image: $BUILD_IMAGE_REGISTRY/otb-centos-superbuild-base:6.6
script:
- ctest -VV -S CI/prepare_superbuild.cmake -DIMAGE_NAME:string=otb-centos-superbuild-base
centos-superbuild-build: centos-superbuild-build:
extends: .superbuild-build extends: .common-build
image: $BUILD_IMAGE_REGISTRY/otb-centos-superbuild-base:6.6 image: $BUILD_IMAGE_REGISTRY/otb-centos-superbuild-base:6.6
script: script:
- xvfb-run -a -n 1 -s "-screen 0 1024x768x24 -dpi 96" ctest -V -S CI/main_superbuild.cmake -DIMAGE_NAME:string=otb-centos-superbuild-base - xvfb-run -a -n 1 -s "-screen 0 1024x768x24 -dpi 96" ctest -V -S CI/main_superbuild.cmake -DIMAGE_NAME:string=otb-centos-superbuild-base
......
...@@ -245,14 +245,14 @@ TODO : ...@@ -245,14 +245,14 @@ TODO :
""" """
if __name__ == "__main__": if __name__ == "__main__":
if ( len(sys.argv) < 5 ): if ( len(sys.argv) < 6 ):
print("Usage : "+sys.argv[0]+" commit_sha1 project_id build_directory token") print("Usage : "+sys.argv[0]+" commit_sha1 project_id build_directory token ref_name")
sys.exit() sys.exit()
if trace: if trace:
print (sys.argv) print (sys.argv)
handler = Handler() handler = Handler()
build_dir = os.path.join( sys.argv[3] , "build/") build_dir = os.path.join( sys.argv[3] , "build/")
# build_dir = sys.argv[3] ref_name = sys.argv[5]
if trace: if trace:
print("build_dir is: " + build_dir) print("build_dir is: " + build_dir)
handler.build_dir = build_dir handler.build_dir = build_dir
...@@ -271,7 +271,7 @@ if __name__ == "__main__": ...@@ -271,7 +271,7 @@ if __name__ == "__main__":
gitlab_url = "https://gitlab.orfeo-toolbox.org/api/v4/projects/" gitlab_url = "https://gitlab.orfeo-toolbox.org/api/v4/projects/"
gitlab_url += sys.argv[2] + "/statuses/" + sys.argv[1] gitlab_url += sys.argv[2] + "/statuses/" + sys.argv[1]
params = urllib.parse.urlencode({'name':'cdash:' + handler.site , 'state': state ,\ params = urllib.parse.urlencode({'name':'cdash:' + handler.site , 'state': state ,\
'target_url' : cdash_url , 'description' : error }) 'target_url' : cdash_url , 'description' : error , 'ref' : ref_name })
gitlab_request = urllib.request.Request(gitlab_url) gitlab_request = urllib.request.Request(gitlab_url)
gitlab_request.add_header('PRIVATE-TOKEN' , sys.argv[4] ) gitlab_request.add_header('PRIVATE-TOKEN' , sys.argv[4] )
res = urllib.request.urlopen(gitlab_request, data=params.encode('ascii')) res = urllib.request.urlopen(gitlab_request, data=params.encode('ascii'))
......
...@@ -64,25 +64,29 @@ if __name__ == "__main__": ...@@ -64,25 +64,29 @@ if __name__ == "__main__":
sha1 = env['CI_COMMIT_SHA'] sha1 = env['CI_COMMIT_SHA']
# are we in a merge_request pipeline ? # are we in a merge_request pipeline ?
if 'CI_MERGE_REQUEST_IID' in env.keys(): if 'CI_MERGE_REQUEST_IID' in env.keys():
if not CheckEnvParameters(['K8S_SECRET_TWIN_PIPELINE','CI_PROJECT_ID','CI_PIPELINE_ID']): if not CheckEnvParameters(['K8S_SECRET_API_TOKEN']):
print("Make sure you have set a valid acces token for Gitlab API")
print("The K8S_SECRET_API_TOKEN environment variable should be set in 'Settings -> CI/CD -> Variables'")
sys.exit(1) sys.exit(1)
mrInfo = GitlabRequest('merge_requests/'+env['CI_MERGE_REQUEST_IID'],token=env['K8S_SECRET_TWIN_PIPELINE']) if not CheckEnvParameters(['CI_PROJECT_ID','CI_PIPELINE_ID']):
sys.exit(1)
mrInfo = GitlabRequest('merge_requests/'+env['CI_MERGE_REQUEST_IID'],token=env['K8S_SECRET_API_TOKEN'])
wip_regex = re.compile("^[Ww][Ii][Pp]:") wip_regex = re.compile("^[Ww][Ii][Pp]:")
# is it a "WIP" merge request ? # is it a "WIP" merge request ?
if wip_regex.search(mrInfo["title"]): if wip_regex.search(mrInfo["title"]):
# Yes: cancel the current pipeline # Yes: cancel the current pipeline
print("Cancel current pipeline "+env['CI_PIPELINE_ID']) print("Cancel current pipeline "+env['CI_PIPELINE_ID'])
GitlabRequest('pipelines/'+env['CI_PIPELINE_ID']+'/cancel', data={}, \ GitlabRequest('pipelines/'+env['CI_PIPELINE_ID']+'/cancel', data={}, \
project=env['CI_PROJECT_ID'], token=env['K8S_SECRET_TWIN_PIPELINE']) project=env['CI_PROJECT_ID'], token=env['K8S_SECRET_API_TOKEN'])
time.sleep(180) time.sleep(180)
print("Error: this pipeline should have been canceled") print("Error: this pipeline should have been canceled")
sys.exit(1) sys.exit(1)
else: else:
# No: cancel any previous "normal" pipeline on the same SHA1 # No: cancel any previous "normal" pipeline on the same SHA1
jres = GitlabRequest('pipelines?sha='+sha1, project=env['CI_PROJECT_ID'], token=env['K8S_SECRET_TWIN_PIPELINE']) jres = GitlabRequest('pipelines?sha='+sha1, project=env['CI_PROJECT_ID'], token=env['K8S_SECRET_API_TOKEN'])
for item in jres: for item in jres:
if item["id"] < int(env['CI_PIPELINE_ID']) and item["status"] == "running": if item["id"] < int(env['CI_PIPELINE_ID']) and item["status"] == "running":
print("Cancel pipeline "+str(item["id"])) print("Cancel pipeline "+str(item["id"]))
jres2 = GitlabRequest('pipelines/'+str(item["id"])+'/cancel', data={}, \ jres2 = GitlabRequest('pipelines/'+str(item["id"])+'/cancel', data={}, \
project=env['CI_PROJECT_ID'], token=env['K8S_SECRET_TWIN_PIPELINE']) project=env['CI_PROJECT_ID'], token=env['K8S_SECRET_API_TOKEN'])
...@@ -55,8 +55,7 @@ OTB_USE_SSE_FLAGS:BOOL=ON ...@@ -55,8 +55,7 @@ OTB_USE_SSE_FLAGS:BOOL=ON
OTB_MPIEXEC_OPT:STRING=--allow-run-as-root") OTB_MPIEXEC_OPT:STRING=--allow-run-as-root")
set (otb_wrap_option set (otb_wrap_option
"OTB_WRAP_JAVA:BOOL=ON "OTB_WRAP_PYTHON:BOOL=ON")
OTB_WRAP_PYTHON:BOOL=ON")
set (otb_data_option set (otb_data_option
"OTB_DATA_USE_LARGEINPUT:BOOL=OFF "OTB_DATA_USE_LARGEINPUT:BOOL=OFF
......
...@@ -51,7 +51,7 @@ find_program(CTEST_GIT_COMMAND NAMES git git.cmd) ...@@ -51,7 +51,7 @@ find_program(CTEST_GIT_COMMAND NAMES git git.cmd)
# FIXME: Replace ${GIT} variable with $[CTEST_GIT_COMMAND}" # FIXME: Replace ${GIT} variable with $[CTEST_GIT_COMMAND}"
set( GIT "${CTEST_GIT_COMMAND}" ) set( GIT "${CTEST_GIT_COMMAND}" )
set( DEBUG 1 )
execute_process( execute_process(
COMMAND ${GIT} "clone" "${REMOTE}" "--branch" "${BRANCH_NAME}" COMMAND ${GIT} "clone" "${REMOTE}" "--branch" "${BRANCH_NAME}"
"--depth" "1" "superbuild-artifact" "--depth" "1" "superbuild-artifact"
......
...@@ -24,8 +24,6 @@ include( "${CMAKE_CURRENT_LIST_DIR}/macros.cmake" ) ...@@ -24,8 +24,6 @@ include( "${CMAKE_CURRENT_LIST_DIR}/macros.cmake" )
set (ENV{LANG} "C") # Only ascii output set (ENV{LANG} "C") # Only ascii output
get_filename_component(OTB_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR} DIRECTORY) get_filename_component(OTB_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR} DIRECTORY)
set ( DEBUG "1" )
set ( SUPERBUILD_SOURCE_DIR "${OTB_SOURCE_DIR}/SuperBuild" ) set ( SUPERBUILD_SOURCE_DIR "${OTB_SOURCE_DIR}/SuperBuild" )
set ( CTEST_BUILD_CONFIGURATION "Release" ) set ( CTEST_BUILD_CONFIGURATION "Release" )
...@@ -184,55 +182,6 @@ execute_process( ...@@ -184,55 +182,6 @@ execute_process(
) )
set ( SB_ARTIFACT_GIT "${OTB_SOURCE_DIR}/superbuild-artifact" ) set ( SB_ARTIFACT_GIT "${OTB_SOURCE_DIR}/superbuild-artifact" )
# setting up the repo
# StrictHostKeyChecking so we don't have to add the host as a known key
# -F /dev/null so the agent is not taking a default file ~/.ssh/..
execute_process(
COMMAND ${GIT} "config" "core.sshCommand"
"ssh -o StrictHostKeyChecking=no"
WORKING_DIRECTORY ${SB_ARTIFACT_GIT}
RESULT_VARIABLE ssh_res
OUTPUT_VARIABLE ssh_out
ERROR_VARIABLE ssh_err
)
if ( DEBUG )
message( "Step 1: ssh")
message( "ssh_res = ${ssh_res}" )
message( "ssh_out = ${ssh_out}" )
message( "ssh_err = ${ssh_err}" )
endif()
execute_process(
COMMAND ${GIT} "config" "user.mail" "otbbot@orfeo-toolbox.org"
WORKING_DIRECTORY ${SB_ARTIFACT_GIT}
RESULT_VARIABLE mail_res
OUTPUT_VARIABLE mail_out
ERROR_VARIABLE mail_err
)
if ( DEBUG )
message( "Step 2: mail")
message( "mail_res = ${mail_res}" )
message( "mail_out = ${mail_out}" )
message( "mail_err = ${mail_err}" )
endif()
execute_process(
COMMAND ${GIT} "config" "user.name" "otbbot"
WORKING_DIRECTORY ${SB_ARTIFACT_GIT}
RESULT_VARIABLE name_res
OUTPUT_VARIABLE name_out
ERROR_VARIABLE name_err
)
if ( DEBUG )
message( "Step 3: name")
message( "name_res = ${name_res}" )
message( "name_out = ${name_out}" )
message( "name_err = ${name_err}" )
endif()
# create a branche # create a branche
execute_process( execute_process(
COMMAND ${GIT} "checkout" "-b" "${BRANCH_NAME}" COMMAND ${GIT} "checkout" "-b" "${BRANCH_NAME}"
...@@ -260,9 +209,6 @@ execute_process( ...@@ -260,9 +209,6 @@ execute_process(
WORKING_DIRECTORY ${OTB_SOURCE_DIR} WORKING_DIRECTORY ${OTB_SOURCE_DIR}
) )
# In a near futur it might be nice to clean up the mess we made...
if ( DEBUG ) if ( DEBUG )
if (EXISTS "${SB_ARTIFACT_GIT}/${SB_TAR_NAME}") if (EXISTS "${SB_ARTIFACT_GIT}/${SB_TAR_NAME}")
message("Tar file exists in superbuild_artefact at: ${SB_ARTIFACT_GIT}/${SB_TAR_NAME}") message("Tar file exists in superbuild_artefact at: ${SB_ARTIFACT_GIT}/${SB_TAR_NAME}")
......
...@@ -165,9 +165,6 @@ endif() ...@@ -165,9 +165,6 @@ endif()
if(NOT OTB_INSTALL_PYTHON_DIR) if(NOT OTB_INSTALL_PYTHON_DIR)
set(OTB_INSTALL_PYTHON_DIR "${OTB_INSTALL_LIBRARY_DIR}/otb/python") set(OTB_INSTALL_PYTHON_DIR "${OTB_INSTALL_LIBRARY_DIR}/otb/python")
endif() endif()
if(NOT OTB_INSTALL_JAVA_DIR)
set(OTB_INSTALL_JAVA_DIR "${OTB_INSTALL_LIBRARY_DIR}/otb/java")
endif()
if(NOT OTB_INSTALL_DATA_DIR) if(NOT OTB_INSTALL_DATA_DIR)
set(OTB_INSTALL_DATA_DIR "share/otb") set(OTB_INSTALL_DATA_DIR "share/otb")
endif() endif()
...@@ -533,7 +530,6 @@ foreach(otb_option ...@@ -533,7 +530,6 @@ foreach(otb_option
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS
${option_list} ${option_list}
OTB_WRAP_PYTHON OTB_WRAP_PYTHON
OTB_WRAP_JAVA
OTB_DATA_ROOT OTB_DATA_ROOT
OTB_USE_OPENMP OTB_USE_OPENMP
OTB_USE_SSE_FLAGS OTB_USE_SSE_FLAGS
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
<name>TestApplication</name> <name>TestApplication</name>
<descr>This application helps developers to test parameters types</descr> <descr>This application helps developers to test parameters types</descr>
<doc> <doc>
<name>Test</name>
<longdescr>The purpose of this application is to test parameters types.</longdescr> <longdescr>The purpose of this application is to test parameters types.</longdescr>
<authors>OTB-Team</authors> <authors>OTB-Team</authors>
<limitations>None</limitations> <limitations>None</limitations>
......
...@@ -25,7 +25,7 @@ import argparse ...@@ -25,7 +25,7 @@ import argparse
import re import re
import otbApplication import otbApplication
from otbApplication import ParameterType_Bool, ParameterType_Int, ParameterType_Radius, ParameterType_RAM, ParameterType_Float, ParameterType_String, ParameterType_StringList, ParameterType_InputFilename, ParameterType_OutputFilename, ParameterType_InputImage, ParameterType_OutputImage, ParameterType_InputVectorData, ParameterType_OutputVectorData, ParameterType_Directory, ParameterType_Choice, ParameterType_InputImageList, ParameterType_InputVectorDataList, ParameterType_InputFilenameList, ParameterType_InputProcessXML, ParameterType_OutputProcessXML, ParameterType_ListView, ParameterType_Group from otbApplication import ParameterType_Bool, ParameterType_Int, ParameterType_Radius, ParameterType_RAM, ParameterType_Float, ParameterType_String, ParameterType_StringList, ParameterType_InputFilename, ParameterType_OutputFilename, ParameterType_InputImage, ParameterType_OutputImage, ParameterType_InputVectorData, ParameterType_OutputVectorData, ParameterType_Directory, ParameterType_Choice, ParameterType_InputImageList, ParameterType_InputVectorDataList, ParameterType_InputFilenameList, ParameterType_ListView, ParameterType_Group
from otb_warnings import application_documentation_warnings from otb_warnings import application_documentation_warnings
...@@ -202,7 +202,6 @@ def rst_parameter_value(app, key): ...@@ -202,7 +202,6 @@ def rst_parameter_value(app, key):
values.update({ParameterType_InputImageList: "image1 image2..."}) values.update({ParameterType_InputImageList: "image1 image2..."})
values.update({ParameterType_InputVectorDataList: "vectorfile1 vectorfile2..."}) values.update({ParameterType_InputVectorDataList: "vectorfile1 vectorfile2..."})
values.update({ParameterType_InputFilenameList: "filename1 filename2..."}) values.update({ParameterType_InputFilenameList: "filename1 filename2..."})
values.update(dict.fromkeys([ParameterType_InputProcessXML, ParameterType_OutputProcessXML], "filename.xml"))
if type in values: if type in values:
return values[type] return values[type]
...@@ -356,10 +355,17 @@ def make_links(text, allapps): ...@@ -356,10 +355,17 @@ def make_links(text, allapps):
rep = {appname: ":ref:`{}`".format(appname) for appname in allapps} rep = {appname: ":ref:`{}`".format(appname) for appname in allapps}
return multireplace(text, rep) return multireplace(text, rep)
def render_deprecation_string(app):
if app.IsDeprecated():
return "This application is deprecated and will be removed in a future release."
else:
return ""
def render_application(appname, allapps): def render_application(appname, allapps):
"Render app to rst" "Render app to rst"
app = otbApplication.Registry.CreateApplication(appname) # Create the application without logger to avoid the deprecation warning log
app = otbApplication.Registry.CreateApplicationWithoutLogger(appname)
# TODO: remove this when bug 440 is fixed # TODO: remove this when bug 440 is fixed
app.Init() app.Init()
...@@ -368,6 +374,7 @@ def render_application(appname, allapps): ...@@ -368,6 +374,7 @@ def render_application(appname, allapps):
output = template_application.format( output = template_application.format(
label=appname, label=appname,
deprecation_string=render_deprecation_string(app),
heading=rst_section(app.GetName(), '='), heading=rst_section(app.GetName(), '='),
description=app.GetDescription(), description=app.GetDescription(),
longdescription=make_links(app.GetDocLongDescription(), allapps), longdescription=make_links(app.GetDocLongDescription(), allapps),
...@@ -381,8 +388,9 @@ def render_application(appname, allapps): ...@@ -381,8 +388,9 @@ def render_application(appname, allapps):
return output return output
def GetApplicationTags(appname): def GetApplicationTags(appname):
app = otbApplication.Registry.CreateApplication(appname) # Create the application without logger to avoid the deprecation warning log
return app.GetDocTags() app = otbApplication.Registry.CreateApplicationWithoutLogger(appname)
return app.GetDocTags()
def GenerateRstForApplications(rst_dir): def GenerateRstForApplications(rst_dir):
"Generate .rst files for all applications" "Generate .rst files for all applications"
...@@ -404,9 +412,12 @@ def GenerateRstForApplications(rst_dir): ...@@ -404,9 +412,12 @@ def GenerateRstForApplications(rst_dir):
for appName in appNames: for appName in appNames:
# Get application first tag # Get application first tag
tags = GetApplicationTags(appName) tags = list(GetApplicationTags(appName))
if "Deprecated" in tags:
tags.remove("Deprecated")
if not tags or len(tags) == 0: if not tags or len(tags) == 0:
raise RuntimeError("No tags for application: " + appName) raise RuntimeError("No tags for application: " + appName)
tag = tags[0] tag = tags[0]
tag_ = tag.replace(" ", "_") tag_ = tag.replace(" ", "_")
......
...@@ -158,9 +158,6 @@ parameters: ...@@ -158,9 +158,6 @@ parameters:
- ``ParameterType_InputVectorDataList`` : parameter storing a list of - ``ParameterType_InputVectorDataList`` : parameter storing a list of
input vector data. input vector data.
- ``ParameterType_InputProcessXML`` : parameter storing an input XML
file name.
- ``ParameterType_OutputFilename`` : parameter storing an output file - ``ParameterType_OutputFilename`` : parameter storing an output file
name. name.
...@@ -169,9 +166,6 @@ parameters: ...@@ -169,9 +166,6 @@ parameters:
- ``ParameterType_OutputVectorData`` : parameter storing an output - ``ParameterType_OutputVectorData`` : parameter storing an output
vector data. vector data.
- ``ParameterType_OutputProcessXML`` : parameter storing an output XML
file name.
- ``ParameterType_RAM`` : parameter storing the maximum amount of RAM - ``ParameterType_RAM`` : parameter storing the maximum amount of RAM
to be used. to be used.
......
...@@ -123,7 +123,6 @@ example based on the OrthoRectification application: ...@@ -123,7 +123,6 @@ example based on the OrthoRectification application:
-opt.rpc <int32> RPC modeling (points per axis) (optional, off by default, default value is 10) -opt.rpc <int32> RPC modeling (points per axis) (optional, off by default, default value is 10)
-opt.ram <int32> Available RAM (MB) (optional, off by default, default value is 128) -opt.ram <int32> Available RAM (MB) (optional, off by default, default value is 128)
-opt.gridspacing <float> Resampling grid spacing (optional, off by default, default value is 4) -opt.gridspacing <float> Resampling grid spacing (optional, off by default, default value is 4)
-inxml <string> Load parameters from XML (optional, off by default)
-progress <boolean> Report progress -progress <boolean> Report progress
-help <string list> Display long help (empty list), or help for given parameters keys -help <string list> Display long help (empty list), or help for given parameters keys
...@@ -145,11 +144,10 @@ Command-line examples are provided in the chapter :ref:`apprefdoc`. ...@@ -145,11 +144,10 @@ Command-line examples are provided in the chapter :ref:`apprefdoc`.
Load and save parameters to XML Load and save parameters to XML
------------------------------- -------------------------------
Since OTB 3.20, OTB applications parameters can be export/import to/from OTB application parameters can be saved and loaded to
an XML file using inxml/outxml parameters. Those parameters are an XML file using the special ``-inxml`` and ``-outxml`` parameters.
available in all applications. Those parameters are available in all applications.
For example:
An example is worth a thousand words
:: ::
...@@ -177,17 +175,6 @@ time ...@@ -177,17 +175,6 @@ time
In this case it will use as mathematical expression “(im1b1 - im2b1)” In this case it will use as mathematical expression “(im1b1 - im2b1)”
instead of “abs(im1b1 - im2b1)”. instead of “abs(im1b1 - im2b1)”.
Finally, you can also launch applications directly from the command-line
launcher executable using the inxml parameter without having to declare
the application name. Use in this case:
::
otbApplicationLauncherCommandLine -inxml saved_applications_parameters.xml
It will retrieve the application name and related parameters from the
input XML file and launch in this case the BandMath applications.
Parallel execution with MPI Parallel execution with MPI
--------------------------- ---------------------------
......
...@@ -152,3 +152,15 @@ following repositories with these command-lines: ...@@ -152,3 +152,15 @@ following repositories with these command-lines:
http://download.opensuse.org/repositories/home:/tzotsos/openSUSE_Tumbleweed/ tzotsos http://download.opensuse.org/repositories/home:/tzotsos/openSUSE_Tumbleweed/ tzotsos
and then add the OTB packages as shown above. and then add the OTB packages as shown above.
Archlinux
~~~~~~~~~~
Package is in AUR (Arch User Repository).
You will then need to run (if you use yaourt, you could use trizen instead):
::
yaourt -S orfeo-toolbox
...@@ -218,11 +218,34 @@ implementation does not break it, for instance by using an internal ...@@ -218,11 +218,34 @@ implementation does not break it, for instance by using an internal
writer to write intermediate data. In this case, execution should writer to write intermediate data. In this case, execution should
still be correct, but some intermediate data will be read or written. still be correct, but some intermediate data will be read or written.
Load and save parameters to XML
-------------------------------
As with a the `command line interface` you can save application parameters
to an xml file:
.. code-block:: python