https://github.com/clariah/ineo-collaboration

how to get metadata into INEO

https://github.com/clariah/ineo-collaboration

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.8%) to scientific vocabulary
Last synced: 11 months ago · JSON representation

Repository

how to get metadata into INEO

Basic Info
  • Host: GitHub
  • Owner: CLARIAH
  • License: mit
  • Language: Python
  • Default Branch: main
  • Size: 444 KB
Statistics
  • Stars: 2
  • Watchers: 7
  • Forks: 0
  • Open Issues: 5
  • Releases: 0
Created about 3 years ago · Last pushed over 1 year ago
Metadata Files
Readme License

README.md

ineo-collaboration

This project serves as a tool to gather, process, and synchronize metadata (tools codemeta and datasets) and Rich User Content (RUC) files with an external API called INEO.

Overview

This repository comprises six scripts responsible for different functionalities:

Scripts Overview

  • main.py: The main script orchestrating the program's workflow.
  • harvester.py: Handles harvesting of data from codemeta, datasets and rich user contents (RUC)
  • rating.py: Filters codemeta reviewRatings using a RumbleDB database and processed RUC without a corresponding metadata file.
  • template.py: Designed to process JSON data from codemeta, datasets and RUC using a template and retrieves information based on a set of rules defined in that template. Creates a json file to be fed into INEO.
  • ineogetproperties.py: Fetches properties data from the INEO API and saves the JSON response to local files.
  • ineo_sync.py: Responsible for synchronization tasks related to INEO, such as creating new resources, updating existing resources and deleting inactive resources. It also matches the research domains and research activities with the corresponding INEO properties.

harvester.py

The harvester.py script serves as a tool to gather, process, and synchronize Codemeta and Rich User Content (RUC) files. It's designed to streamline data collection, manage databases, and generate JSONlines files for efficient integration with the INEO platform. It performs the following tasks:

Data Harvesting: Downloads Codemeta (software metadata from all of the sources within CLARIAH, which is harvested automatically, and periodically, by a harvesting tool) and RUC files from a Github repository.

Database Management: Maintains a SQLite database to track timestamps and changes with MD5 hashes. Only the files that have changed end up in a JSONlines file (codemeta.jsonl) File Comparison: Compares current and previous batches to identify file changes. JSONlines Generation: Converts gathered codemeta data into a JSONlines format (codemeta.jsonl) for further processing with a RumbleDB database. If the JSONL file is empty, there might be no updates to feed into INEO. Inactive Tool Tracking: Identifies inactive tools based on absence counts over 3 runs in a database.

rating.py

This script (rating.py) encompasses functions for querying RumbleDB, filtering codemeta IDs based on reviewratings (in our case resources with a reviewRating > 3 will be fed into INEO), and managing the processing of a JSONlines file (c3.jsonl). The c3.jsonl file consists of (changed) codemeta (consisting of tools with a reviewRating of > 3) and rich user contents files.

ineogetproperties.py

This script interacts with an API to fetch various properties data and store the JSON responses. The properties include tadirah vocabularies (https://vocabs.dariah.eu/tadirah/analyzing) and NWO research fields (https://w3id.org/nwo-research-fields#ComputersAndTheHumanities) to map, for instance, against the researchdomains and researchactivites retrieved from the codemeta files.

template.py

This script, template.py, is a crucial component of the program that plays a pivotal role in merging data from Rich User Contents (RUC), codemeta files (MD) and datasets based on a provided template file (templatedatasets.json or templatetools.json). The template follows a Domain-Specific Language (DSL) to define how the information should be processed and retrieved. The DSL can define queries to a RumbleDB database that retrieves values from the metadata or redirect to external queries ("queries" folder for tools and "dsqueries" for the datasets). Ultimately, the script merges the retrieved values from the RUC, codemeta and datasets into an INEO JSON file (processedjsonfilestools or processedjsonfilesdatasets) to be used with the INEO API.

ineo_sync.py

This script syncs data with an external INEO API. It operates on the processed jsonfiles, determining actions for each document (create, update, delete) based on their existence and properties. It also checks whether the researchDomains and researchActivities in the processed templates matches the ones in INEO.

Setup

This project utilizes Docker for containerization and includes two services: ineo-sync and rumbledb. You can start docker (assuming you use docker and are in the src directory of the source code) using:

docker compose up -d

To access the ineo-sync container and interact with it, run:

docker exec -it ineo-sync /bin/bash

Execute main.py to initiate the workflow.

python main.py

RumbleDB

For testing queries: http://0.0.0.0:8001/public.html

Owner

  • Name: CLARIAH
  • Login: CLARIAH
  • Kind: organization

CLARIAH offers humanities scholars a Common Lab providing access to large collections of digital resources and innovative tools for research

GitHub Events

Total
  • Issues event: 1
  • Issue comment event: 3
  • Pull request event: 1
  • Create event: 1
Last Year
  • Issues event: 1
  • Issue comment event: 3
  • Pull request event: 1
  • Create event: 1

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 245
  • Total Committers: 4
  • Avg Commits per committer: 61.25
  • Development Distribution Score (DDS): 0.49
Past Year
  • Commits: 11
  • Committers: 1
  • Avg Commits per committer: 11.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Ingeborg van Vugt i****t@h****m 125
Vic Ding q****g@d****l 94
Menzo Windhouwer m****o@w****l 16
hylmar h****r@e****l 10
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 9
  • Total pull requests: 1
  • Average time to close issues: 15 days
  • Average time to close pull requests: N/A
  • Total issue authors: 2
  • Total pull request authors: 1
  • Average comments per issue: 2.11
  • Average comments per pull request: 1.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 9
  • Pull requests: 1
  • Average time to close issues: 15 days
  • Average time to close pull requests: N/A
  • Issue authors: 2
  • Pull request authors: 1
  • Average comments per issue: 2.11
  • Average comments per pull request: 1.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • EnnoMeijers (7)
  • proycon (1)
Pull Request Authors
  • proycon (2)
Top Labels
Issue Labels
Pull Request Labels