-
Notifications
You must be signed in to change notification settings - Fork 129
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
Nuke: improving readability #2903
Conversation
I agree with @iLLiCiTiT this comment is likely the best format. Which makes it something like this: # please consider example as pseudocode - untested
...
# process only allowed families
if f_families:
if set(families).intersection(f_families):
continue
# process only allowed task types
if f_task_types:
if task_type in f_task_types:
continue
# process only subsets matching patterns
if f_subsets:
if any(re.search(pattern, subset)
for pattern in f_subsets)):
continue I believe above logic says that if it matches any of the filters then they are continued and excluded which might be the opposite of what you'd need? :D This also means the lines below it where you check all can be removed: # we need all filters to be positive for this
# preset to be activated
test_all = all([
test_families,
test_task_types,
test_subsets
])
# if it is not positive then skip this preset
if not test_all:
continue |
Brilliant! Thank you @BigRoy . Code looks and reads much better this way ;) |
- adding family to testing families - adding debug logging for filtering
Co-authored-by: Roy Nieterau <[email protected]>
Brief description
Code was too complex to read
Testing notes:
project_settings/nuke/publish/ExtractReviewDataMov/outputs
to have multiple presets with use of filters