wfondrie / depthcharge

A deep learning toolkit for mass spectrometry
https://wfondrie.github.io/depthcharge/
Apache License 2.0
59 stars 18 forks source link

Fixed Lance directory path bug in SpectrumDataset #42

Closed Alfred-N closed 9 months ago

Alfred-N commented 9 months ago

.with_suffix(.lance) was being called on the str path instead of the pathlib object, causing a crash if the "path" arg is given to the __init__of SpectrumDataset

Secondly, the .suffix attribute includes the dot, hence the if statement should compare if if self._path.suffix != ".lance" instead of if self._path.suffix != "lance"

codecov[bot] commented 9 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (2079903) 92.48% compared to head (e7e08d8) 92.48%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #42 +/- ## ========================================== - Coverage 92.48% 92.48% -0.01% ========================================== Files 22 22 Lines 972 971 -1 ========================================== - Hits 899 898 -1 Misses 73 73 ```

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

wfondrie commented 9 months ago

Thanks @Alfred-N 👏

Linting is failing due to a change in the Ruff CLI args, not necessarily due to a linting problem in the PR. I'm going to patch this real quick and push to this PR.

wfondrie commented 9 months ago

Looks good now! Merging. 🎉