materialsproject / emmet

Be a master builder of databases of material properties. Avoid the Kragle.
https://materialsproject.github.io/emmet/
Other
52 stars 64 forks source link

Fix `TaskDoc.from_directory` when `dir_name != "."` #873

Closed esoteric-ephemera closed 9 months ago

esoteric-ephemera commented 10 months ago

Minor bug with TaskDoc construction when TaskDoc.from_directory is called on a directory other than "." (dir_name arg).

In emmet.core.tasks._find_vasp_files, output files with the leading path are returned. When these files are fed to emmet.core.vasp.Calculation.from_vasp_files(...) (for example), dir_name will appear twice.

Ex: _find_vasp_files returns /OUTCAR, which Calculation.from_vasp_files turns into //OUTCAR

codecov-commenter commented 9 months ago

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (ebbe8d5) 91.36% compared to head (caead33) 91.36%. Report is 3 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #873 +/- ## ======================================= Coverage 91.36% 91.36% ======================================= Files 138 138 Lines 12748 12749 +1 ======================================= + Hits 11647 11648 +1 Misses 1101 1101 ``` | [Files](https://app.codecov.io/gh/materialsproject/emmet/pull/873?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=materialsproject) | Coverage Δ | | |---|---|---| | [emmet-core/emmet/core/tasks.py](https://app.codecov.io/gh/materialsproject/emmet/pull/873?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=materialsproject#diff-ZW1tZXQtY29yZS9lbW1ldC9jb3JlL3Rhc2tzLnB5) | `87.27% <83.33%> (+0.03%)` | :arrow_up: |

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