Add conditional runprov metadata extractor for datasets with run records#400
Draft
Add conditional runprov metadata extractor for datasets with run records#400
Conversation
- Add has_run_records field to RepoUrl model - Create database migration for new field - Add has_datalad_run_records() utility function to detect DATALAD RUNCMD in git history - Update _update_dataset_url_info to populate has_run_records field - Add _get_extractors_for_url() to conditionally include runprov extractor - Add check in extract_ds_meta to skip runprov if no run records - Update chk_url_to_update to use dynamic extractor list Co-authored-by: yarikoptic <39889+yarikoptic@users.noreply.github.com>
- Add tests for has_datalad_run_records() function - Add tests for runprov extractor conditional execution - Add extractor name mapping for metalad compatibility - Fix imports and Flask context handling in tests Co-authored-by: yarikoptic <39889+yarikoptic@users.noreply.github.com>
- Run black to reformat all Python files - Run isort to fix import ordering - Remove unused ds_clone variable - Fix trailing whitespace issues Co-authored-by: yarikoptic <39889+yarikoptic@users.noreply.github.com>
- Add comment explaining why we search all branches for run records - Improve test assertions to check meaningful metadata fields - Verify metadata extraction produces expected output Co-authored-by: yarikoptic <39889+yarikoptic@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add runprov metadata extractor with git log detection
Add conditional runprov metadata extractor for datasets with run records
Feb 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The runprov extractor extracts provenance metadata from DataLad run command records but fails on datasets without them. This adds detection and conditional enablement.
Changes
Database schema
has_run_recordsboolean field toRepoUrlmodelf1a2b3c4d5e6_add_has_run_records_to_repourl.pyDetection logic (
datalad_registry/utils/datalad_tls.py)has_datalad_run_records(ds)function searches git history for "DATALAD RUNCMD" markersgit log --all --grep="DATALAD RUNCMD" -n 1Conditional enablement (
datalad_registry/tasks/__init__.py)_update_dataset_url_info()populateshas_run_recordsfield_get_extractors_for_url()adds runprov only whenhas_run_records=Trueextract_ds_meta()returnsABORTEDif runprov called without run recordsExample
Tests
has_datalad_run_records()functionWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
esm.ubuntu.com/usr/lib/apt/methods/https /usr/lib/apt/methods/https unner/pytest-1/t-c sql/16/bin/pg_codiff.ignoreSubmodules=none git -c dules=none -c git for-each-ref --format=%(refna-c refs/heads git -c dules=none -c t commit -m Add file1.txt, f--noprofile git(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.