Closed timholy closed 5 months ago
Looks like a great change, I wasn't even aware of tryparse
. The redundant tests can be deleted.
Ready to go if if tests pass and you agree.
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 94.90%. Comparing base (
a70f6f4
) to head (501735e
). Report is 1 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Great, thanks for this.
By checking the length of the line before parsing it, we can avoid the overhead of
try/catch
for the optional fields.PDBTools writes data into the optional fields like "charge", so
gives a file that on
master
yieldsand on this branch yields
This is ~WIP~RFC because some of the tests reach into internals to check the error message for specific fields when supplied a too-short string. Thus a decision is needed about whether we're OK with the modified approach here; if so, perhaps those tests can just be deleted.