Skip to content

feature/tag, ls-tag #6

Description

@bwalsh

📓 Refactored version of the original GitHub issue and Python CLI prototype. It replaces Indexd alias manipulation with a file-based approach: tags are stored in a TSV-formatted sidecar file META/tags.tsv

🆕 Added tsv tag store - combines cli and user editable "spreadsheet"

Summary of Refactor:

  • Changed add-linkscalypr tag
  • Changed ls-linkscalypr ls-tag
  • Renamed CLI parser commands, help text, and function bindings accordingly
  • Example usage and doc blocks aligned with new naming convention

📓 User Story 1: Tagging Remote Files for Discoverability and Retrieval

As a researcher or developer

I want to associate tags (aliases) with files tracked by Git LFS

So that they can be discovered, categorized, and integrated into metadata workflows


Acceptance Criteria

  • I can run calypr tag <path> <curies> with a wildcard or file path matching Git LFS-managed files
  • The curies argument is a comma-separated list of CURIE-style prefix:value tags
  • Tags are validated and maintained in a META/tags.tsv sidecar file
  • Only files tracked by Git LFS are processed; others are skipped with a warning
  • If --dry-run is specified, changes are printed but not saved

💻 Example Usage

calypr tag "data/*.bam" "doi:10.1234/abcd,Patient:xyz,Specimen:abc" --dry-run
calypr tag "results/file1.txt" "assay:my-pipeline"

📓 User Story 2: Viewing Tags for Tracked Files

As a project contributor

I want to list tags for Git LFS-tracked files

So that I can ensure metadata consistency and discoverability


Acceptance Criteria

  • I can run calypr ls-tag to list tags for all LFS-tracked files
  • I can specify a path or wildcard to filter the listing
  • Tags are read from .meta sidecar JSON files
  • If no .meta file or tags exist, I see a clear message

💻 Example Usage

calypr ls-tag
# ➜ results/file1.txt assay:my-pipeline
# ➜ data/my-file.bam doi:10.1234/abcd,Patient:xyz,Specimen:abc

calypr ls-tag "data/*.bam"
# ➜ data/my-file.bam doi:10.1234/abcd,Patient:xyz,Specimen:abc

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions