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

feat: support variable create / update methods and text attribute #17

Merged
merged 12 commits into from Jun 5, 2020
Merged

Conversation

ludoo
Copy link
Contributor

@ludoo ludoo commented May 26, 2020

This PR adds support for variable create and update methods.

The create method has been implemented in the Variable class instead of Config (which would have given symmetry with get_variable) for a couple of reasons:

  • it allows a more natural workflow of calling config.variable(), setting the desired attribute, then saving
  • it updates the created variable in place via _set_properties like other variable methods

This also adds support for the text attribute, which can now be used in alternative to the previously supported value. The create and update methods enforce mutual exclusivity of the two attributes.

Fixes #1

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 26, 2020
@ludoo ludoo changed the title Add support for variable create and update methods, and text attribute feat: support variable create / update methods and text attribute May 26, 2020
Copy link

@software-dov software-dov 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, just one minor nit.

tests/unit/test_variable.py Show resolved Hide resolved
@ludoo ludoo requested a review from software-dov May 28, 2020 19:43
@busunkim96 busunkim96 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 2, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 2, 2020
@software-dov software-dov added kokoro:force-run Add this label to force Kokoro to re-run the tests. kokoro:run Add this label to force Kokoro to re-run the tests. labels Jun 2, 2020
@yoshi-kokoro yoshi-kokoro removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Jun 2, 2020
@ludoo
Copy link
Contributor Author

ludoo commented Jun 3, 2020

@software-dov sorry for the extra round, I did not consider the linting step in the presubmit, can you re-run kokoro?

As an aside, it might be worth documenting the steps one can use to replicate the presubmit in the CONTRIBUTING doc, to simplify contributions and waste less time for reviewers. I can do that after if you think it useful.

@software-dov software-dov added kokoro:force-run Add this label to force Kokoro to re-run the tests. kokoro:run Add this label to force Kokoro to re-run the tests. labels Jun 5, 2020
@yoshi-kokoro yoshi-kokoro removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Jun 5, 2020
@software-dov software-dov merged commit 84a50ad into googleapis:master Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RuntimeConfig: Unable to retrieve "text" value of the Variable
5 participants