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-38234: Improve DuplicateOutputError log message #313

Merged
merged 1 commit into from Mar 4, 2023

Conversation

leeskelvin
Copy link
Contributor

@leeskelvin leeskelvin commented Mar 3, 2023

Checklist

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

@codecov
Copy link

codecov bot commented Mar 3, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.03 ⚠️

Comparison is base (45d22ff) 80.68% compared to head (f65404b) 80.65%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #313      +/-   ##
==========================================
- Coverage   80.68%   80.65%   -0.03%     
==========================================
  Files          57       57              
  Lines        6377     6379       +2     
  Branches     1303     1303              
==========================================
  Hits         5145     5145              
- Misses        984      985       +1     
- Partials      248      249       +1     
Impacted Files Coverage Δ
python/lsst/pipe/base/pipeTools.py 90.14% <100.00%> (+0.28%) ⬆️
python/lsst/pipe/base/graph/graph.py 82.27% <0.00%> (-0.51%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@kfindeisen kfindeisen left a comment

Choose a reason for hiding this comment

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

Looks good, just some clarity comments.

"DatasetType `{}' in task `{}' already appears as an output in task `{}'.".format(
dsTypeDescr.name,
taskDef.label,
dsTypeTaskLabels[dsTypeDescr.name],
Copy link
Member

Choose a reason for hiding this comment

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

I think an f-string might be more readable here; it's a bit disorienting that the string is laid out horizontally while the substitution arguments are laid out vertically.

)
dsTypeTaskLabels[dsTypeDescr.name] = taskDef.label
Copy link
Member

@kfindeisen kfindeisen Mar 4, 2023

Choose a reason for hiding this comment

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

The fact that the test is against allOutputs while the insertion is against dsTypeTaskLabels is a bit awkward, logically. Is it already guaranteed that a task can't have two connections with the same dataset name?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A single task cannot output the same dataset type twice. The important insertion is dsTypeDescr.name into outputs, which then gets subsumed into allOutputs to facilitate future checks. The insertion you've highlighted here is merely a book-keeping exercise that keeps a record of the prior tasks which output a given dataset type.

@leeskelvin leeskelvin merged commit fb39556 into main Mar 4, 2023
@leeskelvin leeskelvin deleted the tickets/DM-38234 branch March 4, 2023 14:09
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