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

Open
wants to merge 21 commits into
base: main
Choose a base branch
from

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 (d3166c6).

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.

fiasco/base.py Outdated Show resolved Hide resolved
fiasco/ions.py Outdated Show resolved Hide resolved
fiasco/ions.py Outdated Show resolved Hide resolved
fiasco/ions.py Outdated Show resolved Hide resolved
fiasco/ions.py Outdated Show resolved Hide resolved
fiasco/util/util.py Outdated Show resolved Hide resolved
tools/generate_hash_table.py Show resolved Hide resolved
fiasco/ions.py Outdated Show resolved Hide resolved
@wtbarnes wtbarnes self-requested a review January 15, 2025 01:15
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