Fixes #90. Add auto_logging configuration parameter.#622
Merged
mwcraig merged 6 commits intoastropy:masterfrom May 15, 2018
Merged
Fixes #90. Add auto_logging configuration parameter.#622mwcraig merged 6 commits intoastropy:masterfrom
mwcraig merged 6 commits intoastropy:masterfrom
Conversation
added 4 commits
May 3, 2018 16:00
If auto_logging is set to False and no add_keyword is specified, ccdproc will not automatically create and add a keyword to the metadata
mwcraig
reviewed
May 14, 2018
Member
mwcraig
left a comment
There was a problem hiding this comment.
Thanks for doing this, @lucarizzi! There are a couple of really minor changes to make then I think it is good to go.
If you would prefer I make the changes, just let me know.
ccdproc/log_meta.py
Outdated
| log_val = log_val.replace("\n", "") | ||
| meta_dict = {key: log_val} | ||
| # so construct one unless the config parameter auto_logging is set to False | ||
| if ccdproc.conf.auto_logging is True: |
Member
There was a problem hiding this comment.
Would you mind changing this to: if ccdproc.conf.auto_logging: (no need for the is True)?
CHANGES.rst
Outdated
|
|
||
| - Improved the performance of several ``ImageFileCollection`` methods. [#599] | ||
|
|
||
| - Added auto_logging configuration paramenter [#90] |
Member
There was a problem hiding this comment.
Could you please also add the PR number (so that it is [#622, #90])?
Author
|
All done! I hope….
If anything remains to be done, feel free to make the changes.
Luca
… On May 14, 2018, at 2:52 PM, Matt Craig ***@***.***> wrote:
@mwcraig commented on this pull request.
Thanks for doing this, @lucarizzi <https://github.com/lucarizzi>! There are a couple of really minor changes to make then I think it is good to go.
If you would prefer I make the changes, just let me know.
In ccdproc/log_meta.py <#622 (comment)>:
> @@ -98,15 +98,18 @@ def wrapper(*args, **kwd):
meta_dict = _metadata_to_dict(log_result)
else:
# Logging is not turned off, but user did not provide a value
- # so construct one.
- key = func.__name__
- all_args = chain(zip(original_positional_args, args), kwd.items())
- all_args = ["{0}={1}".format(name,
- _replace_array_with_placeholder(val))
- for name, val in all_args]
- log_val = ", ".join(all_args)
- log_val = log_val.replace("\n", "")
- meta_dict = {key: log_val}
+ # so construct one unless the config parameter auto_logging is set to False
+ if ccdproc.conf.auto_logging is True:
Would you mind changing this to: if ccdproc.conf.auto_logging: (no need for the is True)?
In CHANGES.rst <#622 (comment)>:
> @@ -15,6 +15,8 @@ Other Changes and Additions
- Improved the performance of several ``ImageFileCollection`` methods. [#599]
+- Added auto_logging configuration paramenter [#90]
Could you please also add the PR number (so that it is [#622, #90])?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#622 (review)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAgCnTCMbo9WPu96QNtaKMLPKduzkO2Mks5tyfyUgaJpZM4Txt11>.
|
Member
|
Thanks @lucarizzi, merging! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If auto_logging is set to False and no add_keyword is specified,
ccdproc will not automatically create and add a keyword to the
metadata
Please have a look at the following list and replace the "[ ]" with a "[x]" if
the answer to this question is yes.
For documentation changes:
Note that it should not if you changed any examples!
For bugfixes:
For new functionality:
Please note that the last point is not a requirement. It is meant as a check if
the pull request potentially breaks backwards-compatibility.