Skip to content

Bluesky-httpserver startup parameter server_settings documented incorrectly #87

Description

@davidpcls

It is not possible to start up the bluesky-httpserver without

server_settings

Despite it being labelled as optional:

def build_app(authentication=None, api_access=None, resource_access=None, server_settings=None):
"""
Build application
Parameters
----------
authentication: dict, optional
Dict of authentication configuration.
server_settings: dict, optional
Dict of other server configuration.
"""
authentication = authentication or {}
authentication_providers = authentication.get("providers", [])
authenticators = {spec["provider"]: spec["authenticator"] for spec in authentication_providers}
api_access = api_access or {}
api_access_manager = api_access.get("manager_object", None)
resource_access = resource_access or {}
resource_access_manager = resource_access.get("manager_object", None)
server_settings = server_settings or {}

server settings accesses a key without checking if it exists. It should use getatr instead I think.

if "custom_routers" in server_settings["server_configuration"]:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions