Skip to content

Automatically set AMBERHOME so Amber executables produce output files - #145

Merged
jkalayan merged 4 commits into
mainfrom
144-bug-failure-to-produce-output-files
Oct 1, 2026
Merged

jkalayan merged 4 commits into
mainfrom
144-bug-failure-to-produce-output-files

Conversation

@jkalayan

@jkalayan jkalayan commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

This PR updates the way AmberTools executables are configured and tested in both the main code and the tests. The main improvement is that the AMBERHOME environment variable is now set automatically based on the location of each Amber executable. This results in aiida_* executables and tests run locally to now return outputs/pass.

AmberTools environment configuration:

  • In aiida_amber/helpers.py, the get_code function now sets the AMBERHOME environment variable automatically.

Test fixtures improvements:

  • In conftest.py, all code fixtures for AmberTools executables (sander, tleap, antechamber, pdb4amber, parmed) now:
    • Use shutil.which to determine the absolute path to each executable.
    • Set the AMBERHOME environment variable dynamically for each fixture, mirroring the change in the main code.
  • Include in-process cli tests alongside sub-process tests to improve coverage.

Impact

  • These changes allow local AmberTools executables to be found, run to completion and return output files as expected.

@jkalayan jkalayan linked an issue Sep 30, 2026 that may be closed by this pull request
@coveralls

coveralls commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 36761563662

Coverage increased (+24.4%) to 81.405%

Details

  • Coverage increased (+24.4%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 5 coverage regressions across 1 file.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

5 previously-covered lines in 1 file lost coverage.

File Lines Losing Coverage Coverage
helpers.py 5 68.57%

Coverage Stats

Coverage Status
Relevant Lines: 1253
Covered Lines: 1020
Line Coverage: 81.4%
Coverage Strength: 4.88 hits per line

💛 - Coveralls

@harryswift01 harryswift01 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a good fix that will ensure that the aiida_* executables can locate their AMBERHOME data files and reliably produce output. Happy to see this merged in.

@harryswift01 harryswift01 changed the title 144 bug failure to produce output files Automatically set AMBERHOME so Amber executables produce output files Oct 1, 2026
@harryswift01 harryswift01 added the bug Something isn't working label Oct 1, 2026
@jkalayan
jkalayan merged commit 9add8fc into main Oct 1, 2026
16 checks passed
@harryswift01
harryswift01 deleted the 144-bug-failure-to-produce-output-files branch October 1, 2026 12:26
@jkalayan
jkalayan removed the request for review from jimboid October 1, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: failure to produce output files

3 participants