Skip to content

oarepo_config.collections

oarepo_config.collections

Configuration for collections.

configure_collections(communities_collections_enabled: bool = True, max_depth: int = 2) -> None

Configure collections feature.

Collections and are curated, browsable subsets of a community's records. They are saved searches. Each collection stores a search query, and its records are whatever that query matches. A record is never added to a collection by hand.

Source code in oarepo_config/collections.py
def configure_collections(
    communities_collections_enabled: bool = True,
    max_depth: int = 2,
) -> None:
    """Configure collections feature.

    Collections and are curated, browsable subsets of a community's records.
    They are saved searches. Each collection stores a search query, and its records are whatever that query matches.
    A record is never added to a collection by hand.
    """
    COMMUNITIES_COLLECTIONS_ENABLED = communities_collections_enabled
    COLLECTIONS_MAX_DEPTH = max_depth
    set_constants_in_caller(locals())