-
Notifications
You must be signed in to change notification settings - Fork 5
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
fixed issue with wrong size of X,Y,Z ranges and added testing #19
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #19 +/- ##
==========================================
+ Coverage 86.67% 90.08% +3.41%
==========================================
Files 30 30
Lines 2492 2492
==========================================
+ Hits 2160 2245 +85
+ Misses 332 247 -85 ☔ View full report in Codecov by Sentry. |
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! Just a few changes then we are good to go 🚀
Project.toml
Outdated
@@ -13,6 +13,7 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" | |||
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" | |||
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" | |||
TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76" | |||
TestItemRunner = "f8b46487-2199-4994-9208-9a1283c18c0a" |
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.
no need to add dependency here, it is already in the test/Project.toml
test/volume/cube.jl
Outdated
@@ -0,0 +1,28 @@ | |||
@testitem "read/write cube" begin | |||
using LazyArtifacts | |||
const Bohr::Float64 = 0.52917721092 |
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.
you can use this line instead of defining a const here
using WannierIO: Bohr
test/volume/cube.jl
Outdated
@test cube.Z ≈ cube.X | ||
@test size(cube.W) == (20,20,20) | ||
@test size(cube.atom_positions) == (3,8) | ||
print(cube.atom_positions[:,1]) |
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.
the print line can be removed
test/Project.toml
Outdated
@@ -4,7 +4,6 @@ LazyArtifacts = "4af54fe1-eca0-43a8-85a7-787d91b784e3" | |||
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" | |||
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" | |||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | |||
TestItemRunner = "f8b46487-2199-4994-9208-9a1283c18c0a" |
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.
ah, should delete the TestItemRunner
in the Project.toml
in the root folder, this one in the test/Project.toml
should be kept.
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.
Yes, so sorry, missclick
As discussed I has changed X,Y,Z to range from 0 to n_voxels - 1 and added test case based on the file:
https://github.com/qiaojunfeng/WannierDatasets/blob/main/datasets/Si2_valence/reference/Si2_valence_00001.cube