Skip to content

Improve error reporting for input readers#28

Merged
awvwgk merged 1 commit into
grimme-lab:mainfrom
awvwgk:error-reports
Jan 21, 2022
Merged

Improve error reporting for input readers#28
awvwgk merged 1 commit into
grimme-lab:mainfrom
awvwgk:error-reports

Conversation

@awvwgk
Copy link
Copy Markdown
Member

@awvwgk awvwgk commented Jan 21, 2022

Much improved error messages for users to make input errors easier to spot

Error: Cannot read charges
  --> struc.mol:29:23-25
   |
29 | M  CHG  3   1   1   3   b   2  -1
   |                       ^^^ expected integer value
   |
Error: Cannot read eht entry
  --> struc.coord:18:13-15
   |
18 | $eht charge=one unpaired=0
   |             ^^^ expected integer value
   |
Error: Impossible number of atoms provided
 --> struc.xyz:1:1-2
  |
1 | -3
  | ^^ expected positive integer value
  |

@awvwgk awvwgk changed the title Improve error reporting for readers Improve error reporting for input readers Jan 21, 2022
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 21, 2022

Codecov Report

Merging #28 (4b20258) into main (9c17afb) will increase coverage by 3.04%.
The diff coverage is 83.77%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #28      +/-   ##
==========================================
+ Coverage   64.43%   67.48%   +3.04%     
==========================================
  Files          56       56              
  Lines        5281     6018     +737     
  Branches     1743     1866     +123     
==========================================
+ Hits         3403     4061     +658     
+ Misses        678      670       -8     
- Partials     1200     1287      +87     
Impacted Files Coverage Δ
src/mctc/io/utils.f90 55.47% <35.71%> (-4.71%) ⬇️
src/mctc/io/read/xyz.f90 64.91% <57.14%> (ø)
src/mctc/io/read/turbomole.f90 76.71% <68.57%> (-1.71%) ⬇️
src/mctc/io/read/ctfile.f90 73.50% <71.66%> (+9.50%) ⬆️
src/mctc/io/read/gaussian.f90 68.85% <71.79%> (+35.51%) ⬆️
src/mctc/io/read/aims.f90 58.90% <77.77%> (+0.57%) ⬆️
src/mctc/io/read/pdb.f90 78.94% <85.71%> (+21.50%) ⬆️
test/test_read_gaussian.f90 81.81% <87.50%> (+15.15%) ⬆️
test/test_read_turbomole.f90 81.28% <89.50%> (+3.70%) ⬆️
test/test_read_ctfile.f90 86.43% <95.12%> (+1.64%) ⬆️
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9c17afb...4b20258. Read the comment docs.

@awvwgk awvwgk force-pushed the error-reports branch 2 times, most recently from 6866f28 to aa6f38c Compare January 21, 2022 18:34
@awvwgk awvwgk merged commit 7ae8fc4 into grimme-lab:main Jan 21, 2022
@awvwgk awvwgk deleted the error-reports branch January 21, 2022 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant