Skip to content

FIX: Import Formulas from Save Files#237

Merged
zdomke merged 6 commits into
mainfrom
zdomke/formula-import
Mar 16, 2026
Merged

FIX: Import Formulas from Save Files#237
zdomke merged 6 commits into
mainfrom
zdomke/formula-import

Conversation

@zdomke

@zdomke zdomke commented Mar 12, 2026

Copy link
Copy Markdown
Collaborator

Description

Fix the bug that prevented users from importing save files with formulas. The issue was just that formulas were not being addressed properly in ControlPanel.set_curves(). This PR checks if the given curve dictionary includes a "formula" key that should match the format of trace's save files.

I also updated the example save file for formulas because the indexing format for curves is out of date. I updated this by saving the state of trace to the file.

Motivation

Closes #206

Screenshots

Screenshot 2026-03-12 at 14 42 20

Pre-merge checklist

  • Code works interactively
  • Code contains descriptive docstrings
  • New/changed functions and methods are covered in the test suite where possible
  • Test suite passes locally
  • Test suite passes on GitHub Actions

@zdomke zdomke requested a review from a team March 12, 2026 23:59
@zdomke zdomke self-assigned this Mar 12, 2026
@zdomke zdomke added the bug Something isn't working label Mar 12, 2026
@zdomke zdomke force-pushed the zdomke/formula-import branch from 8fca755 to b30a6de Compare March 13, 2026 00:09
@zdomke zdomke force-pushed the zdomke/formula-import branch from b30a6de to 50c7c27 Compare March 13, 2026 16:18
@zdomke zdomke marked this pull request as ready for review March 13, 2026 16:34

@jbellister-slac jbellister-slac left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good to me!

@zdomke zdomke merged commit ba5dcc8 into main Mar 16, 2026
4 checks passed
@zdomke zdomke deleted the zdomke/formula-import branch March 16, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] - Formula Import Broken

2 participants