Package: datalad-catalog
DataLad Catalog is a free and open source command line tool, with a Python API, that assists with the automatic generation of user-friendly, browser-based data catalogs from structured metadata. It is an extension toDataLadand forms part of the broader ecosystem of DataLad's distributed metadata handling and (meta)data publishing tools.AcknowledgementsThis software was developed with support from the German Federal Ministry of
Education and Research (BMBF 01GQ1905), the US National Science Foundation
(NSF 1912266), and the Deutsche Forschungsgemeinschaft (DFG, German Research
Foundation) under grant SFB 1451 (431549029,
INF project).1. Online demoNavigate tohttps://datalad.github.io/datalad-catalog/to view a live demo of a catalog generated with DataLad Catalog.This demo site is hosted via GitHub Pages and it builds from thegh-pagesbranch of this repository.2. How it worksDataLad Catalog can receive commands tocreatea new catalog,addandremovemetadata entries to/from an existing catalog,servean existing catalog locally, and more. Metadata can be provided to DataLad Catalog from any number of arbitrary metadata sources, as an aggregated set or as individual metadata items. DataLad Catalog has a dedicatedschema(using theJSON Schemavocabulary) against which incoming metadata items are validated. This schema allows for standard metadata fields as one would expect for datasets of any kind (such asname,doi,url,description,license,authors, and more), as well as fields that support identification, versioning, dataset context and linkage, and file tree specification.The process of generating a catalog, after metadata entry validation, involves:aggregation of the provided metadata into the catalog filetree, andgenerating the assets required to render the user interface in a browser.The output is a set of structured metadata files, as well as aVue.js-based browser interface that understands how to render this metadata in the browser. What is left for the user is to host this content on their platform of choice and to serve it for the world to see.3. Installdatalad-catalogStep 1 - Setup and activate virtual environmentWith your virtual environment manager of choice, create a virtual environment and ensure
you have a recent version of Python installed. Then activate the environment. E.g. withvenv:python -m venv my_catalog_env
source my_catalog_env/bin/activateStep 2 - Install the package from PyPIRun the following from your command line:pip install datalad-catalogIf you are a developer and would like to contribute to the code, instead clone the code base from GitHub and install withpiplocal changes :git clone https://github.com/datalad/datalad-catalog.git
cd datalad-catalog
pip install -e .Congratulations! You have now installeddatalad-catalog.Note on dependencies:Because this is an extension todataladand builds on metadata handling functionality, the installation process also installsdataladanddatalad-metaladas dependencies, although these do not have to be used as the only sources of metadata for a catalog.While the catalog generation process does not expect data to be structured as DataLad datasets, it can still be very useful to do so when building a full (meta)data management pipeline from raw data to catalog publishing. For complete instructions on how to installdataladandgit-annex, please refer to theDataLad Handbook.Similarly, the metadata input todatalad-catalogcan come from any source as long as it conforms to the catalog schema. While the catalog does not expect metadata originating only fromdatalad-metalad's extractors, this tool has advanced metadata handling capabilities that will integrate seamlessly with DataLad datasets and the catalog generation process.4. Generating a catalogThe overall catalog generation process actually starts several steps before the involvement ofdatalad-catalog. Steps include:curating data into datasets (a group of files in an hierarchical tree)adding metadata to datasets and files (the process for this and the resulting metadata formats and content vary widely depending on domain, file types, data availability, and more)extracting the metadata using an automated tool to output metadata items into a standardized and queryable setin the current context: translating the metadata into thecatalog schemain the current context: usingdatalad-catalogto generate a catalog from theschema-conforming metadataThe first four steps in this list can follow any arbitrarily specified procedures and can use any arbitrarily specified tools to get the job done. If these steps are completed, correctly formatted data can be input, together with some configuration details, todatalad-catalog. This tool then provides several basic commands for catalog generation and customization.For example:dataladcatalogvalidate-m<path/to/input/data># Validate input data located at <path/to/input/data> according to the catalog's schema.dataladcatalogcreate-c<path/to/catalog/directory>-m<path/to/input/data># Create a catalog at location <path/to/catalog/directory>, using input data located at <path/to/input/data>.dataladcatalogadd-c<path/to/catalog/directory>-m<path/to/input/data># Add metadata to an existing catalog at location <path/to/catalog/directory>, using input data located at <path/to/input/data>.dataladcatalogset-super-c<path/to/catalog/directory>-i<dataset_id>-v<dataset_version># Set the superdataset of an existing catalog at location <path/to/catalog/directory>, where the superdataset id and version are provided as arguments. The superdataset will be the first dataset displayed when navigating to the root URL of a catalog.dataladcatalogserve-c<path/to/catalog/directory># Serve the content of the catalog at location <path/to/catalog/directory> via a local HTTP server.dataladcatalogworkflow-new-c<path/to/catalog/directory>-d<path/to/superdataset># Run a workflow for recursive metadata extraction (using datalad-metalad), translating metadata to the catalog schema (using JQ bindings), and adding the translated metadata to a new catalog.dataladcatalogworkflow-update-c<path/to/catalog/directory>-d<path/to/superdataset>-s<path/to/subdataset># Run a workflow for updating a catalog after registering a subdataset to the superdataset which the catalog represents. This workflow includes extraction (using datalad-metalad), translating metadata to the catalog schema (using JQ bindings), and adding the translated metadata to the existing catalog.5. TutorialTo explore the basic functionality ofdatalad-catalog, please refer tothese tutorials.6. An example workflowThe DataLad ecosystem provides a complete set of free and open source tools that, together, provide full control over dataset/file access and distribution, version control, provenance tracking, metadata addition/extraction/aggregation, and catalog generation.DataLad itself can be used for decentralised management of data as lightweight, portable and extensible representations. DataLad MetaLad can extract structured high- and low-level metadata and associate it with these datasets or with individual files. And at the end of the workflow, DataLad Catalog can turn the structured metadata into a user-friendly data browser.Importantly, DataLad Catalog can operate independently as well. Since it provides its ownschemain a standard vocabulary, any metadata that conforms to this schema can be submitted to the tool in order to generate a catalog. Metadata items do not necessarily have to be derived from DataLad datasets, and the metadata extraction does not have to be conducted via DataLad MetaLad.Even so, the provided set of tools can be particularly powerful when used together in a distributed (meta)data management pipeline.7. ContributingFeedback / commentsPleasecreate a new issueif you have any feedback, comments, or requests.Developer requirementsIf you'd like to contribute as a developer, you need to install a number of extra dependencies:cd datalad-catalog
pip install -r requirements-devel.txtThis installssphinxand related packages for documentation building,coveragefor code coverage, andpytestfor testing.Contribution processTo make a contribution to the code or documentation, please:create an issue describing the bug/featurefork the project repository,create a branch frommain,check that tests succeed: from the project root directory, runpytestcommit your changes,push to your forkcreate a pull request with a clear description of the changesContributors ✨Thanks goes to these wonderful people (emoji key):Stephan Heunis🐛💻🖋🔣📖🎨🤔🚇🚧⚠️💬Alex Waite🔣🎨🤔💻📓🐛Julian Kosciessa📓✅🤔📖🐛Adina Wagner📖🐛💻🎨🤔🚇🚧⚠️💬Yaroslav Halchenko📓🤔Michael Hanke🤔🐛🧑‍🏫📓Benjamin Poldrack🤔Christian Mönch🤔🐛💻📖⚠️💬👀🎨Michał Szczepanik🐛💻📖⚠️Laura Waite🤔📖Leonardo Muller-Rodriguez📓👀tmheunis🐛💻🤔📓This project follows theall-contributorsspecification. Contributions of any kind welcome!