Skip to content
Snippets Groups Projects

ADD: .gitlab-ci.yml

Merged Rémi Cresson requested to merge 9-add_ci into master
1 unresolved thread
4 files
+ 146
145
Compare changes
  • Side-by-side
  • Inline
Files
4
+ 5
4
@@ -43,7 +43,7 @@ def get_available_applications(as_subprocess=False):
import subprocess
params = {"env": env, "stdout": subprocess.PIPE, "stderr": subprocess.PIPE}
with subprocess.Popen(cmd_args, **params) as p:
logger.debug(f"{' '.join(cmd_args[:-1])} '{pycmd}'")
logger.debug("%s %s", ' '.join(cmd_args[:-1]), pycmd)
stdout, stderr = p.communicate()
stdout, stderr = stdout.decode(), stderr.decode()
# ast.literal_eval is secure and will raise more handy Exceptions than eval
@@ -54,7 +54,7 @@ def get_available_applications(as_subprocess=False):
except subprocess.SubprocessError:
logger.debug("Failed to call subprocess")
except (ValueError, SyntaxError, AssertionError):
logger.debug("Failed to decode output or convert to tuple :" + f"\nstdout={stdout}\nstderr={stderr}")
logger.debug("Failed to decode output or convert to tuple:\nstdout=%s\nstderr=%s", stdout, stderr)
if not app_list:
logger.info("Failed to list applications in an independent process. Falling back to local otb import")
@@ -64,7 +64,7 @@ def get_available_applications(as_subprocess=False):
logger.warning("Unable to load applications. Set env variable OTB_APPLICATION_PATH then try again")
return ()
logger.info(f"Successfully loaded {len(app_list)} OTB applications")
logger.info("Successfully loaded %s OTB applications", len(app_list))
return app_list
@@ -94,7 +94,8 @@ for _app in AVAILABLE_APPLICATIONS:
"""
Helper for OTBTF
"""
def set_nb_sources(self, *args, n_sources=None):
@staticmethod
def set_nb_sources(*args, n_sources=None):
"""
Set the number of sources of TensorflowModelServe. Can be either user-defined or deduced from the args
:param args: arguments
Loading