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-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7ab7ecb904436c1123af1e912d44cd6fe648cb6c29513bd53b4c131a62f5ceb |
|
MD5 | 66c4bbeb8cf6939a7b1106fd16c37045 |
|
BLAKE2b-256 | af86bbe41a2958178f576a51cca8392e637b5e6359f32dc233afcc7cc4ab9fee |
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a91972473c19b2aea98b85ba0d92eb6cb0572b55a68dfa017090672ce4f0a2c |
|
MD5 | 8ac979ac4bf110e385a9b74381bd73e6 |
|
BLAKE2b-256 | f72c4038ee4628cb84c63d2b87ccef77483a90760c85b66c29aa3fbbbcb35e6c |