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.0.0.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

cldfcatalog-1.0.0-py2.py3-none-any.whl (9.6 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: cldfcatalog-1.0.0.tar.gz
  • Upload date:
  • Size: 9.0 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.0.0.tar.gz
Algorithm Hash digest
SHA256 66ee6bab9a3300a29e78c91aa6e3ed07ca60239d74decf4f3f432dd194699a16
MD5 08a7029f9494f58cd49f993f516da950
BLAKE2b-256 92832a6c07f5403333fb0449e8d9d5768de1d8f854054be94470170553134fd7

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: cldfcatalog-1.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 9.6 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.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 34714166a6d018ab69379147799cb10a67dddc76d212828e5f4c8173ca1c154f
MD5 6346b2a58686198475f8d707e96ba284
BLAKE2b-256 6cc3c8402c7736e6abc822b94dded9ad65fa30baf08cae840c895814e22d1314

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