Skip to content

Refactor warning raising #41

@alyssadai

Description

@alyssadai

Warnings related to local nodes not being available could be handled by parse_nodes_as_dict().

We may also want to make the warning less generic / confusing (are there no local nodes, did the file not exist, was the file empty ...)

if not local_nodes:
warnings.warn(
f"No local Neurobagel nodes defined or found. Federation will be limited to nodes available from the Neurobagel public node directory {node_directory_url}. "
"(To specify one or more local nodes to federate over, define them in a 'local_nb_nodes.json' file in the current directory and relaunch the API.)\n"
)

This would also require updating several of the tests.

Originally posted by @surchs in #39 (review)

Metadata

Metadata

Assignees

No one assigned

    Labels

    _flag:stale[BOT ONLY] Flag issue that hasn't been updated in a while and needs to be triaged againrefactorSimplifying or restructuring existing code or documentation.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions