Skip to main content

Python library to access CLDF reference catalogs

Project description

cldfcatalog

Utilities to use git repository clones and reference catalogs.

Build Status codecov PyPI

Research data - and in particular CLDF data - is often curated using git repositories for version control. cldfcatalog.Repository provides a wrapper around GitPython's git.Repo class, exposing relevant functionality in this context.

A particularly important piece of data for CLDF are reference catalogs, which are consulted during CLDF data creation. Again, such catalogs are often available as git repositories hosted on GitHub, such as Glottolog or Concepticon.

The typical usage scenario for these catalogs is as follows:

  • To follow upstream development of the catalogs, a user has a local clone of the repository, which is periodically synched running git pull origin.
  • When creating a CLDF dataset, a particular released version of a catalog is consulted.

Thus, we want to

  • checkout a particular version of the catalog,
  • run the CLDF creation,
  • restore the previous state of the repository clone.

This is exactly the functionality of cldfcatalog.Catalog:

>>> from cldfcatalog import Catalog
>>> glottolog = Catalog('../../glottolog/glottolog', 'v4.0')
>>> glottolog.active_branch
'master'
>>> with glottolog:
...     print(glottolog.describe())
...     
v4.0
>>> glottolog.describe()
'v4.0-52-ga4cfc90'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cldfcatalog-1.2.0.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

cldfcatalog-1.2.0-py2.py3-none-any.whl (9.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file cldfcatalog-1.2.0.tar.gz.

File metadata

  • Download URL: cldfcatalog-1.2.0.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.5.2

File hashes

Hashes for cldfcatalog-1.2.0.tar.gz
Algorithm Hash digest
SHA256 e946f19dd44a4f2abc819aa3e6cf4db163952e7de794ca24ad6ee3108ec79037
MD5 3f7e394bef173c0f9b1605cfe75e5cea
BLAKE2b-256 8661dddc71591c9c10b8a3c140d07c5025f4cdd09c4fa8944f624ca867cade0e

See more details on using hashes here.

Provenance

File details

Details for the file cldfcatalog-1.2.0-py2.py3-none-any.whl.

File metadata

  • Download URL: cldfcatalog-1.2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.5.2

File hashes

Hashes for cldfcatalog-1.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 732fe6f1cea7a6e3f01456e6f3751b3a4af5b0fd0951cd0db964c81b1abf4bb5
MD5 9c85d49f18a021570b32d296ae63d12e
BLAKE2b-256 2b36229a77e8f83dc201e48e8903f41f86ab2ba97183e3b9356d09208c7cff94

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page