Python library to access CLDF reference catalogs
Project description
cldfcatalog
Utilities to use git
repository clones and reference catalogs.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file cldfcatalog-0.1.0.tar.gz
.
File metadata
- Download URL: cldfcatalog-0.1.0.tar.gz
- Upload date:
- Size: 8.6 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 738e5276e8ec0137528773462faf3c06074fdfc72e019b7449f9cf4de5ff6756 |
|
MD5 | b78cf58bf6348db5123d1d0a218f2b2a |
|
BLAKE2b-256 | b30f81aab27febc210bbd4699fd774c3b58ef4c10a8e38fef636da51f3cd1ac2 |
Provenance
File details
Details for the file cldfcatalog-0.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: cldfcatalog-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 9.1 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 736cdae457b1ca955b99df7937c5672aa8a8c3e52ab5ccdae1fccf0b2cec651f |
|
MD5 | c150f00c9d2efa8f25c46ac03eb27979 |
|
BLAKE2b-256 | 3bb425a9ccc73351616137d20663bb592394842e319957d90a8c46dae01f1cef |