-
Notifications
You must be signed in to change notification settings - Fork 27
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
Add parser for tb.dat #115
base: trunk
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @qiaojunfeng!
I haven't gotten around to properly reviewing this yet, so just one comment on the example.
Also, would you mind adding a unit test for this? Maybe it could produce the same result as one of the other parsing methods, so we can directly compare them?
examples/silicon/read_tb.py
Outdated
|
||
if __name__ == "__main__": | ||
WANNIER90_COMMAND = os.path.expanduser("~/git/wannier90/wannier90.x") | ||
BUILD_DIR = "./build" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, I think we should either actually run the wannier90
executable, or provide the tb.dat
file as an example.
Codecov Report
@@ Coverage Diff @@
## trunk #115 +/- ##
==========================================
- Coverage 96.35% 96.14% -0.21%
==========================================
Files 10 10
Lines 1069 1142 +73
==========================================
+ Hits 1030 1098 +68
- Misses 39 44 +5
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Sorry for the late reply, finally have some time to add a pytest. Unfortunately, I cannot generate a
So in the end I added new regression data for the tb.dat pytest, instead of comparing it with the existing regression data for hr dat. Also, it seems the pre-commit has some version incompatibilities between black and click, and pylint. Not sure what are the versions you were using? |
If we generate a The pre-commit issue is due to psf/black#2964; the easiest change is changing the click requirement to |
Yes this is the best solution!
That would be great! So, to proceed, maybe you could first update the pre-commit and poetry stuff, then I will make sure this PR doesn't break any of these checks. For the tb.dat file, either you regenerate the test data (tb.dat, and the hdf5 test files...), or I can regenerate and replace the old files, which one do you prefer? |
This is done, but produces a merge conflict because I switched to a
If you could regenerate them with the latest Wannier90 would be great, thanks! |
Some other people seem interested in this, so let's push this to upstream repo :-)
fix #33