Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove unneeded param structures before validation #409

Merged
merged 2 commits into from
Aug 6, 2024

Conversation

daviesje
Copy link
Contributor

@daviesje daviesje commented Jul 24, 2024

In _setup_params which is called for every output structure, if a certain parameter structure is not provided it will not be returned, however the default parameter structure is still passed into validate_inputs. This means that for structures which don't require some of the input parameters (InitialConditions and PertrubedField which don't need astro params). If the other provided structures conflict with the defaults (not the actual provided parameters), then an error will be raised or unexpected behaviour will occur.

This PR makes the small change that parameter structures which are not requested from the funcion are not passed into validate_inputs.

@daviesje daviesje marked this pull request as ready for review July 25, 2024 10:34
@steven-murray
Copy link
Member

@daviesje I'm worried that this small change is breaking so many tests. What parameter is now getting passed through differently?

@daviesje
Copy link
Contributor Author

@daviesje I'm worried that this small change is breaking so many tests. What parameter is now getting passed through differently?

Yeah this was unexpected, I'm looking into the way the parameters are setup in the integration tests, something might be fetching a default when it isn't meant to

Copy link

codecov bot commented Aug 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.51%. Comparing base (a16376c) to head (ade25a8).
Report is 26 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #409      +/-   ##
==========================================
+ Coverage   82.47%   82.51%   +0.03%     
==========================================
  Files          13       13              
  Lines        3121     3122       +1     
  Branches      842      842              
==========================================
+ Hits         2574     2576       +2     
  Misses        391      391              
+ Partials      156      155       -1     

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

@steven-murray steven-murray merged commit 71e09ea into master Aug 6, 2024
21 checks passed
@steven-murray steven-murray deleted the input-verification-fix branch August 6, 2024 15:08
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.

2 participants