Graceful operation without aimnet (conda-forge groundwork) - #177
Merged
Merged
Conversation
The no-aimnet CI job comment and conda_build.rst both asserted the conda-forge shape (no aimnet, plus torchani/ase) and the recipe update as already true. Neither is: conda-forge is still on 2.3.0 and conda-recipe/meta.yaml still matches 3.0.0 with aimnet in run deps. Rephrase both as forward-looking, and note that `pip uninstall -y aimnet` in the CI job leaves aimnet's transitive dependencies installed, so it cannot catch code relying on a package that only arrives via that dependency tree -- the real conda build remains the gate for that case.
auto3d run with the default engine -- the flagship conda-user path -- had no no-aimnet exit-code test, even though models test did. Add test_exit_3_run_without_aimnet alongside it. auto3d models info was claimed in the CHANGELOG to work without aimnet installed, but nothing exercised that. Add a test confirming it: the command's ENGINE_INFO lookup never imports aimnet, so it renders correctly even for the AIMNET engine with the package hidden.
Merged
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.
Summary
Makes Auto3D fully usable without the
aimnetpackage, so the conda-forge package (which cannot ship aimnet — its dependencynvalchemi-toolkit-opsis pip-only) can be updated past 2.3.0. Groundwork for #91; that issue closes when the feedstock update lands, not with this PR.require_aimnet()(engines/models/availability.py): everyimport aimnetsite now reports a missing aimnet asDependencyError(CLI exit 3, same convention as missing torchani) with an actionable hint, instead of a rawModuleNotFoundError. AModuleNotFoundErrornaming any other module re-raises unchanged.resolve_engine_name,preflight_model,AIMNet2Adapter.__init__."aimnet": "Install: pip install aimnet"; end-to-end exit-3 test mirrors the torchani one, with a discriminating assertion on the hint prefix.no-aimnetCI job emulating the future conda environment: install.[ani,ase,dev], uninstall aimnet, then bareimport Auto3D, whole-suite collection, the no-aimnet behavior tests, and an ANI2xt construction smoke test.installation.rst, andhowto/conda_build.rst(all hedged to stay true until the recipe/feedstock updates land); CHANGELOG entries under Unreleased.pyproject.tomlis unchanged —aimnet>=0.2stays a required pip dependency; pip UX is untouched.Test plan
pytest tests/fast suite: 1782 passed.tests/test_no_aimnet.py(10 tests) covers the helper, both preflight sites, the adapter, and the broken-transitive-dep re-raise case.no-aimnetCI job on this PR is the first genuine (not simulated) run of the aimnet-absent environment.