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

Feature better table #155

Merged
merged 18 commits into from Jun 15, 2021
Merged

Feature better table #155

merged 18 commits into from Jun 15, 2021

Conversation

grburgess
Copy link
Contributor

This addresses #154 A new table model format is created that does not rely on pandas and a t.clean() member function is created that removes the interpolators when creating many table models.

A function to convert old table models from their format into the new one is created.

This frees us from relying on pandas to keep its HDF5 format stable.

This must be merged after #153 as I worked off this branch.

@grburgess grburgess requested review from henrikef and omodei May 23, 2021 18:26
@codecov-commenter
Copy link

codecov-commenter commented May 24, 2021

Codecov Report

Merging #155 (253230e) into master (690891d) will decrease coverage by 1.27%.
The diff coverage is 86.13%.

@@            Coverage Diff             @@
##           master     #155      +/-   ##
==========================================
- Coverage   80.29%   79.02%   -1.28%     
==========================================
  Files          61       61              
  Lines        7070     7971     +901     
==========================================
+ Hits         5677     6299     +622     
- Misses       1393     1672     +279     

@grburgess grburgess added models low level framework changes that modify internal structure labels Jun 3, 2021
Copy link
Contributor

@BjoernBiltzinger BjoernBiltzinger left a comment

Choose a reason for hiding this comment

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

Looks good in general. I only have three short comments.


self._energies = np.array(store["energies"])
processed_parameters += 1
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can delete this processed_parameters variable? I don't see where it is used.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

this_parameter_number = int(tokens[0])
this_parameter_name = str(tokens[1])

assert (
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe change to log.error and AssertionError?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

@@ -86,6 +92,8 @@ def test_template_factory():

tm(energies)

tm.clean()




Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add one more test to test the conversion from old table model to new one? Without that future changes in the table model may break this conversion without us noticing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

Copy link
Contributor

@BjoernBiltzinger BjoernBiltzinger left a comment

Choose a reason for hiding this comment

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

Very nice

@grburgess grburgess merged commit ca27fcc into master Jun 15, 2021
@grburgess grburgess deleted the feature-better-table branch September 9, 2021 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
low level framework changes that modify internal structure models
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants