Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 1, 2025

  • Analyze all atlas YAML configuration files to identify labels needing LaTeX formatting
  • Update y_labels with proper LaTeX math notation for units
  • Update x_label with proper LaTeX math notation for units
  • Ensure all physical units use LaTeX format (e.g., $\mathrm{MeV}$, $\mathrm{cm}^2$, etc.)
  • Test that all atlas configuration files still load correctly after changes
  • Verify changes maintain consistency with existing LaTeX patterns in the codebase
  • Fix backslash escaping issue - matplotlib requires single backslashes in parsed strings

Summary of Changes

Successfully updated 24 atlas configuration YAML files with proper LaTeX formatting for all plot labels containing physical units.

Backslash Escaping Fix (Latest Commit)

Fixed an escaping issue where quadruple backslashes (\\\\) in YAML were creating double backslashes in the parsed strings, which matplotlib's mathtext parser couldn't handle. Changed to double backslashes (\\) which correctly produce single backslashes after YAML parsing.

Technical Details:

  • YAML parsing: \\ in file → \ in Python string (correct)
  • Previous error: \\\\ in file → \\ in Python string → matplotlib parse error
  • Matplotlib expects: $\left[\mathrm{cm}^{-2}\cdot\mathrm{s}^{-1}\right]$ (single backslashes)

Files Fixed:

19 files with corrected backslash escaping:

  • ASPIS-Fe88, FNG-BKT, FNG-HCPB, FNG-SDDR, FNG-SS, FNG-SiC, FNG-W
  • FNS-TOF, HCPB_TBM_1D, IPPE-CF, IPPE-DT
  • ITER_1D, ITER_Cyl_SDDR, Oktavian, Simple_Tokamak
  • Sphere, SphereSDDR, Tiara-BC, WCLL_TBM_1D

Test Results:

✅ All 25 atlas processor tests now pass
✅ All configuration files load successfully
✅ LaTeX labels render correctly in matplotlib plots
✅ 144 total tests passing (only 1 unrelated network test failure)

The plot labels now use professional mathematical notation that matplotlib can correctly render.

Original prompt

This section details on the original issue you should resolve

<issue_title>[Feature request] - Improve plot labels</issue_title>
<issue_description>Is your feature request related to a problem? Please describe.
At the moment there are a number of benchmark where the quantity on the y axis is not expressed using math symbols.

Describe the solution you'd like
Go through all atlas configuration files and ensure that the "LateX" math convention is used to express units in order to improve the quality of the plots.

</issue_description>

<agent_instructions>in theory, it should only affect YAML files.</agent_instructions>

Comments on the Issue (you are @copilot in this section)

Fixes #406

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 1, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch copilot/fix-b669545b-7661-4162-9b3b-f18b11b26e9d

Comment @coderabbitai help to get the list of available commands and usage tips.

Co-authored-by: alexvalentine94 <40658938+alexvalentine94@users.noreply.github.com>
@dodu94 dodu94 marked this pull request as ready for review October 1, 2025 08:43
Copilot AI and others added 2 commits October 1, 2025 08:44
…lica

Co-authored-by: alexvalentine94 <40658938+alexvalentine94@users.noreply.github.com>
Co-authored-by: alexvalentine94 <40658938+alexvalentine94@users.noreply.github.com>
Copilot AI changed the title [WIP] [Feature request] - Improve plot labels Improve plot labels with LaTeX mathematical notation for physical units Oct 1, 2025
Copilot AI requested a review from alexvalentine94 October 1, 2025 08:47
@alexvalentine94
Copy link
Collaborator

@copilot our tests are not passing?

Co-authored-by: alexvalentine94 <40658938+alexvalentine94@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Oct 1, 2025

@copilot our tests are not passing?

Fixed in commit d1a0e82. The issue was incorrect backslash escaping - I had used quadruple backslashes (\\\\) in YAML which resulted in double backslashes in the parsed strings, causing matplotlib's mathtext parser to fail. Changed to double backslashes (\\) which correctly produce single backslashes after YAML parsing. All 25 atlas processor tests now pass.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • eng-gitlab.f4e.europa.eu
    • Triggering command: python -m pytest tests/ --ignore=tests/gui -v (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@codecov
Copy link

codecov bot commented Oct 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
see 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alexvalentine94
Copy link
Collaborator

Thanks @copilot!

@alexvalentine94 alexvalentine94 self-requested a review October 1, 2025 13:20
@alexvalentine94 alexvalentine94 requested a review from dodu94 October 1, 2025 13:21
Copy link
Member

@dodu94 dodu94 left a comment

Choose a reason for hiding this comment

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

image

plots are improved as expected

@dodu94 dodu94 merged commit ee6ab28 into developing Oct 2, 2025
21 checks passed
@dodu94 dodu94 deleted the copilot/fix-b669545b-7661-4162-9b3b-f18b11b26e9d branch October 2, 2025 07:24
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.

3 participants