:mod:`weaver.processes.utils` ============================= .. py:module:: weaver.processes.utils Module Contents --------------- .. data:: LOGGER .. function:: _get_data(output) -> Optional[Any] Extract the data from the output value. .. function:: _read_reference(url) -> Optional[AnyStr] Read a reference HTTP(S) URL and return the content. .. function:: _get_multi_json_references(output) -> Optional[List[JSON]] Since WPS standard does not allow to return multiple values for a single output, a lot of process actually return a json array containing references to these outputs. This function goal is to detect this particular format. :return: An array of HTTP(S) references if the specified output is effectively a JSON containing that, ``None`` otherwise. .. function:: map_progress(progress, range_min, range_max) -> Number Calculates the relative progression of the percentage process within min/max values. .. function:: jsonify_output(output, process_description) -> JSON Utility method to jsonify an output element from a WPS1 process description. .. function:: convert_process_wps_to_db(service, process, container) -> ProcessDB Converts an owslib WPS Process to local storage Process. .. function:: _check_deploy(payload) Validate minimum deploy payload field requirements with exception handling. .. function:: _get_deploy_process_info(process_info, reference, package) Obtain the process definition from deploy payload with exception handling. .. function:: deploy_process_from_payload(payload, container) -> HTTPException Adds a :class:`weaver.datatype.Process` instance to storage using the provided JSON ``payload`` matching :class:`weaver.wps_restapi.swagger_definitions.ProcessDescription`. :returns: HTTPOk if the process registration was successful :raises HTTPException: otherwise .. function:: register_wps_processes_from_config(wps_processes_file_path, container) -> None Loads a `wps_processes.yml` file and registers `WPS-1` providers processes to the current `Weaver` instance as equivalent `WPS-2` processes. .. seealso:: - `weaver.wps_processes.yml.example` for additional file format details