-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Having Pixi available but not in use in the current project breaks Ambertools #101
Comments
I think the existing Pixi behaviour would also get the wrong environment if I was running a Pixi task outside of the default environment. |
Ugh, this tries to warn instead of error when something in that pipeline fails. Time to add another clause ... |
How should we handle each of these errors, do you think? |
I think maybe pixi should just be the last thing checked? It's behaviour is technically incorrect (for this use case) and it only works in an appropriate project. If any of the other tools are available, they should be run inside the environment and just work shouldn't they? Otherwise, falling back to another tool in each case would be fine. It might also be worth having a non-terminal behaviour if the version cannot be determined, but maybe that needs to go in the Toolkit. |
I recall intentionally trying Need to think about it more but given the range of possible outcomes in that block, I think wrapping the actual call to that function and returning diff --git a/openff/utilities/provenance.py b/openff/utilities/provenance.py
index a42995a..5c990d9 100644
--- a/openff/utilities/provenance.py
+++ b/openff/utilities/provenance.py
@@ -59,4 +59,7 @@ def get_ambertools_version() -> Optional[str]:
still returns `None`, but without a warning associated with the above failure.
"""
- return _get_conda_list_package_versions().get("ambertools", None)
+ try:
+ return _get_conda_list_package_versions().get("ambertools", None)
+ except Exception: # just capture everything lol
+ return None I think this is more or less your last suggestion above? |
Attempting to import the Toolkit when Ambertools is installed and the
pixi
binary is available, but not in use on the current project leads to an error:micromamba list
The text was updated successfully, but these errors were encountered: