-
Notifications
You must be signed in to change notification settings - Fork 203
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
add support for creating an index & using it when searching for easyconfigs #3210
Conversation
…everage this in search_file function
…ry, load_index return None if there is no index & dump_index return path to index file
…load_index check whether index is still valid based on age
… creating/loading index
@boegel is there an easy way to remove the index as well? |
You mean Or do you want a |
I was thinking about how this is going to be used in practice. |
@smoors Having an |
easybuild/tools/filetools.py
Outdated
# do not consider (certain) hidden directories | ||
# note: we still need to consider e.g., .local ! | ||
# replace list elements using [:], so os.walk doesn't process deleted directories | ||
# see http://stackoverflow.com/questions/13454164/os-walk-without-hidden-folders |
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.
nit: use https
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.
fixed
ed0129b
to
b5c5b38
Compare
b5c5b38
to
6bb2131
Compare
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.
lgtm
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.
lgtm
Going in, thanks @boegel! |
With
--create-index
you can create an index file that significantly speeds up searching for (easyconfig) files (& patches) on slow filesystems. You can control how long the index is valid via--index-max-age
(in seconds), where 1 week (604800 seconds) is the default, and0
indicates that the index remains valid indefinitely.If an index is available, it's used both for
--search
and--robot
.