Skip to content
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

enhance --search: only consider actual filename (not entire path), use regex syntax #1281

Merged
merged 2 commits into from May 13, 2015

Conversation

boegel
Copy link
Member

@boegel boegel commented May 11, 2015

This change is motivated by the output of --search that was produced by eb --search python, which in practice resulted in all easyconfigs to be listed (since it's not unlikely that 'python' is part of the full path).

With this change, this works as expected:

eb -S '^Python-[23].*eb' 

for (dirpath, dirnames, filenames) in os.walk(path, topdown=True):
for filename in filenames:
filename = os.path.join(dirpath, filename)
if filename.lower().find(query) != -1:
if query.search(filename.lower()):
Copy link
Member

Choose a reason for hiding this comment

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

add re.IGNORECASE to the regex?

Copy link
Member Author

Choose a reason for hiding this comment

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

good point, totally forgot about this option 👍

@hpcugentbot
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/1699/
Test PASSed.

@hpcugentbot
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/1701/
Test PASSed.

@boegel
Copy link
Member Author

boegel commented May 13, 2015

Going in, thanks for the review @wpoely86!

boegel added a commit that referenced this pull request May 13, 2015
enhance --search: only consider actual filename (not entire path), use regex syntax
@boegel boegel merged commit 6b0a597 into easybuilders:develop May 13, 2015
@boegel
Copy link
Member Author

boegel commented May 13, 2015

@martbhell: this resolves the problem you ran into during the EasyBuild hackathon @ CSC.fi

@boegel boegel deleted the search_basename branch May 13, 2015 08:23
boegel added a commit to boegel/easybuild-framework that referenced this pull request May 13, 2015
enhance --search: only consider actual filename (not entire path), use regex syntax
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants