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

Uploaded Source

Built Distribution

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

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: cldfcatalog-1.1.0.tar.gz
  • Upload date:
  • Size: 9.1 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.1.0.tar.gz
Algorithm Hash digest
SHA256 a7ab7ecb904436c1123af1e912d44cd6fe648cb6c29513bd53b4c131a62f5ceb
MD5 66c4bbeb8cf6939a7b1106fd16c37045
BLAKE2b-256 af86bbe41a2958178f576a51cca8392e637b5e6359f32dc233afcc7cc4ab9fee

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: cldfcatalog-1.1.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.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0a91972473c19b2aea98b85ba0d92eb6cb0572b55a68dfa017090672ce4f0a2c
MD5 8ac979ac4bf110e385a9b74381bd73e6
BLAKE2b-256 f72c4038ee4628cb84c63d2b87ccef77483a90760c85b66c29aa3fbbbcb35e6c

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