Skip to content

Experiment & Code Linking #119

@huypham37

Description

@huypham37

Overview

Connect notes and papers to datasets, code repositories, and experiment logs.

Why

Modern science involves code and data. Notes should link to the GitHub repo or dataset that produced results.

Plan

1. Create ExternalLink Model

// Model/ExternalLink.swift
struct ExternalLink: Codable, Identifiable {
    let id: String
    var type: LinkType
    var url: String
    var title: String
    var description: String?
    var linkedNoteIds: [String]
    var linkedPaperIds: [String]
}

enum LinkType: String, Codable, CaseIterable {
    case github, gitlab, huggingface
    case dataset, zenodo, figshare
    case notebook, colab
    case custom
}

2. Link Management

  • Add links to notes: [[repo:url]]
  • Add links to papers (e.g., "Code for this paper")
  • Store in space metadata

3. UI Components

  • "Add External Link" in note editor
  • Link picker with type icons
  • Preview cards for GitHub repos (fetch README preview)
  • Quick-open in browser

4. GitHub Integration (optional)

  • Authenticate with GitHub
  • Show recent commits for linked repos
  • Link specific commits to notes

5. Dataset Integration

  • Zenodo/Figshare DOI lookup
  • HuggingFace dataset cards
  • Preview dataset metadata

Acceptance Criteria

  • Add GitHub/GitLab links to notes
  • Add dataset links (Zenodo, HuggingFace)
  • Links clickable to open in browser
  • Links display with type icons
  • Search across linked resources

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions