"""Metadata constants and methods."""

from .classes import Resource
from .resources import RESOURCES

RESOURCES = {name: Resource.from_id(name) for name in RESOURCES}

"""Metadata constants and methods."""

import pydantic

from . import resources
from .classes import Resource

RESOURCES = {}
errors = []
for name in resources.RESOURCES:
    try:
        RESOURCES[name] = Resource.from_id(name)
    except pydantic.ValidationError as error:
        errors.append("\n" + f"[{name}] {error}")
if errors:
    raise ValueError("".join(errors))

Print all resource validation errors
Print all resource validation errors
