Repository navigation
Expand gaussian coverage and fix handler crashes, Windows renames and directory handling - #474
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #474 +/- ##
==========================================
+ Coverage 92.98% 95.28% +2.29%
==========================================
Files 39 39
Lines 3720 3730 +10
==========================================
+ Hits 3459 3554 +95
+ Misses 261 176 -85 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
Author
|
Automated PR review generated by Claude (posted from @shyuep's account). Based on code and CI status only, nothing was run. Please sanity-check before acting. CI: lint and both Ubuntu jobs pass; Good:
Substantive:
Nits:
|
Coverage (src/custodian/gaussian):
- handlers.py: 79% -> 100%
- jobs.py: 77% -> 100%
Add pytest-style tests asserting the actual route/link0/input-parameter
corrections, the unfixable branches of every error type, _add_int grid
handling, memory parsing, WallTimeErrorHandler restart input, and
GaussianJob run/terminate (mocked Popen) and the second better-guess job.
Three strict xfails document handler bugs: unfixable branches return
{"errors": [self.errors]} (a set inside a list, not JSON serializable),
and correct() raises TypeError for "coords"/"missing_mol" errors when the
geom/guess route keyword is absent.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
shyuep
force-pushed
the
test/gaussian-coverage
branch
from
October 20, 2026 22:17
1a9f417 to
413494a
Compare
- Return list(self.errors) in unfixable branches; [self.errors] wrapped a set, which broke JSON serialization of the run log. - Guard `in` checks on absent geom/guess route keywords (TypeError). - Use os.replace for .prev swaps; os.rename fails on Windows when the target exists. - internal_coords: only add symmetry=none if nosymmetry/symmetry=none is not already set (the old condition was always true). - Honor `directory`: GaussianJob.run sets cwd, the convergence plot and *.chk lookups (handler and generate_better_guess) use the run dir, and the walltime restart refers to the rwf file relative to it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Expands coverage of the Gaussian handlers and job, and fixes the bugs the new tests exposed.
subprocessis mocked.gaussian/handlers.pygaussian/jobs.pyTests assert the applied corrections (route/link0 changes,
%Memscaling,geom=(checkpoint,newdefinition), z-matrix switch,intgrid keywords for G09/G16), every unfixable branch,WallTimeErrorHandlerrestart contents, andgenerate_better_guess.Fixes (each has a regression test that fails on
master, except the Windows one, which the Windows CI jobs cover):{"errors": [self.errors]}, a set inside a list, so writing the run log raisedTypeError. They now returnlist(self.errors).geom/guesskeywords:"connectivity" in route_parameters.get("geom")and"read" in route_parameters.get("guess")raisedTypeErrorwhen the keyword was absent.os.renameonto an existing.prev/ input file fails on Windows (FileExistsError); nowos.replace.not nosymmetry or symmetry != "none"was always true, partly becausenosymmetryis a bare keyword whose value isNone.symmetry=noneis now added only if symmetry is not already off.directoryignored:GaussianJob.runnow passescwd=directorytoPopen.directory.*.chklookups inmissing_molandgenerate_better_guesssearchdirectory.Behaviour change:
GaussianJob.runnow launches Gaussian indirectoryinstead of the cwd. This is identical for the defaultdirectory="./".🤖 Generated with Claude Code