-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Figure extraction from experiment data by name without extension (#1287)
### Summary Figure names could be referred without ".svg" at the ending. ### Details and comments Some details that should be in this section include: In #629 , an issue was raised where a figure that was saved with the name "abcd" couldn't be accessed. This issue is caused by that the 'add_figures()' method in `ExperimentData` class added ".svg" automatically. As it explicitly written that SVG extension is added if the file name doesn't have one, we can conclude that all figure names have ".svg" extension. To not make a major change in the code I added to the `figure` method in `ExperimentData` class a check for the extension of the `figure_key`. If it doesn't have ".svg" ending, it adds one before trying to pull it from the dict of figures. --------- Co-authored-by: Yael Ben-Haim <[email protected]>
- Loading branch information
1 parent
cfb47e2
commit 7e920d3
Showing
3 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
4 changes: 4 additions & 0 deletions
4
releasenotes/notes/access_figure_without_extension-5b7438c19e223d6b.yaml
This file contains 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,4 @@ | ||
--- | ||
upgrade: | ||
- | | ||
Figures in `ExperimentData` objects can now be accessed without '.svg' extension. |
This file contains 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