-
Notifications
You must be signed in to change notification settings - Fork 10
AI-assisted training module review #165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
michmx
wants to merge
10
commits into
gh-pages
Choose a base branch
from
claude-code-review
base: gh-pages
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
629d260
Update setup instructions and add development files
michmx 5858efd
Modernize matplotlib introduction episode
michmx 34ad696
Modernize physics and Higgs search episodes
michmx 2c1736c
Modernize mplhep and dimuon spectrum episodes
michmx abbaed0
Update CLAUDE.md with comprehensive modernization summary
michmx de20e72
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] bc39e4b
Update _episodes/07-dimuonspectrum.md
michmx 7fc9e97
Apply suggestions from code review
michmx b425ccc
Update _episodes/01-introduction.md
michmx 4af7d99
Removing unnecessary info like charge of muons
michmx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,94 @@ | ||
| # CLAUDE.md | ||
|
|
||
| This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. | ||
|
|
||
| ## Project Overview | ||
|
|
||
| This is a Jekyll-based training module for the HEP Software Foundation (HSF) teaching "Matplotlib for HEP". It introduces matplotlib plotting library and creates plots commonly used in High Energy Physics, including specialized HEP styling via `mplhep`. | ||
|
|
||
| ## Recent Updates | ||
|
|
||
| The training materials have been modernized to align with current matplotlib and Python best practices: | ||
| - Updated to modern matplotlib 3.x+ styling and API usage | ||
| - Enhanced with mplhep context managers and experiment-specific styles | ||
| - Fixed deprecated functions and improved plot aesthetics | ||
| - Added comprehensive requirements.txt for dependency management | ||
| - Updated MathJax to modern CDN for equation rendering | ||
|
|
||
| ## Common Development Commands | ||
|
|
||
| ### Local Development | ||
| - **Serve locally**: `make serve` - Builds and serves the Jekyll site locally | ||
| - **Build site**: `make site` - Builds the site without serving | ||
| - **Clean**: `make clean` - Removes generated files and caches | ||
|
|
||
| ### Docker Alternative | ||
| - **Docker serve**: `make docker-serve` - Uses Docker to serve the site (requires Docker) | ||
|
|
||
| ### Repository Maintenance | ||
| - **Repository check**: `make repo-check` - Validates repository settings | ||
| - **Lesson validation**: `make lesson-check` - Validates lesson Markdown files | ||
| - **Complete validation**: `make lesson-check-all` - Full validation including line lengths and whitespace | ||
| - **Unit tests**: `make unittest` - Runs tests on checking tools | ||
|
|
||
| ### Pre-commit Hooks | ||
| This repository uses pre-commit hooks for code quality: | ||
| ```bash | ||
| pip3 install pre-commit | ||
| pre-commit install | ||
| ``` | ||
|
|
||
| ## Site Architecture | ||
|
|
||
| ### Jekyll Structure | ||
| - **_config.yml**: Main Jekyll configuration for HSF training theme | ||
| - **_episodes/**: Lesson content in Markdown format (7 episodes total) | ||
| - **_extras/**: Additional pages (about, discussion, figures, guide) | ||
| - **_includes/**: Reusable template components | ||
| - **fig/**: Image assets for lessons | ||
| - **Gemfile**: Ruby dependencies including hsf-training-theme | ||
|
|
||
| ### Content Organization | ||
| - Episodes are numbered sequentially (01-07) covering: | ||
| - **01-introduction.md**: Matplotlib basics, modern best practices, figure creation | ||
| - **02-coffee-break.md**: Interactive break elements | ||
| - **03-physics.md**: Standard Model background, particle physics theory | ||
| - **04-higgs-search.md**: Real ATLAS data analysis, histogram techniques | ||
| - **05-mplhep.md**: HEP-specific styling, experiment themes (CMS, ATLAS, etc.) | ||
| - **06-coffee-break.md**: Interactive break elements | ||
| - **07-dimuonspectrum.md**: Advanced analysis with invariant mass calculations | ||
| - Uses Carpentries lesson template structure | ||
| - Physics-focused content with LaTeX math support via modern MathJax | ||
|
|
||
| ### Build System | ||
| - Uses Jekyll with HSF training theme | ||
| - Ruby-based build system via Bundler | ||
| - Makefile provides convenience commands | ||
| - GitHub Pages deployment via gh-pages branch | ||
| - Pre-commit hooks enforce markdown and code formatting | ||
|
|
||
| ## Development Notes | ||
|
|
||
| - Main development branch: `gh-pages` | ||
| - Uses HSF training theme from remote repository | ||
| - Includes physics equation rendering via modern MathJax 3.x | ||
| - Associated notebooks repository for interactive content: `hsf_matplotlib_notebooks` | ||
| - Multiple cloud platforms supported: Binder, Google Colab, GitHub Codespaces, CERN SWAN | ||
| - **requirements.txt** available for local Python environment setup | ||
|
|
||
| ## Python Dependencies | ||
|
|
||
| The repository includes a comprehensive `requirements.txt` with: | ||
| - Core: matplotlib>=3.6.0, numpy, pandas | ||
| - HEP-specific: mplhep>=0.3.0, uproot>=4.0.0, hist>=2.6.0 | ||
| - Jupyter ecosystem: jupyterlab>=4.0.0, notebook, ipywidgets | ||
| - Data handling: h5py for HDF5 files | ||
|
|
||
| ## Code Style Guidelines | ||
|
|
||
| - Use explicit `fig, ax = plt.subplots()` pattern | ||
| - Prefer `plt.show()` over `fig.show()` | ||
| - Use context managers for temporary styling: `with hep.style.use("CMS"):` | ||
| - Include `plt.tight_layout()` for better subplot spacing | ||
| - Add subtle grids with `alpha=0.3` for better readability | ||
| - Use modern error bar styling with `capsize` and `markersize` parameters |
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.