# Split data ID handling off from butlerTests.makeTestRepo

XMLWordPrintable

#### Details

• Type: Improvement
• Status: Done
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
• Story Points:
14
• Sprint:
AP F20-6 (November), AP S21-2 (January)
• Team:

#### Description

Currently, the lsst.daf.butler.tests package provides a makeTestRepo function, which creates a repository and registers dummy data IDs, and a addDatasetType function, which registers dummy datasets. The inconsistent handling is confusing, and makes data ID creation less flexible and more verbose than it needs to be. Move that functionality to an addDataId function, and possibly generalize it so that the user can specify which combinations of IDs are valid.

#### Activity

Hide
Krzysztof Findeisen added a comment -

See #dm-middleware for a feature request to be able to add data IDs to a collection.

Show
Krzysztof Findeisen added a comment - See #dm-middleware for a feature request to be able to add data IDs to a collection.
Hide
Krzysztof Findeisen added a comment -

Per discussion on #dm-middleware, bands can only be added during instrument registration. The new API needs to support user-specified bands.

Show
Krzysztof Findeisen added a comment - Per discussion on #dm-middleware , bands can only be added during instrument registration. The new API needs to support user-specified bands.
Hide
Meredith Rawls added a comment -

Left some comments on GitHub (again). I understand better what this does now, and you did a nice job splitting the functionality up and coming up with an example. The only piece that seems a little unsure to me is lacking some kind of check that the various values added with addDataIdValue are self-consistent. If that needs to be its own ticket or you think it's not a big deal since test repos can be full of nonsense, I'm open to either.

Show
Meredith Rawls added a comment - Left some comments on GitHub (again). I understand better what this does now, and you did a nice job splitting the functionality up and coming up with an example. The only piece that seems a little unsure to me is lacking some kind of check that the various values added with addDataIdValue are self-consistent. If that needs to be its own ticket or  you think it's not a big deal since test repos can be full of nonsense, I'm open to either.
Hide
Krzysztof Findeisen added a comment - - edited

That self-consistency is actually enforced by the Butler (part of the reason Middleware doesn't like this test module much), but I've added an explicit test case for it. Thanks for the careful review!

Show
Krzysztof Findeisen added a comment - - edited That self-consistency is actually enforced by the Butler (part of the reason Middleware doesn't like this test module much), but I've added an explicit test case for it. Thanks for the careful review!

#### People

Assignee:
Krzysztof Findeisen
Reporter:
Krzysztof Findeisen
Reviewers:
Meredith Rawls
Watchers:
Krzysztof Findeisen, Meredith Rawls