weaver.wps_restapi.processes.processes
¶
Module Contents¶
-
weaver.wps_restapi.processes.processes.
execute_process
(self, job_id, url, headers=None, notification_email=None)[source]¶
-
weaver.wps_restapi.processes.processes.
make_results_relative
(results: List[JSON], settings: SettingsType) → List[JSON][source]¶ 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/orweaver.wps_output_url
) and it also avoid rewriting the whole database job results if the setting is changed later on.
-
weaver.wps_restapi.processes.processes.
map_locations
(job: Job, settings: SettingsType) → None[source]¶ Generates symlink references from the Job UUID to PyWPS UUID results (outputs directory, status and log locations). Update the Job’s WPS ID if applicable (job executed locally). Assumes that all results are located under the same reference UUID.
-
weaver.wps_restapi.processes.processes.
set_wps_language
(wps: WebProcessingService, accept_language: Optional[str] = None, request: Optional[Request] = None) → None[source]¶ Set the
language
property on theWebProcessingService
object.Given the Accept-Language header value, match the best language to the supported languages.
By default, and if no match is found, the
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)
- Parameters
wps – process for which to set the language header if it is accepted
accept_language (str) – the value of the Accept-Language header
request – request from which to extract Accept-Language header if not provided directly
-
weaver.wps_restapi.processes.processes.
validate_supported_submit_job_handler_parameters
(json_body)[source]¶ Tests supported parameters not automatically validated by colander deserialize.
-
weaver.wps_restapi.processes.processes.
submit_job_handler
(request: Request, service_url: AnyStr, is_workflow: bool = False, visibility: Optional[AnyStr] = None) → HTTPSuccessful[source]¶
-
weaver.wps_restapi.processes.processes.
submit_provider_job
(request)[source]¶ Execute a provider process.
-
weaver.wps_restapi.processes.processes.
list_remote_processes
(service: Service, request: Request) → List[ProcessDB][source]¶ Obtains a list of remote service processes in a compatible
weaver.datatype.Process
format.Note: remote processes won’t be stored to the local process storage.
-
weaver.wps_restapi.processes.processes.
get_provider_processes
(request)[source]¶ Retrieve available provider processes (GetCapabilities).
-
weaver.wps_restapi.processes.processes.
describe_provider_process
(request: Request) → ProcessDB[source]¶ Obtains a remote service process description in a compatible local process format.
Note: this processes won’t be stored to the local process storage.
-
weaver.wps_restapi.processes.processes.
get_provider_process
(request)[source]¶ Retrieve a process description (DescribeProcess).
-
weaver.wps_restapi.processes.processes.
get_processes_filtered_by_valid_schemas
(request: Request) → Tuple[List[JSON], List[AnyStr]][source]¶ 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.
-
weaver.wps_restapi.processes.processes.
get_processes
(request)[source]¶ List registered processes (GetCapabilities). Optionally list both local and provider processes.
-
weaver.wps_restapi.processes.processes.
add_local_process
(request)[source]¶ Register a local process.
-
weaver.wps_restapi.processes.processes.
get_local_process
(request)[source]¶ Get a registered local process information (DescribeProcess).
-
weaver.wps_restapi.processes.processes.
get_local_process_package
(request)[source]¶ Get a registered local process package definition.
-
weaver.wps_restapi.processes.processes.
get_local_process_payload
(request)[source]¶ Get a registered local process payload definition.
-
weaver.wps_restapi.processes.processes.
get_process_visibility
(request)[source]¶ Get the visibility of a registered local process.
-
weaver.wps_restapi.processes.processes.
set_process_visibility
(request)[source]¶ Set the visibility of a registered local process.