cldfbench Catalogs

cldfbench tries to make using (known) reference catalogs while creating CLDF data as simple as possible. See BUILTIN_CATALOGS for a list of “known” catalogs.

For these catalogs, cldfbench provides - support to require (specific versions of) these catalogs in custom cldfbench commands, - support to access the Python API for each catalog from the Catalog object, - automatic registration of catalogs as provenance information when writing CLDF.

class cldfbench.catalogs.Catalog(path, tag=None, not_git_repo_ok=True)[source]

A Catalog is a git repository clone (optionally with a python API to access it).

Parameters:
  • tag (str) –

  • not_git_repo_ok (bool) –

classmethod default_location()[source]

A default location for a catalog repository clone.

Return type:

pathlib.Path

classmethod clone(url, target=None)[source]

Clone the repository identified by url to target.

Parameters:

target (typing.Optional[pathlib.Path]) –

Return type:

cldfcatalog.catalog.Catalog

classmethod from_config(key=None, fname=None, tag=None)[source]

Initialize a catalog from config info.

Parameters:

tag (str) –

Return type:

cldfcatalog.catalog.Catalog

classmethod api_version()[source]

The version of the Python package providing the API for the repository.

Return type:

typing.Optional[str]

iter_versions()[source]

Yield (tag, name) pairs for the repository.

Return type:

collections.abc.Generator[list[str], None, None]

class cldfbench.catalogs.Glottolog(path, tag=None, not_git_repo_ok=True)[source]
Parameters:
  • tag (str) –

  • not_git_repo_ok (bool) –

class cldfbench.catalogs.Concepticon(path, tag=None, not_git_repo_ok=True)[source]
Parameters:
  • tag (str) –

  • not_git_repo_ok (bool) –

class cldfbench.catalogs.CLTS(path, tag=None, not_git_repo_ok=True)[source]
Parameters:
  • tag (str) –

  • not_git_repo_ok (bool) –