sisl icon indicating copy to clipboard operation
sisl copied to clipboard

fixed pbc usage across sisl, fixes #764

Open zerothi opened this issue 9 months ago • 4 comments

Now pbc usage has been moved across the code base (I hope everything is managed). I have added a setter for pbc to enable fast setting pbc. It will silently ignore any dimensions not specified. This may be used as a shorthand for lattice.set_boundary_condition(...)

@pfebrer could you please review this? I hope it fixes the issue!

  • [x] Closes #764
  • [x] Added tests for new/changed functions?
  • [x] Ran isort . and black . [24.2.0] at top-level
  • [x] Documentation for functionality in docs/
  • [x] Changes documented in CHANGELOG.md

zerothi avatar May 06 '24 13:05 zerothi

There are some failing tests, but I don't know if they are related to this PR.

Apart from that, could we set nsc=[1,1,1] in the tests that check the modified functions? E.g. here https://github.com/zerothi/sisl/blob/43f3c2904783af2c11932058496378113ad54bf7/src/sisl/_core/tests/test_geometry.py#L1812C1-L1816C44

pfebrer avatar May 06 '24 13:05 pfebrer

Thanks! This actually uncovered a bit more problematic issues, I'll ask for another review once completed. Thanks!

zerothi avatar May 06 '24 13:05 zerothi

Codecov Report

Attention: Patch coverage is 92.41379% with 11 lines in your changes are missing coverage. Please review.

Project coverage is 87.28%. Comparing base (43f3c29) to head (958a1ee).

Files Patch % Lines
src/sisl/_core/lattice.py 76.66% 7 Missing :warning:
src/sisl/_core/geometry.py 80.95% 4 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #767      +/-   ##
==========================================
+ Coverage   87.25%   87.28%   +0.03%     
==========================================
  Files         393      393              
  Lines       50177    50264      +87     
==========================================
+ Hits        43783    43875      +92     
+ Misses       6394     6389       -5     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 07 '24 11:05 codecov[bot]

Ok, it got complicated, but the pbc was never really copied over, and this might have inflected problems here and there. I think it should be done now.!

zerothi avatar May 07 '24 11:05 zerothi