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

Create alias for certain operations #28

Merged
merged 1 commit into from
Apr 22, 2024
Merged

Conversation

jordipiqueselles
Copy link
Collaborator

This commit improves the name of certain operations. This change has an effect on v1beta1. However, to be able to consume configs written with v1alpha1, we're keeping the old names. The operations that now have a new alias are:

  • "and" -> "all"
  • "or" -> "any"
  • "forEach" -> "map"

Apart from that, we're changing the behavior of "or" (and "any) when they have no operands. Before, the result was true, but now it's false. This makes this operation consistent with any([]) in Python. The intention is to make its output more intuitive for Python users.

@jordipiqueselles jordipiqueselles added the enhancement New feature or request label Apr 22, 2024
This commit improves the name of certain operations. This change has
effect on v1beta1. However, to be able to consume configs written with
v1alph1, we're keeping the old names. The operations that now have a new
alias are:

- "and" -> "all"
- "or" -> "any"
- "forEach" -> "map"

Appart from that, we're changing the behaviour of "or" (and "any) when
they have no operands. Before, the result was true, but now it's false.
This makes this operation consistent with `any([])` in Python. The
intention is to make it's output more intuitive for Python users.
@jordipiqueselles jordipiqueselles added enhancement New feature or request and removed enhancement New feature or request labels Apr 22, 2024
@jordipiqueselles jordipiqueselles merged commit bee57f0 into main Apr 22, 2024
2 checks passed
@jordipiqueselles jordipiqueselles deleted the jordi/op-alias branch April 22, 2024 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant