| 744 | #[pyfunction(name = "validate_plugin_config")] |
| 745 | #[pyo3(signature = (config: "object") -> "object", text_signature = "(config: object) -> object")] |
| 746 | fn validate_plugin_config_py(py: Python<'_>, config: &Bound<'_, PyAny>) -> PyResult<Py<PyAny>> { |
| 747 | let config_json = py_to_json(config)?; |
| 748 | let config: PluginConfig = serde_json::from_value(config_json) |
| 749 | .map_err(|e| pyo3::exceptions::PyValueError::new_err(e.to_string()))?; |
| 750 | let report = validate_plugin_config(&config); |
| 751 | let report = serde_json::to_value(&report) |
| 752 | .map_err(|e| pyo3::exceptions::PyRuntimeError::new_err(e.to_string()))?; |
| 753 | json_to_py(py, &report) |
| 754 | } |
| 755 | |
| 756 | #[pyfunction(name = "initialize_plugins")] |
| 757 | #[pyo3(signature = (config: "object") -> "object", text_signature = "(config: object) -> object")] |