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

Retrieve last logged val from result by key #3049

Merged
merged 6 commits into from
Aug 19, 2020
Merged

Conversation

justusschock
Copy link
Member

@justusschock justusschock commented Aug 19, 2020

What does this PR do?

If you log a key to the result object, the last logged step value can be retrieved by indexing with the name, even though it may have changed internally.

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together? Otherwise, we ask you to create a separate PR for every change.
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?
  • Did you verify new and existing tests pass locally with your changes?
  • If you made a notable change (that affects users), did you update the CHANGELOG?

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@pep8speaks
Copy link

pep8speaks commented Aug 19, 2020

Hello @justusschock! Thanks for updating this PR.

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-08-19 13:54:57 UTC

@mergify mergify bot requested a review from a team August 19, 2020 12:31
@codecov
Copy link

codecov bot commented Aug 19, 2020

Codecov Report

Merging #3049 into master will increase coverage by 0%.
The diff coverage is 100%.

@@          Coverage Diff           @@
##           master   #3049   +/-   ##
======================================
  Coverage      90%     90%           
======================================
  Files          81      81           
  Lines        7673    7678    +5     
======================================
+ Hits         6913    6918    +5     
  Misses        760     760           

@justusschock justusschock changed the title WIP: Retrieve last logged val from result by key Retrieve last logged val from result by key Aug 19, 2020
Copy link
Contributor

@awaelchli awaelchli left a comment

Choose a reason for hiding this comment

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

test fails on master, LGTM 👍

@@ -45,6 +45,12 @@ def __init__(
}
}

def __getitem__(self, key: Union[str, Any]) -> Any:
try:
return super().__getitem__(key)
Copy link
Contributor

Choose a reason for hiding this comment

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

self.get(key) does not work?

@mergify mergify bot requested a review from a team August 19, 2020 17:23
@mergify mergify bot requested a review from a team August 19, 2020 18:53
@williamFalcon williamFalcon merged commit 7358d45 into master Aug 19, 2020
@Borda Borda added the feature Is an improvement or enhancement label Aug 20, 2020
@Borda Borda deleted the result_logged_val branch August 20, 2020 21:44
@Borda Borda added this to the 0.9.0 milestone Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Is an improvement or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants