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

Replace ioneq with ionization_fraction and add setter #337

Merged
merged 25 commits into from
Jan 27, 2025

Conversation

jwreep
Copy link
Collaborator

@jwreep jwreep commented Dec 5, 2024

Fixes #324
Fixes #326
Also fixes a minor bug introduced by #332 that was breaking generate_hash_tables because the path to the hash tables changed.

  • Remove lingering ._ioneq -- not sure what needs to change with the parser but I couldn't get this to work
  • Add setter
  • Tests for setter

Copy link

codecov bot commented Dec 5, 2024

Codecov Report

Attention: Patch coverage is 98.96907% with 1 line in your changes missing coverage. Please review.

Project coverage is 90.61%. Comparing base (f6188e8) to head (de5af65).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
fiasco/tests/idl/test_idl_ioneq.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #337      +/-   ##
==========================================
- Coverage   90.96%   90.61%   -0.36%     
==========================================
  Files          41       41              
  Lines        3399     3432      +33     
==========================================
+ Hits         3092     3110      +18     
- Misses        307      322      +15     

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

@jwreep
Copy link
Collaborator Author

jwreep commented Dec 6, 2024

@wtbarnes, how were the .asdf files with the IDL data generated? They have ioneq keys in their data, so fully purging the repository of references to ioneq will require updating them. Alternatively, we can just leave those keys in the sections with IDL comparisons, which looks like it is only user-facing in the Docs examples.

@wtbarnes
Copy link
Owner

wtbarnes commented Dec 6, 2024

@wtbarnes, how were the .asdf files with the IDL data generated? They have ioneq keys in their data, so fully purging the repository of references to ioneq will require updating them. Alternatively, we can just leave those keys in the sections with IDL comparisons, which looks like it is only user-facing in the Docs examples.

The .asdf files containing the IDL results are automatically generated by the tests if the files do not exist already:

if write_file:
with asdf.AsdfFile(variables) as af:
af.write_to(file_path)
.

That being said, I do not think it is necessary to remove the usage of "ioneq" when it is in the context of the IDL results as that is what the quantity is called in the IDL code. I would actually prefer to preserve that nomenclature in that context.

As such, any reference to "ioneq" in the tests when referring to the IDL results can be left as is. All of the test files can also remain unchanged, both in name and their contents.

@jwreep jwreep marked this pull request as ready for review December 10, 2024 22:47
@jwreep jwreep requested a review from wtbarnes December 14, 2024 02:01
Copy link
Owner

@wtbarnes wtbarnes left a comment

Choose a reason for hiding this comment

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

A few suggestions regarding how the setter is handled and some docstring modifications. Thanks as always for taking this on.

This is a breaking change to the API, but I'm not so worried about that at this stage.

jwreep and others added 9 commits December 16, 2024 14:04
Co-authored-by: Will Barnes <will.t.barnes@gmail.com>
Co-authored-by: Will Barnes <will.t.barnes@gmail.com>
Co-authored-by: Will Barnes <will.t.barnes@gmail.com>
Co-authored-by: Will Barnes <will.t.barnes@gmail.com>
Co-authored-by: Will Barnes <will.t.barnes@gmail.com>
@wtbarnes wtbarnes self-requested a review January 15, 2025 01:15
@jwreep
Copy link
Collaborator Author

jwreep commented Jan 19, 2025

This completely fell off my radar. Been too busy with teaching. Codecov is complaining that I'm not testing the tests for some reason, but I think it's otherwise good to go. Let me know if there are any other changes you'd like!

Copy link
Owner

@wtbarnes wtbarnes left a comment

Choose a reason for hiding this comment

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

Just two small changes that I think got forgotten as part of the last round of corrections. Other than that, everything looks good! Thanks for slogging through this and apologies for the really delayed review.

@wtbarnes wtbarnes self-requested a review January 23, 2025 00:23
@wtbarnes
Copy link
Owner

Oh no. I messed this up and accidentally deleted those lines. 🤦 Let me fix that really quick.

@wtbarnes wtbarnes merged commit 0232377 into wtbarnes:main Jan 27, 2025
13 of 14 checks passed
@wtbarnes
Copy link
Owner

Thanks again Jeff!

@jwreep
Copy link
Collaborator Author

jwreep commented Jan 27, 2025

Thanks for finishing up the last few bits! I haven't had enough time to work on fiasco, but I'd like to get back to it soon.

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.

Add setter for ionization fraction Rename ioneq to ionization_fraction
2 participants