-
Notifications
You must be signed in to change notification settings - Fork 52
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
Z2pack with elk #112
base: main
Are you sure you want to change the base?
Z2pack with elk #112
Conversation
Codecov Report
@@ Coverage Diff @@
## dev/current #112 +/- ##
===============================================
- Coverage 93.36% 91.96% -1.40%
===============================================
Files 37 37
Lines 1492 1519 +27
===============================================
+ Hits 1393 1397 +4
- Misses 99 122 +23
Continue to review full report at Codecov.
|
Hi @euclidmenot2, First off, thanks for taking the time to contribute! It seems there are some problems with the pre-commit hooks. Instead of running them through continuous integration for every change, it is much quicker to run them locally. You can follow the following steps (some of which you may have already done):
The last command should automatically format the code, and run the other style checkers. Once you're done:
Let me know if that works for you, or you're stuck somewhere. Unfortunately we don't have a comprehensive contributing guide that would cover these things. |
Hi Dr. Gresch,
Thank you! I'm very new to github (mostly an experimentalist who only
recently ventured into computation). I'm now getting though the pre-commit
and tests sections successfully. I now seem to be having issues with
Codecov regarding test coverage.
[image: image.png]
[image: image.png]
I think that this means that I need to write some new tests for the Elk
portion. When I try to upload my Bi2Se3 Elk output files, some of the files
are larger than 25 MB, the Github limit. I am going to start running some
test calculations for Bi, hoping that the output files will be smaller but,
as it currently stands, this may be a limiting factor. Would you have some
guidance?
Thanks,
Lisa Pogue
Postdoc
McQueen Laboratory
Johns Hopkins University
…On Thu, Mar 25, 2021 at 1:23 PM Dominik Gresch ***@***.***> wrote:
Hi @euclidmenot2 <https://github.com/euclidmenot2>,
First off, thanks for taking the time to contribute!
It seems there are some problems with the pre-commit hooks. Instead of
running them through continuous integration for every change, it is much
quicker to run them locally. You can follow the following steps (some of
which you may have already done):
- clone the repository: ***@***.***:euclidmenot2/Z2Pack.git
- go into the Z2Pack directory: cd Z2Pack
- check out the correct branch: git checkout z2packWithElk
- create a virtual environment in which to install Z2Pack
(instructions differ depending on which method you prefer, e.g. conda or
virtualenv)
- Install Z2Pack with development dependencies pip install -e .[dev]
- Activate the pre-commit hooks: pre-commit install
- Run the hooks: pre-commit run --all-files
The last command should automatically format the code, and run the other
style checkers.
Once you're done:
- Add the code: git add --all
- Check which files were added with git status
- Commit the code, and push: git commit; git push
Let me know if that works for you, or you're stuck somewhere.
Unfortunately we don't have a comprehensive contributing guide that would
cover these things.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#112 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AO6BZQ2UYQ2CHFC6TYFY74TTFNWSRANCNFSM4ZZV3U7A>
.
|
Great! Yes, the Indeed, the Elk output files probably shouldn't be committed to the repository. Still, there are some ways in which we can add tests - following what is done for the other first-principles codes. There are two kinds of test:
The tests can be executed by running Hope this gets you a step further, happy to help out if you're running into problems. |
To elaborate more, with my *.zip work-around, when I update test_fp_kpoint.py. and then re-upload it with an elk valid_lines (the VASP valid lines with a few name changes), it doesn't seem as though the reference data is being created (I am getting "Reference data does not exist value errors). I think that this is happening since I am using Continuous Integration and might be avoided if I could get Git to work nicely with Windows. Would you have any advice? I'm now trying to track down a Linux machine that is not our cluster. Thanks again, |
Hi Lisa, I think the reason you're getting the "Reference data does not exist" errors is that this "reference data" should be added to the When you run the tests locally, these files are generated the first time you run them. Note that not the entire The reason why these files need to be added is that we make use of the "caching" feature in pytest to store reference data. The It seems the error you're getting in the git GUI is also somehow related to the Finally, if you need access to a Linux system on your Windows machine, you could try the "Windows Subsystem for Linux": https://docs.microsoft.com/en-us/windows/wsl/ Dominik |
The kpoints.py file was modified to add an interface to Elk, an all-electron DFT code (http://elk.sourceforge.net/). Example Elk and Z2Pack input files for Bi2Se3 were also added.