-
Notifications
You must be signed in to change notification settings - Fork 350
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
Improve dependency management and archive generation #702
Conversation
elyra/util/archive.py
Outdated
if not archive: | ||
raise RuntimeError('Internal error creating archive: {}'.format(archive_name)) | ||
if require_complete and not include_all: | ||
# convert filenames and matched_filenames to sets and ensure they're the same. |
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 not creating sets for both from the start instead of initiating them as arrays?
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.
Good question @karlaspuldaro.
Sets are immutable, so because matched_filenames
gets built up during the processing, it can't be a set
until we're done. filenames
, on the other hand, comes into the method as a list
, but I don't see it getting altered. If python sets
behave like lists
in terms of iterables, then, yeah, filenames
should be converted to a set
first thing.
The other thing converting a list
to a set
does is remove duplicates - which I can't think of any reason why we wouldn't also want that. Good idea. I'll look at converting filenames
to a set
when the method is invoked. Thank you.
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.
Awesome, I've pushed the update. It wound up simplifying indentation as well. Thank you for the suggestion!
I'm going to mark this conversation as resolved.
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.
Turns out I was mistaken - Python sets are mutable - only frozenset
is immutable. Thank you to @karlaspuldaro for digging deeper into things! I've just pushed a change that eliminates the need for conversion - thanks again Karla!
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
These changes improve how dependencies are handled, generally eliminating the need to include subdirectories when adding dependencies from subdirectories.
'*'
,'?'
, and'[a-z]'
/'[!a-z]'
(sequence) wildcards.inputs/ACS*
- to include all directories beginning with ACS in subdirectoryinputs
)Behavioral Changes
Fixes #204
Fixes #572
Developer's Certificate of Origin 1.1