Skip to content

Commit

Permalink
refactor: ♻️ Update model_dump() method calls
Browse files Browse the repository at this point in the history
  • Loading branch information
Anselmoo committed Jan 21, 2024
1 parent b32a4d5 commit d061673
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion spectrafit/api/test/test_cmd_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def test_global_fit() -> None:
"""Test for global fitting settings of CMD Model."""
result = CMDModelAPI(infile="")
result.global_ = 1
assert result.dict()["global_"] == 1
assert result.model_dump()["global_"] == 1


def test_sha256() -> None:
Expand Down
8 changes: 5 additions & 3 deletions spectrafit/plugins/notebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,8 @@ def update_layout_axes(
fig.update_layout(
title=args_plot.title,
legend_title=args_plot.legend_title,
legend=args_plot.legend.dict(),
font=args_plot.font.dict(),
legend=args_plot.legend.model_dump(),
font=args_plot.font.model_dump(),
showlegend=args_plot.show_legend,
width=args_plot.size[0],
height=height,
Expand Down Expand Up @@ -939,7 +939,9 @@ class refers to the `Pydantic`-Definition of the `SpectraFit` class.
@property
def pre_process(self) -> None:
"""Pre-processing class."""
self.df, _pre_statistic = PreProcessing(df=self.df, args=self.args_pre.dict())()
self.df, _pre_statistic = PreProcessing(
df=self.df, args=self.args_pre.model_dump()
)()
self.pre_statistic = _pre_statistic["data_statistic"]
self.df_pre = self.df.copy()

Expand Down

0 comments on commit d061673

Please sign in to comment.