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