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-28646 Introduce factory for creating lightweight butlers #179

Merged
merged 1 commit into from Apr 21, 2021

Conversation

natelust
Copy link
Contributor

Introduce a factory class that is initialized with a butler that
can be used to convert QuantumGraphs into lightweight sqlite
backed butlers containing only the info from the graph.

Copy link
Contributor

@andy-slac andy-slac 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, few minor comments.

python/lsst/pipe/base/__init__.py Outdated Show resolved Hide resolved
python/lsst/pipe/base/makeLightWeightButler.py Outdated Show resolved Hide resolved
python/lsst/pipe/base/makeLightWeightButler.py Outdated Show resolved Hide resolved
python/lsst/pipe/base/makeLightWeightButler.py Outdated Show resolved Hide resolved
python/lsst/pipe/base/makeLightWeightButler.py Outdated Show resolved Hide resolved
python/lsst/pipe/base/makeLightWeightButler.py Outdated Show resolved Hide resolved
python/lsst/pipe/base/makeLightWeightButler.py Outdated Show resolved Hide resolved
python/lsst/pipe/base/makeLightWeightButler.py Outdated Show resolved Hide resolved
python/lsst/pipe/base/makeLightWeightButler.py Outdated Show resolved Hide resolved
exporter.saveDatasets(exports)

# Look for any defined collection, if not get the defaults
if (collections := collections) is None:
Copy link
Contributor

Choose a reason for hiding this comment

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

collections := collections? Could just check for None?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, that was some version archeology

butlerModifier: Optional[Callable[[Butler], Butler]] = None,
collections: Optional[Iterable[str]] = None
) -> None:
r"""buildLightweightButler is an object that is responsible for exporting
Copy link
Contributor

Choose a reason for hiding this comment

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

an object -> a method?

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 function even

Copy link
Contributor

@andy-slac andy-slac left a comment

Choose a reason for hiding this comment

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

Re-reviewing, looks good, couple of minor comments.

Introduce a factory class that is initialized with a butler that
can be used to convert QuantumGraphs into lightweight sqlite
backed butlers containing only the info from the graph.
@natelust natelust merged commit 546cdbd into master Apr 21, 2021
@natelust natelust deleted the tickets/DM-28646 branch April 21, 2021 22:19
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