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
update easybuild from command line #1861
Conversation
@@ -272,6 +272,10 @@ def main(args=None, logfile=None, do_build=None, testing=False, modtool=None): | |||
search_easyconfigs(search_query, short=options.search_short, filename_only=options.search_filename, | |||
terse=options.terse) | |||
|
|||
if options.update: | |||
eb_file = find_easybuild_eb() | |||
orig_paths.append(eb_file) |
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.
I would try and make sure that only EasyBuild is installed, and throw an error if other easyconfigs are installed at the same time?
@@ -1088,3 +1087,26 @@ def validate_github_token(token, github_user): | |||
_log.info("GitHub token can be used for authenticated GitHub access, validation passed") | |||
|
|||
return sanity_check and token_test | |||
|
|||
|
|||
def find_easybuild_eb(): |
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.
@Caylo please add a unit test for this (just check whether it returns a path an existing easyconfig for EasyBuild)
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.
also, rename to find_easybuild_easyconfig
?
@Caylo needs a sync with |
for eb_file in files: | ||
txt = read_file(os.path.join(eb_parent_path, eb_file)) | ||
for line in txt.split('\n'): | ||
if re.search(r'^version =', line): |
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.
use \s*
rather than hardcoding the space before the =
version = scope['version'] | ||
file_versions.append((LooseVersion(version), eb_file)) | ||
|
||
fn = sorted(file_versions)[-1][1] |
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.
@Caylo let's throw a proper error here if file_versions
is empty...
going in, thanks @Caylo! |
use:
eb --install-latest-eb-release