:mod:`weaver.wps_restapi.processes.processes` ============================================= .. py:module:: weaver.wps_restapi.processes.processes Module Contents --------------- .. data:: LOGGER .. data:: JOB_PROGRESS_SETUP :annotation: = 1 .. data:: JOB_PROGRESS_DESCRIBE :annotation: = 2 .. data:: JOB_PROGRESS_GET_INPUTS :annotation: = 4 .. data:: JOB_PROGRESS_GET_OUTPUTS :annotation: = 6 .. data:: JOB_PROGRESS_EXECUTE_REQUEST :annotation: = 8 .. data:: JOB_PROGRESS_EXECUTE_STATUS_LOCATION :annotation: = 10 .. data:: JOB_PROGRESS_EXECUTE_MONITOR_START :annotation: = 15 .. data:: JOB_PROGRESS_EXECUTE_MONITOR_LOOP :annotation: = 20 .. data:: JOB_PROGRESS_EXECUTE_MONITOR_ERROR :annotation: = 85 .. data:: JOB_PROGRESS_EXECUTE_MONITOR_END :annotation: = 90 .. data:: JOB_PROGRESS_NOTIFY :annotation: = 95 .. data:: JOB_PROGRESS_DONE :annotation: = 100 .. function:: execute_process(self, job_id, url, headers=None, notification_email=None) .. function:: make_results_relative(results, settings) -> List[JSON] Redefines job results to be saved in database as relative paths to output directory configured in PyWPS (i.e.: relative to ``weaver.wps_output_dir``). This allows us to easily adjust the exposed result HTTP path according to server configuration (i.e.: relative to ``weaver.wps_output_path`` and/or ``weaver.wps_output_url``) and it also avoid rewriting the whole database job results if the setting is changed later on. .. function:: set_wps_language(wps, accept_language=None, request=None) -> None Set the :attr:`language` property on the :class:`WebProcessingService` object. Given the `Accept-Language` header value, match the best language to the supported languages. By default, and if no match is found, the :attr:`WebProcessingService.language` property is set to None. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language (q-factor weighting is ignored, only order is considered) :param wps: process for which to set the language header if it is accepted :param str accept_language: the value of the Accept-Language header :param request: request from which to extract Accept-Language header if not provided directly .. function:: validate_supported_submit_job_handler_parameters(json_body) Tests supported parameters not automatically validated by colander deserialize. .. function:: submit_job_handler(request, service_url, is_workflow=False, visibility=None) -> HTTPSuccessful .. function:: submit_provider_job(request) Execute a provider process. .. function:: list_remote_processes(service, request) -> List[ProcessDB] Obtains a list of remote service processes in a compatible :class:`weaver.datatype.Process` format. Note: remote processes won't be stored to the local process storage. .. function:: get_provider_processes(request) Retrieve available provider processes (GetCapabilities). .. function:: describe_provider_process(request) -> ProcessDB Obtains a remote service process description in a compatible local process format. Note: this processes won't be stored to the local process storage. .. function:: get_provider_process(request) Retrieve a process description (DescribeProcess). .. function:: get_processes_filtered_by_valid_schemas(request) -> Tuple[List[JSON], List[AnyStr]] Validates the processes summary schemas and returns them into valid/invalid lists. :returns: list of valid process summaries and invalid processes IDs for manual cleanup. .. function:: get_processes(request) List registered processes (GetCapabilities). Optionally list both local and provider processes. .. function:: add_local_process(request) Register a local process. .. function:: get_process(request) -> ProcessDB .. function:: get_local_process(request) Get a registered local process information (DescribeProcess). .. function:: get_local_process_package(request) Get a registered local process package definition. .. function:: get_local_process_payload(request) Get a registered local process payload definition. .. function:: get_process_visibility(request) Get the visibility of a registered local process. .. function:: set_process_visibility(request) Set the visibility of a registered local process. .. function:: delete_local_process(request) Unregister a local process. .. function:: submit_local_job(request) Execute a local process.