-
Notifications
You must be signed in to change notification settings - Fork 150
Refine find_nexus_module search locations and error handling #5767
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
base: develop
Are you sure you want to change the base?
Conversation
|
Test this please |
brockdyer03
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As best I can tell, while this code does unify the find_nexus_modules function, it doesn't do anything to stop enforcement of the location of the executables being with the rest of Nexus. Perhaps a separate bit of code that checks if you're in a QMCPACK install directory would fix it?
nexus/bin/nexus_modules.py
Outdated
| nexus_lib2 = os.path.realpath(os.path.join(nexus.__file__,'..','..')) | ||
|
|
||
| # ensure closely coupled nexus module is in use. | ||
| if nexus_lib != nexus_lib2: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the line that is probably going to continue failing if the executables get moved. The enforcement of location of the current file with the location of Nexus means that this will likely still result in a failure if the executables are moved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately that is a current requirement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should keep the strict association in this PR. We can remove it in a following PR once a decision is made.
|
The introduced Line 116 in 01c9846
|
149eedb to
5d9f62e
Compare
|
To be honest I forgot about I think since @jtkrogel said he was fine with most of the executables not actually enforcing association with the rest of Nexus (except for |
…y nexus exectuables.
5d9f62e to
0441e82
Compare
You analysis is correct
simply avoid files starting with underscore. taken care by #5768
I actually prefer all the nexus executable runnable without setting |
|
Need to catch up with the discussion here. From what I understand of our prior discussion, no decisions had been made about enforcing strict association between the binaries and nexus modules (though I favor retaining it). |
|
On a closer look, I really don't see the virtue of including a non-binary ( |
I think this could potentially introduce unwanted side effects. For example, |
prckent
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nexus/bin is for directly shell executable programs; putting a not directly callable function there is non-standard and will confuse users (etc.). Could it be made a verify_nexus_installation utility that can also be called directly? If this route works, we could expand it subsequently to include a reporting of the various nexus required and optional package imports.
4657b08 to
139fac4
Compare
|
@prckent |
139fac4 to
5eec27e
Compare
5eec27e to
646ad70
Compare
|
It is the job of |
nexus/bin/nexus_modules.py
Outdated
| nexus_lib2 = os.path.realpath(os.path.join(nexus.__file__,'..','..')) | ||
|
|
||
| # ensure closely coupled nexus module is in use. | ||
| if nexus_lib != nexus_lib2: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should keep the strict association in this PR. We can remove it in a following PR once a decision is made.
| from time import time # used to get user wall clock rather than cpu time | ||
| tstart_all = time() | ||
|
|
||
| testing_wrong_nexus_install = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this deleted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please reply. This should not be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The replaced find_nexus_module did the work already.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Due to the current requirement of nxs-test that exception should not be raise by itself. The gold implementation can not be used and kept by nxs-test. I reverted most of the changes in nxs-test.
nexus/bin/verify_nexus_installation
Outdated
| @@ -0,0 +1,38 @@ | |||
| #! /usr/bin/env python3 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be removed. See comment in the conversation/chat.
Currently nxs-test needs extra work to have a proper installation. Consider the added tool a stopgap utility. |
Proposed changes
Currently, nexus executables require a closely coupled nexus modules, namely
find_nexus_modulehonors this layout and verifiesnexusmodule import.nxs-test has the gold implementation and other scripts follow.
What type(s) of changes does this code introduce?
Does this introduce a breaking change?
What systems has this change been tested on?
laptop
Checklist