fmt
This commit is contained in:
@@ -28,7 +28,7 @@ more later
|
||||
|
||||
```bash
|
||||
uv run /* --env-file .env */ pytest -q
|
||||
(uvx / uv run) ruff check / format
|
||||
uv run ruff check; uv run ruff format
|
||||
uv run basedpyright --level error # error to cut spam
|
||||
# maybe uvx ty
|
||||
```
|
||||
|
||||
@@ -45,3 +45,6 @@ typeCheckingMode = "basic"
|
||||
|
||||
[tool.ruff.format]
|
||||
preview = false
|
||||
|
||||
[tool.ruff.lint]
|
||||
extend-select = ["I"]
|
||||
|
||||
@@ -90,7 +90,9 @@ def save_auth_record(
|
||||
] = None,
|
||||
payload_file: Annotated[
|
||||
str | None,
|
||||
typer.Option("--payload-file", help="File containing secret payload JSON object."),
|
||||
typer.Option(
|
||||
"--payload-file", help="File containing secret payload JSON object."
|
||||
),
|
||||
] = None,
|
||||
metadata_json: Annotated[
|
||||
str | None,
|
||||
@@ -98,7 +100,9 @@ def save_auth_record(
|
||||
] = None,
|
||||
metadata_file: Annotated[
|
||||
str | None,
|
||||
typer.Option("--metadata-file", help="File containing non-secret metadata JSON object."),
|
||||
typer.Option(
|
||||
"--metadata-file", help="File containing non-secret metadata JSON object."
|
||||
),
|
||||
] = None,
|
||||
) -> None:
|
||||
"""Save or replace a local/dev auth record; response never includes payload values."""
|
||||
|
||||
@@ -9,7 +9,6 @@ from wf_config.models import FilesystemStoreConfig, McpSourceConfig, ServerConfi
|
||||
|
||||
from ..control import BrokerConfigFile, ConnectionConfigFile
|
||||
from ..models import BrokerConfig
|
||||
from .models import BrokerStoreRoots
|
||||
from ..runtime import McpRuntimePool, PersistentSessionFactory
|
||||
from ..sdk import McpSdkAdapter
|
||||
from ..source_registry import (
|
||||
@@ -17,6 +16,7 @@ from ..source_registry import (
|
||||
workflow_mcp_source_to_connection_config,
|
||||
)
|
||||
from ..storage import FileStore
|
||||
from .models import BrokerStoreRoots
|
||||
from .service import WfMcpService
|
||||
|
||||
_HTTP_TRANSPORTS = {"http", "streamable-http", "streamable_http", "sse"}
|
||||
|
||||
@@ -3,7 +3,8 @@ from __future__ import annotations
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
from wf_api.auth import AuthRecord as NeutralAuthRecord, validate_auth_id
|
||||
from wf_api.auth import AuthRecord as NeutralAuthRecord
|
||||
from wf_api.auth import validate_auth_id
|
||||
from wf_mcp.capabilities import (
|
||||
CatalogNodeEntry,
|
||||
CatalogPromptEntry,
|
||||
|
||||
@@ -7,7 +7,12 @@ import fastapi_jsonrpc as jsonrpc
|
||||
from wf_server import WorkflowServer
|
||||
|
||||
from .errors import WorkflowRpcError, raise_workflow_rpc_error
|
||||
from .models import AdminEmptyParams, DeleteAuthParams, InspectAuthParams, SaveAuthParams
|
||||
from .models import (
|
||||
AdminEmptyParams,
|
||||
DeleteAuthParams,
|
||||
InspectAuthParams,
|
||||
SaveAuthParams,
|
||||
)
|
||||
from .params import RpcParams
|
||||
|
||||
|
||||
|
||||
@@ -55,6 +55,7 @@ class FakeAdmin:
|
||||
class FakeContext:
|
||||
def __init__(self) -> None:
|
||||
self.admin = FakeAdmin()
|
||||
|
||||
verbose = False
|
||||
|
||||
|
||||
|
||||
@@ -364,25 +364,26 @@ def test_load_workflow_config_resolves_role_store_paths_relative_to_config(
|
||||
|
||||
config = load_workflow_config(config_path)
|
||||
|
||||
assert config.server.store.root == (
|
||||
config_path.parent / ".default_store"
|
||||
).resolve()
|
||||
assert config.server.store.root == (config_path.parent / ".default_store").resolve()
|
||||
assert config.server.stores.workflow is not None
|
||||
assert config.server.stores.workflow.root == (
|
||||
config_path.parent / ".workflow_store"
|
||||
).resolve()
|
||||
assert (
|
||||
config.server.stores.workflow.root
|
||||
== (config_path.parent / ".workflow_store").resolve()
|
||||
)
|
||||
assert config.server.stores.auth is not None
|
||||
assert config.server.stores.auth.root == (
|
||||
config_path.parent / ".auth_store"
|
||||
).resolve()
|
||||
assert (
|
||||
config.server.stores.auth.root == (config_path.parent / ".auth_store").resolve()
|
||||
)
|
||||
assert config.server.stores.source_registry is not None
|
||||
assert config.server.stores.source_registry.root == (
|
||||
config_path.parent / ".source_store"
|
||||
).resolve()
|
||||
assert (
|
||||
config.server.stores.source_registry.root
|
||||
== (config_path.parent / ".source_store").resolve()
|
||||
)
|
||||
assert config.server.stores.catalog_cache is not None
|
||||
assert config.server.stores.catalog_cache.root == (
|
||||
config_path.parent / ".catalog_store"
|
||||
).resolve()
|
||||
assert (
|
||||
config.server.stores.catalog_cache.root
|
||||
== (config_path.parent / ".catalog_store").resolve()
|
||||
)
|
||||
|
||||
|
||||
def test_server_config_resolves_missing_role_stores_to_default_store() -> None:
|
||||
|
||||
Reference in New Issue
Block a user