feat: Implement metadata system and reorganize project structure
✨ Features: - Add comprehensive metadata system with YAML/JSON support - Implement hierarchical metadata inheritance from parent folders - Support plot-specific metadata overrides - Add metadata caching for performance optimization 🗂️ Code Organization: - Move Python orchestration code to orchestration/ folder - Move validation utilities to tests/ folder - Move documentation to docs/ folder - Separate metadata functionality into dedicated module 🔧 Infrastructure: - Add automatic asset copying to web directory - Fix asset path resolution for nested directories - Update template to use dynamic asset paths - Add MetadataConfig class with inheritance options 📚 Documentation: - Add comprehensive metadata usage guide (METADATA_USAGE.md) - Add implementation documentation (METADATA_IMPLEMENTATION.md) - Include example metadata files in examples/ - Add metadata validation utility script 🐛 Bug Fixes: - Fix breadcrumb navigation and JavaScript functionality - Resolve asset path issues in nested directories - Update template imports for modular CSS/JS structure This commit introduces a flexible metadata system that allows users to add rich metadata to plots and folders using YAML or JSON files, with full hierarchical inheritance and plot-specific overrides. The project structure is now better organized with clear separation of concerns.
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
# Example folder metadata file
|
||||
# This file should be named "meta.yaml" in a folder containing plots
|
||||
|
||||
# Folder-level metadata that applies to all plots in this folder
|
||||
title: "Analysis Results"
|
||||
description: "Comprehensive analysis of ttbar events in Run 2 data"
|
||||
experiment: "CMS"
|
||||
dataset: "Run2_2016_nano_v9"
|
||||
analysis_type: "ttbar_analysis"
|
||||
|
||||
# Author information
|
||||
author:
|
||||
name: "Klaus Schmidt"
|
||||
email: "kschmidt@example.com"
|
||||
institution: "Example University"
|
||||
|
||||
# Analysis parameters that apply to all plots in this folder
|
||||
parameters:
|
||||
luminosity: "35.9 fb^-1"
|
||||
center_of_mass_energy: "13 TeV"
|
||||
selection: "baseline"
|
||||
|
||||
# Tags for categorization
|
||||
tags:
|
||||
- "ttbar"
|
||||
- "run2"
|
||||
- "cms"
|
||||
- "analysis"
|
||||
|
||||
# Custom styling or display options
|
||||
display:
|
||||
highlight: true
|
||||
category: "primary_results"
|
||||
order_priority: 1
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"title": "Specific Plot Analysis",
|
||||
"description": "This metadata overrides folder metadata for this specific plot",
|
||||
"plot_type": "histogram",
|
||||
"variables": {
|
||||
"x_axis": "invariant_mass",
|
||||
"y_axis": "events",
|
||||
"units": "GeV"
|
||||
},
|
||||
"selection": "signal_region",
|
||||
"statistics": {
|
||||
"entries": 125000,
|
||||
"mean": 125.3,
|
||||
"std_dev": 2.1
|
||||
},
|
||||
"tags": ["signal", "mass_peak", "important"],
|
||||
"display": {
|
||||
"highlight": true,
|
||||
"featured": true,
|
||||
"order_priority": 0
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user