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'
Configuration
cldfcatalog supports discovery of local paths to catalog clones via a configuration file.
If a file catalog.ini is found at platformdirs.user_config_dir('cldf') (see platformdirs) is found, its clones section is used as a
mapping from Catalog.cli_name() to clone path. Thus, with a configuration
[clones]
clts = /home/forkel/.config/cldf/clts
a catalog can be intialized as
with Catalog.from_config('clts', tag='v1.0'):
...
When cloning a catalog,
running Catalog.clone,appdirs.user_config_dir('cldf') will be used as directory for
the clone, and the path will be written to the config file.
To add add paths to a config file use it as context manager:
from cldfcatalog import Config
with Config.from_file() as cfg:
cfg.add_clone(key, path)
Metadata
Release files for cldfcatalog 1.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cldfcatalog-1.7.0.tar.gz | 13.8 kB | Without provenance | Details for cldfcatalog-1.7.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cldfcatalog-1.7.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for cldfcatalog-1.7.0-py2.py3-none-any.whl |
Total release size: 26.0 kB
Release files / cldfcatalog-1.7.0.tar.gz
| Download URL | cldfcatalog-1.7.0.tar.gz |
|---|---|
| Size | 13.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
87c87b4a2b11d94eb2642701ef45e6c912cae2b042add7fe9ee0a142f0402897
|
|
BLAKE2b-256 checksum How to use checksums |
5535dae1e85839b350a2716406ba2eba1fb2863ab33b3f9124d3c3d09a3456ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.3
|
Release files / cldfcatalog-1.7.0-py2.py3-none-any.whl
| Download URL | cldfcatalog-1.7.0-py2.py3-none-any.whl |
|---|---|
| Size | 12.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
8df6257efddc9134e853ab75535ffb28e4ab1737a2ec31c6cb0e724bd6350532
|
|
BLAKE2b-256 checksum How to use checksums |
5ac6df678df491bb7dbfd0ae51b0efd91c6f34e16d85cb47aa3b14ae9602f1fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.3
|
Security for cldfcatalog 1.7.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.