MolSSI / QCEngine

Quantum chemistry program executor and IO standardizer (QCSchema).
https://molssi.github.io/QCEngine/
BSD 3-Clause "New" or "Revised" License
162 stars 78 forks source link

Fix psi4 windows version detection #426

Closed loriab closed 11 months ago

loriab commented 11 months ago

Description

psi4 on windows was computing lovely stuff like the below, so clearly the .split()[-1] that I removed in #418 was needed. The new check that stdout isn't empty should avert trouble with the split. And stdout is a string in util.popen(), so the strip() should be safe.

+#2023-08-17T20:15:44.6106581Z [1m[31mE   pkg_resources.extern.packaging.version.InvalidVersion: Invalid version: '-D-a-psi4-psi4-objdir-C-Miniconda3-envs-baseenv-python.exe.D-a-psi4-psi4-objdir-stage-bin-psi4.-version.-1.9a1.dev42'[0m
+#2023-08-17T20:15:44.6107842Z ------------------------------- Captured stdout -------------------------------
+#2023-08-17T20:15:44.6108602Z found (no psithon) exc["proc"].returncode=0 so='D:\\a\\psi4\\psi4\\objdir\\stage\\bin\\psi4\r\n' se=''
+#2023-08-17T20:15:44.6109594Z get_version exc["proc"].returncode=0 exc["stdout"]='\r\nD:\\a\\psi4\\psi4\\objdir>C:/Miniconda3/envs/baseenv/python.exe D:\\a\\psi4\\psi4\\objdir\\stage\\bin\\psi4 --version \r\n1.9a1.dev42\r\n' exc["stderr"]=''

Changelog description

Status

codecov[bot] commented 11 months ago

Codecov Report

Merging #426 (e62e02b) into master (1a36ef7) will decrease coverage by 6.98%. The diff coverage is 30.00%.

:exclamation: Current head e62e02b differs from pull request most recent head ff077db. Consider uploading reports for the commit ff077db to get more accurate results

Additional details and impacted files