Skip to content

Convert numerics vars to dataclass#4306

Open
clmould wants to merge 2 commits into
mainfrom
Numerics-Vars_Dataclass
Open

Convert numerics vars to dataclass#4306
clmould wants to merge 2 commits into
mainfrom
Numerics-Vars_Dataclass

Conversation

@clmould

@clmould clmould commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Description

Checklist

I confirm that I have completed the following checks:

  • My changes follow the PROCESS style guide
  • I have justified any large differences in the regression tests caused by this pull request in the comments.
  • I have added new tests where appropriate for the changes I have made.
  • If I have had to change any existing unit or integration tests, I have justified this change in the pull request comments.
  • If I have made documentation changes, I have checked they render correctly.
  • I have added documentation for my change, if appropriate.

@codecov-commenter

codecov-commenter commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 56.17021% with 103 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.65%. Comparing base (ab98459) to head (004de62).

Files with missing lines Patch % Lines
process/core/scan.py 0.00% 33 Missing ⚠️
process/core/solver/solver_handler.py 0.00% 17 Missing ⚠️
process/core/solver/solver.py 9.09% 10 Missing ⚠️
process/core/final.py 0.00% 6 Missing ⚠️
process/core/solver/iteration_variables.py 66.66% 6 Missing ⚠️
process/core/caller.py 0.00% 4 Missing ⚠️
process/core/io/vary_run/config.py 0.00% 4 Missing ⚠️
process/core/solver/evaluators.py 0.00% 4 Missing ⚠️
process/models/physics/physics.py 0.00% 4 Missing ⚠️
process/core/io/vary_run/tools.py 40.00% 3 Missing ⚠️
... and 9 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4306      +/-   ##
==========================================
- Coverage   48.76%   48.65%   -0.11%     
==========================================
  Files         151      151              
  Lines       29325    29269      -56     
==========================================
- Hits        14299    14241      -58     
- Misses      15026    15028       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

@clmould clmould mentioned this pull request Jun 12, 2026
74 tasks
@clmould clmould force-pushed the Numerics-Vars_Dataclass branch from f0b9e2a to 4dd9ca6 Compare June 15, 2026 14:16
@clmould clmould force-pushed the Numerics-Vars_Dataclass branch from 4dd9ca6 to 004de62 Compare June 16, 2026 12:47
@clmould clmould marked this pull request as ready for review June 16, 2026 12:55
@clmould clmould requested a review from a team as a code owner June 16, 2026 12:55
):
objf_list = norm_objf_df[NORM_OBJF_NAME].unique()
else:
numerics.init_numerics()

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.

This was clearly being done for a reason before. Can you check that plot solutions does not change before and after because of removing this statement.

"""Base class for different solver implementations."""

def __init__(self, *, maxcal: int | None = None):
def __init__(self, *, data: DataStructure, maxcal: int | None = None):

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.

If we are passing the data structure in we can remove the maxcal argument and just get it from self.data

elif solver_name == "fsolve":
solver = FSolve()
solver = FSolve(
data=data,

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.

Suggested change
data=data,
data=data

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