Skip to content

Conversation

@michmx
Copy link
Member

@michmx michmx commented Aug 4, 2025

Performing a review of the repository using Claude Code as assistant.

Note: This is an experiment within the HSF Training, exploring the usage of AI agents to update outdated training modules

  • Update setup instructions and add requirements.txt file
  • Fix broken Google Colab badge URL in setup.md
  • Add GitHub Codespaces as modern cloud alternative
  • Modernize local setup with conda and pip/venv options
  • Add best practices in the chapters
  • Update MathJax CDN from deprecated to modern jsdelivr version
  • Modernize matplotlib plotting with figsize, alpha, linewidth parameters
  • Create CLAUDE.md for future Claude Code instances

🤖 Generated with Claude Code
Co-Authored-By: Claude [email protected]

michmx and others added 6 commits August 3, 2025 20:42
- Fix broken Google Colab badge URL in setup.md
- Add GitHub Codespaces as modern cloud alternative
- Modernize local setup with conda and pip/venv options
- Emphasize JupyterLab as recommended interface
- Add requirements.txt with HEP-specific dependencies
- Create CLAUDE.md for future Claude Code instances

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Fix outdated matplotlib documentation image URL
- Add modern best practices callout highlighting matplotlib 3.x improvements
- Update mplhep usage with context managers and clearer style options
- Improve figure creation recommendations (aspect ratio and DPI)
- Enhance histogram example with better styling and error bar practices
- Add proper figure creation, labels, and grid styling to examples

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Physics episode (03):
- Update MathJax CDN from deprecated cdn.mathjax.org to modern cdn.jsdelivr.net

Higgs search episode (04):
- Replace outdated mpl.rcParams with modern plt.rc_context() approach
- Add figsize parameter directly to plt.subplots() calls
- Enhance histogram plots with alpha transparency and subtle grids
- Improve plot_data() function with proper documentation and error handling
- Add plt.tight_layout() for better subplot spacing
- Include capsize and markersize for better error bar styling
- Fix minor grammar issues in keypoints

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
mplhep episode (05):
- Fix deprecated ax.title() method to ax.set_title()
- Update fig.show() to modern plt.show() approach
- Add context manager examples for temporary styling
- Fix grammar in keypoints description
- Enhance mplhep usage guidance with available experiment styles

Dimuon spectrum episode (07):
- Update MathJax CDN from deprecated to modern jsdelivr version
- Fix critical missing charge variable (q) definition and data cleaning
- Modernize matplotlib plotting with figsize, alpha, linewidth parameters
- Add consistent grids, font sizes, and plt.tight_layout() for better appearance
- Fix variable name consistency (M -> masses) in subplot examples
- Enhance histogram styling with modern best practices
- Fix typo in numpy explanation text

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Add Recent Updates section documenting matplotlib 3.x+ modernization
- Enhance Content Organization with detailed episode descriptions
- Expand Development Notes with modern MathJax and cloud platform info
- Add Python Dependencies section documenting requirements.txt contents
- Add Code Style Guidelines section with modern matplotlib best practices
- Document context manager usage, error bar styling, and visual enhancements

This update provides future Claude Code instances with complete guidance
on the repository's modernized structure and coding standards.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@michmx michmx requested review from ariostas and Copilot August 4, 2025 14:58
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modernizes the HSF matplotlib training materials with AI-assisted updates focusing on current best practices, improved setup instructions, and enhanced plotting aesthetics. The changes update deprecated functionality while maintaining the educational focus of the HEP-specific matplotlib training.

  • Update setup instructions with modern cloud alternatives (GitHub Codespaces) and conda/pip workflows
  • Fix broken Google Colab badge URL and update MathJax CDN to modern jsdelivr version
  • Modernize matplotlib plotting code with improved parameters, styling, and best practices throughout episodes

Reviewed Changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
setup.md Enhanced setup instructions with GitHub Codespaces, modernized conda/pip workflows, and fixed broken Colab badge
_episodes/07-dimuonspectrum.md Updated MathJax CDN, modernized plotting with figsize/alpha/linewidth, improved histogram styling
_episodes/05-mplhep.md Fixed grammar issues, modernized mplhep usage patterns, replaced deprecated fig.show() calls
_episodes/04-higgs-search.md Modernized matplotlib configuration, enhanced plot styling with better parameters and documentation
_episodes/03-physics.md Updated MathJax CDN from deprecated version to modern jsdelivr implementation
_episodes/01-introduction.md Added modern best practices callout, updated figure references, enhanced histogram examples
CLAUDE.md New documentation file providing project context and development guidance for AI assistants

Copy link
Member

@ariostas ariostas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is decent, but it need some more careful review. There are a few things that it made up and need to be fixed, but there are also a few good fixes. I didn't run the new code, so that also needs to be checked before this is merged.

1. Go to the [notebooks repository](https://github.com/hsf-training/hsf_matplotlib_notebooks)
2. Click the green "Code" button and select "Codespaces"
3. Create a new codespace or use an existing one
4. The environment will be automatically configured with Python and Jupyter
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jupyter codespaces are still in beta and need a few extra steps.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ariostas Thanks a lot for the careful review!

I didn't catch in my first read some of the hallucinations. I will try to find some time during the week to run the code by myself (Yet another motivation to move for Jupyterbook and being able to actually run the code with CI)

michmx and others added 3 commits August 4, 2025 14:58
Apply changes from review by @ariostas

Co-authored-by: Andres Rios Tascon <[email protected]>
Co-authored-by: Andres Rios Tascon <[email protected]>
@michmx michmx changed the title Claude code review AI-assisted training module review Aug 6, 2025
@stale
Copy link

stale bot commented Oct 17, 2025

This issue or pull request has been automatically marked as stale because it has not had recent activity. Please manually close it, if it is no longer relevant, or ask for help or support to help getting it unstuck. Let me bring this to the attention of @amorenobr @vlukashenko @richa2710 @michmx for now.

@stale stale bot added the stale label Oct 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants