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

DM-35153: Fix collection order in SimplePipelineExecutor #189

Merged
merged 1 commit into from Jun 14, 2022

Conversation

cmsaunders
Copy link
Contributor

@cmsaunders cmsaunders commented Jun 9, 2022

The output collection should be first in the list of collections, not last.

Checklist

  • ran Jenkins
  • added a release note for user-visible changes to doc/changes

@codecov
Copy link

codecov bot commented Jun 9, 2022

Codecov Report

Merging #189 (b0cd0bb) into main (e455e31) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #189   +/-   ##
=======================================
  Coverage   82.37%   82.37%           
=======================================
  Files          47       47           
  Lines        3755     3755           
  Branches      676      676           
=======================================
  Hits         3093     3093           
  Misses        483      483           
  Partials      179      179           
Impacted Files Coverage Δ
...ython/lsst/ctrl/mpexec/simple_pipeline_executor.py 90.74% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e455e31...b0cd0bb. Read the comment docs.

@@ -106,7 +106,7 @@ def prep_butler(
butler.registry.registerCollection(output_run, CollectionType.RUN)
butler.registry.registerCollection(output, CollectionType.CHAINED)
collections = list(inputs)
collections.append(output_run)
collections.insert(0, output_run)
Copy link
Contributor

Choose a reason for hiding this comment

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

Its slightly cart before the horse to create something and then later insert something at the beginning, possibly not something someone would notice at first. what would you think of changing both lines to

Suggested change
collections.insert(0, output_run)
collections = [output_run]
collections.extend(inputs)

Its up to you though, I will mark this as reviewed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is very reasonable. I was trying too much to minimize changes.

@cmsaunders cmsaunders marked this pull request as ready for review June 14, 2022 13:53
@cmsaunders cmsaunders merged commit 4509cef into main Jun 14, 2022
@cmsaunders cmsaunders deleted the tickets/DM-35153 branch June 14, 2022 13:54
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

2 participants