Skip to content

Conversation

Copy link

Copilot AI commented Aug 23, 2025

This PR transforms the eic-shell repository into a comprehensive template for EIC software development with full GitHub Codespaces, Copilot integration, and advanced data analysis capabilities.

Key Features Added

GitHub Copilot Integration

  • Comprehensive Context: Added detailed copilot instructions (.github/copilot-instructions.md) providing Copilot with extensive knowledge about the EIC software ecosystem
  • Physics Framework Coverage: Includes context for Geant4, ROOT, DD4hep, Acts, Epic, EICrecon, Podio, and Gaudi
  • Development Patterns: Documents common physics simulation and analysis patterns for better code suggestions
  • Environment Details: Explains container setup, environment variables, and development workflows

Template Repository Configuration

  • GitHub Template: Configured with .github/template.yml for easy "Use this template" functionality
  • Usage Documentation: Added comprehensive guide (.github/TEMPLATE_USAGE.md) for creating derived repositories
  • Quick Start: Updated main README with clear template usage instructions and Codespaces integration

Enhanced Development Environment

  • DevContainer Improvements: Enhanced .devcontainer/devcontainer.json with:
    • Pre-configured VS Code extensions (C++, CMake, Python, Jupyter)
    • C++20 standard configuration and proper include paths
    • Port forwarding for web-based tools and Jupyter Lab
    • GUI support with security configurations
    • Welcome messages highlighting available tools

EIC Data Analysis Capabilities

  • XRootD Integration: Direct access to EIC simulation datasets at dtn-eic.jlab.org
  • Jupyter Lab Support: Full notebook environment with physics analysis tools
  • Sample Analysis Notebook: Complete example (examples/eic_data_analysis.ipynb) demonstrating:
    • Reading EDM4hep files from XRootD servers using uproot
    • Track and particle analysis with physics-realistic distributions
    • Standard EIC analysis patterns (pT, η, φ distributions)
    • Invariant mass calculations and physics plots
    • Calendar-versioned data production access patterns
  • Scientific Python Stack: Pre-configured with uproot, matplotlib, pandas, seaborn

Example Project Structure

  • Complete Template: Added examples/project-template/ with working CMake configuration
  • Build Automation: Includes build scripts and proper project organization
  • Documentation: Shows best practices for EIC software project structure

Impact for EIC Community

For New Projects: Developers can click "Use this template" and immediately have:

  • Complete EIC physics software stack (Geant4, ROOT, DD4hep, etc.)
  • GitHub Codespaces environment ready in minutes
  • Copilot with deep understanding of EIC frameworks
  • Working project structure with build system
  • Jupyter Lab for interactive data analysis

For Data Analysis: Teams can:

  • Access EIC simulation data directly from XRootD servers
  • Use provided analysis notebook as starting point
  • Perform physics analysis with standard Python tools
  • Visualize results with matplotlib and ROOT integration

For Existing Projects: Teams can copy the configuration files to add:

  • Instant Codespaces support with EIC software
  • Enhanced Copilot context for physics development
  • Standardized development environment setup

Example Usage

After creating a repository from this template:

# Environment is immediately ready - no setup needed
mkdir build && cd build
cmake ..  # CMake finds all EIC packages automatically
make -j$(nproc)

# Start Jupyter Lab for data analysis
jupyter lab --ip=0.0.0.0 --port=8888 --no-browser --allow-root

# Access EIC data directly
python -c "import uproot; print(uproot.open('root://dtn-eic.jlab.org//volatile/eic/EPIC/RECO/25.04.1/...'))"

Copilot now understands context like:

// Create electromagnetic calorimeter geometry using DD4hep  
// for EIC barrel region with lead-tungstate crystals

This implementation provides seamless integration between modern cloud development tools, specialized EIC physics software, and comprehensive data analysis capabilities, significantly lowering the barrier to entry for new contributors and streamlining both development and analysis workflows.


💡 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.

Copilot AI self-assigned this Aug 23, 2025
Copilot AI and others added 2 commits August 23, 2025 15:10
… EIC development

Co-authored-by: wdconinc <4656391+wdconinc@users.noreply.github.com>
Co-authored-by: wdconinc <4656391+wdconinc@users.noreply.github.com>
Copilot AI changed the title [WIP] Create copilot instructions for the eic-shell template repository that will be used by derived repository to load the devcontainer setup already present, which sets up the eic_xl:nightly container with geant4, ROOT, DD4hep, and the epic and EICrecon so... Add comprehensive GitHub Copilot instructions and template configuration for EIC development environment Aug 23, 2025
Copilot AI requested a review from wdconinc August 23, 2025 15:13
@wdconinc
Copy link
Contributor

@copilot The instructions for this template repository are also intended to support analysis of EIC data sets locate on the public XRootD server at dtn-eic.jlab.org, where files can be listed with e.g. xrdfs dtn-eic.jlab.org ls /volatile/eic/EPIC/RECO/25.04.1. The RECO directories contain the YY.MM.patch calendar versioned simulation data production releases. The most recent version is preferred. Analyzing this data using jupyter notebooks is preferred. A sample jupyter notebook that loads a sample data production using uproot and that sets up a sample EIC analysis should be provided as a starting point.

Co-authored-by: wdconinc <4656391+wdconinc@users.noreply.github.com>
Copy link
Author

Copilot AI commented Aug 25, 2025

@copilot The instructions for this template repository are also intended to support analysis of EIC data sets locate on the public XRootD server at dtn-eic.jlab.org, where files can be listed with e...

Added comprehensive EIC data analysis support in commit 51f13ca:

  • Created examples/eic_data_analysis.ipynb - complete Jupyter notebook demonstrating EIC dataset analysis from XRootD server
  • Integrated XRootD access to dtn-eic.jlab.org with examples for accessing calendar-versioned data productions
  • Configured Jupyter Lab environment with uproot, matplotlib, pandas and scientific Python stack
  • Added sample physics analysis including track distributions, pseudorapidity plots, and invariant mass calculations
  • Updated copilot instructions with EIC data analysis context and XRootD usage patterns

The notebook provides a comprehensive starting point for analyzing EIC simulation data with proper physics analysis patterns and visualization examples.

Copilot AI changed the title Add comprehensive GitHub Copilot instructions and template configuration for EIC development environment Add comprehensive GitHub Copilot instructions, template configuration, and EIC data analysis support Aug 25, 2025
Copilot AI requested a review from wdconinc August 25, 2025 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants