Skip to content

Commit

Permalink
Moved program_version collection outside of try block to correctly co…
Browse files Browse the repository at this point in the history
…llect program version even if a calculation fails.
  • Loading branch information
coltonbh committed Jul 17, 2024
1 parent f457fa8 commit e3b4529
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### Changed

- Only respect `collect_file` for for `Adapter.compute` if the adapter has `.uses_files=True`.
- - Moved the `program_version = self.program_version(stdout)` call from `BaseAdapter.compute(...)` to outside the `try` block so that program version is collected even if the calculation fails.
- Cleaned up `xtb` cached version implementation.

## [0.7.4] - 2024-07-16

Expand Down
2 changes: 1 addition & 1 deletion qcop/adapters/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ def compute(
# None value covers FileInput case
# TODO: Is there a type safe way to handle this??
output_dict["success"] = True
program_version = self.program_version(stdout)

# Optionally collect wavefunction file
if collect_wfn and not collect_files:
Expand All @@ -186,6 +185,7 @@ def compute(
output_dict["traceback"] = traceback.format_exc()

wall_time = time() - start
program_version = self.program_version(stdout)

# Construct Provenance object
provenance = construct_provenance(
Expand Down

0 comments on commit e3b4529

Please sign in to comment.