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-29255 Modify applying config overrides for flexibility #173

Merged
merged 1 commit into from Mar 23, 2021

Conversation

natelust
Copy link
Contributor

These changes allow greater flexibility when doing config overrieds
in areas such as not needing string escaping when working with the
command line, and using values from python statements in other
parts of pipeline config blocks.

@natelust natelust force-pushed the tickets/DM-29255 branch 2 times, most recently from 90971f1 to 4a3d1bd Compare March 17, 2021 22:22
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, small bunch of minor comments/questions.

python/lsst/pipe/base/configOverrides.py Show resolved Hide resolved
@@ -125,35 +227,77 @@ def applyTo(self, config):
------
`Exception` is raised if operations on configuration object fail.
"""
# Look up a stack of variables people may be useing when setting
Copy link
Contributor

Choose a reason for hiding this comment

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

typo: useing

python/lsst/pipe/base/configOverrides.py Show resolved Hide resolved
python/lsst/pipe/base/configOverrides.py Outdated Show resolved Hide resolved
python/lsst/pipe/base/configOverrides.py Show resolved Hide resolved
python/lsst/pipe/base/configOverrides.py Outdated Show resolved Hide resolved
# The field might be a string corresponding to a attribute
# hierarchy, attempt to split off the last field which
# will then be set.
parent, *child = field.rsplit(".", maxsplit=1)
Copy link
Contributor

Choose a reason for hiding this comment

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

rpartition may be slightly more readable, but that is a personal preference

python/lsst/pipe/base/configOverrides.py Show resolved Hide resolved
python/lsst/pipe/base/configOverrides.py Show resolved Hide resolved
tests/test_configOverrides.py Outdated Show resolved Hide resolved
@natelust natelust force-pushed the tickets/DM-29255 branch 5 times, most recently from 31b495a to 3843557 Compare March 22, 2021 15:19
These changes allow greater flexibility when doing config overrieds
in areas such as not needing string escaping when working with the
command line, and using values from python statements in other
parts of pipeline config blocks.
@natelust natelust merged commit 9496650 into master Mar 23, 2021
@natelust natelust deleted the tickets/DM-29255 branch March 23, 2021 19:57
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