Fix operator checks to follow other check_type logic.#85
Merged
Conversation
pszulczewski
commented
Sep 22, 2022
| params_value = params.get("params", {}).get("operator_data") | ||
|
|
||
| if not params_key or not params_value: | ||
| if not params_key or params_value is None: |
Collaborator
Author
There was a problem hiding this comment.
This was making all-same check to fail here when False was passed as value.
lvrfrc87
reviewed
Sep 22, 2022
Collaborator
lvrfrc87
left a comment
There was a problem hiding this comment.
I believe we need to review this along with @chadell. This approach is the negative of what implemented today. I understand that the idea behind that is to unify the way the test return the bool result but I believe it would be confusing adopt this strategy.
lvrfrc87
previously approved these changes
Sep 22, 2022
Collaborator
lvrfrc87
left a comment
There was a problem hiding this comment.
As discussed, this is now good to go! Thanks for helping me to see this from a different point of view @pszulczewski !
Collaborator
|
@pszulczewski would you mind to update the CHANGELOG and relevant bits in poetry? |
lvrfrc87
added a commit
that referenced
this pull request
Sep 23, 2022
* Update readme to start with use cases (#84) * Update readme to start with use cases * Apply suggestions from code review Co-authored-by: Patryk Szulczewski <patryk@szulczewski.eu> Co-authored-by: Stephen Corry <stephen.corry@networktocode.com> * Update README.md Co-authored-by: Patryk Szulczewski <patryk@szulczewski.eu> Co-authored-by: Stephen Corry <stephen.corry@networktocode.com> * Doc update (#87) * Fix operator checks to follow other check_type logic. (#85) * Fix operator checks to follow other check_type logic. * Add new release 0.0.2 Co-authored-by: Patryk Szulczewski <patryk.szulczewski@networktocode.com> Co-authored-by: Christian Adell <christian.adell@networktocode.com> Co-authored-by: Ken Celenza <ken@celenza.org> Co-authored-by: Patryk Szulczewski <patryk@szulczewski.eu> Co-authored-by: Stephen Corry <stephen.corry@networktocode.com> Co-authored-by: Patryk Szulczewski <patryk.szulczewski@networktocode.com>
lvrfrc87
added a commit
that referenced
this pull request
Sep 27, 2022
* Release 0.0.2 (#88) * Update readme to start with use cases (#84) * Update readme to start with use cases * Apply suggestions from code review Co-authored-by: Patryk Szulczewski <patryk@szulczewski.eu> Co-authored-by: Stephen Corry <stephen.corry@networktocode.com> * Update README.md Co-authored-by: Patryk Szulczewski <patryk@szulczewski.eu> Co-authored-by: Stephen Corry <stephen.corry@networktocode.com> * Doc update (#87) * Fix operator checks to follow other check_type logic. (#85) * Fix operator checks to follow other check_type logic. * Add new release 0.0.2 Co-authored-by: Patryk Szulczewski <patryk.szulczewski@networktocode.com> Co-authored-by: Christian Adell <christian.adell@networktocode.com> Co-authored-by: Ken Celenza <ken@celenza.org> Co-authored-by: Patryk Szulczewski <patryk@szulczewski.eu> Co-authored-by: Stephen Corry <stephen.corry@networktocode.com> Co-authored-by: Patryk Szulczewski <patryk.szulczewski@networktocode.com> * add operator ge and le * fix validate tests Co-authored-by: Christian Adell <christian.adell@networktocode.com> Co-authored-by: Ken Celenza <ken@celenza.org> Co-authored-by: Patryk Szulczewski <patryk@szulczewski.eu> Co-authored-by: Stephen Corry <stephen.corry@networktocode.com> Co-authored-by: Patryk Szulczewski <patryk.szulczewski@networktocode.com>
Merged
lvrfrc87
added a commit
that referenced
this pull request
Apr 20, 2023
* Update readme to start with use cases (#84) * Update readme to start with use cases * Apply suggestions from code review Co-authored-by: Patryk Szulczewski <patryk@szulczewski.eu> Co-authored-by: Stephen Corry <stephen.corry@networktocode.com> * Update README.md Co-authored-by: Patryk Szulczewski <patryk@szulczewski.eu> Co-authored-by: Stephen Corry <stephen.corry@networktocode.com> * Doc update (#87) * Fix operator checks to follow other check_type logic. (#85) * Fix operator checks to follow other check_type logic. * Add new release 0.0.2 Co-authored-by: Patryk Szulczewski <patryk.szulczewski@networktocode.com> * Implement `ge` and `le` operator type (#89) * Release 0.0.2 (#88) * Update readme to start with use cases (#84) * Update readme to start with use cases * Apply suggestions from code review Co-authored-by: Patryk Szulczewski <patryk@szulczewski.eu> Co-authored-by: Stephen Corry <stephen.corry@networktocode.com> * Update README.md Co-authored-by: Patryk Szulczewski <patryk@szulczewski.eu> Co-authored-by: Stephen Corry <stephen.corry@networktocode.com> * Doc update (#87) * Fix operator checks to follow other check_type logic. (#85) * Fix operator checks to follow other check_type logic. * Add new release 0.0.2 Co-authored-by: Patryk Szulczewski <patryk.szulczewski@networktocode.com> Co-authored-by: Christian Adell <christian.adell@networktocode.com> Co-authored-by: Ken Celenza <ken@celenza.org> Co-authored-by: Patryk Szulczewski <patryk@szulczewski.eu> Co-authored-by: Stephen Corry <stephen.corry@networktocode.com> Co-authored-by: Patryk Szulczewski <patryk.szulczewski@networktocode.com> * add operator ge and le * fix validate tests Co-authored-by: Christian Adell <christian.adell@networktocode.com> Co-authored-by: Ken Celenza <ken@celenza.org> Co-authored-by: Patryk Szulczewski <patryk@szulczewski.eu> Co-authored-by: Stephen Corry <stephen.corry@networktocode.com> Co-authored-by: Patryk Szulczewski <patryk.szulczewski@networktocode.com> * Fix parameter_match check, to support non-normalized data (#90) * Fix parameter_match check, to support non-normalized data * Add test * Update tests. * remove test print Co-authored-by: Patryk Szulczewski <patryk.szulczewski@networktocode.com> * Update mypy * Bugfix to data normalization * Fix ref_key parsing * Update docs * Issue 92 (#98) * Base-line tests for future refactor. * Refactor to simplify code. * Implement issue #92 * Bump certifi from 2022.9.24 to 2022.12.7 (#95) Bumps [certifi](https://github.com/certifi/python-certifi) from 2022.9.24 to 2022.12.7. - [Release notes](https://github.com/certifi/python-certifi/releases) - [Commits](certifi/python-certifi@2022.09.24...2022.12.07) --- updated-dependencies: - dependency-name: certifi dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Christian Adell <christian.adell@networktocode.com> Co-authored-by: Ken Celenza <ken@celenza.org> Co-authored-by: Patryk Szulczewski <patryk@szulczewski.eu> Co-authored-by: Stephen Corry <stephen.corry@networktocode.com> Co-authored-by: Patryk Szulczewski <patryk.szulczewski@networktocode.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
lvrfrc87
added a commit
that referenced
this pull request
May 12, 2023
* Update readme to start with use cases (#84) * Update readme to start with use cases * Apply suggestions from code review Co-authored-by: Patryk Szulczewski <patryk@szulczewski.eu> Co-authored-by: Stephen Corry <stephen.corry@networktocode.com> * Update README.md Co-authored-by: Patryk Szulczewski <patryk@szulczewski.eu> Co-authored-by: Stephen Corry <stephen.corry@networktocode.com> * Doc update (#87) * Fix operator checks to follow other check_type logic. (#85) * Fix operator checks to follow other check_type logic. * Add new release 0.0.2 Co-authored-by: Patryk Szulczewski <patryk.szulczewski@networktocode.com> * Implement `ge` and `le` operator type (#89) * Release 0.0.2 (#88) * Update readme to start with use cases (#84) * Update readme to start with use cases * Apply suggestions from code review Co-authored-by: Patryk Szulczewski <patryk@szulczewski.eu> Co-authored-by: Stephen Corry <stephen.corry@networktocode.com> * Update README.md Co-authored-by: Patryk Szulczewski <patryk@szulczewski.eu> Co-authored-by: Stephen Corry <stephen.corry@networktocode.com> * Doc update (#87) * Fix operator checks to follow other check_type logic. (#85) * Fix operator checks to follow other check_type logic. * Add new release 0.0.2 Co-authored-by: Patryk Szulczewski <patryk.szulczewski@networktocode.com> Co-authored-by: Christian Adell <christian.adell@networktocode.com> Co-authored-by: Ken Celenza <ken@celenza.org> Co-authored-by: Patryk Szulczewski <patryk@szulczewski.eu> Co-authored-by: Stephen Corry <stephen.corry@networktocode.com> Co-authored-by: Patryk Szulczewski <patryk.szulczewski@networktocode.com> * add operator ge and le * fix validate tests Co-authored-by: Christian Adell <christian.adell@networktocode.com> Co-authored-by: Ken Celenza <ken@celenza.org> Co-authored-by: Patryk Szulczewski <patryk@szulczewski.eu> Co-authored-by: Stephen Corry <stephen.corry@networktocode.com> Co-authored-by: Patryk Szulczewski <patryk.szulczewski@networktocode.com> * Fix parameter_match check, to support non-normalized data (#90) * Fix parameter_match check, to support non-normalized data * Add test * Update tests. * remove test print Co-authored-by: Patryk Szulczewski <patryk.szulczewski@networktocode.com> * Update mypy * Bugfix to data normalization * Fix ref_key parsing * Update docs * Issue 92 (#98) * Base-line tests for future refactor. * Refactor to simplify code. * Implement issue #92 * Bump certifi from 2022.9.24 to 2022.12.7 (#95) Bumps [certifi](https://github.com/certifi/python-certifi) from 2022.9.24 to 2022.12.7. - [Release notes](https://github.com/certifi/python-certifi/releases) - [Commits](certifi/python-certifi@2022.09.24...2022.12.07) --- updated-dependencies: - dependency-name: certifi dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update version and changelog * update poetry lock * Update changelog * Issue 94 & 91 (#100) * Baseline unittests * Fix issue #94 * Remove test print * Fix issue #91 * Relax deepdiff dependency. * Update pyproject.toml Co-authored-by: Patryk Szulczewski <patryk@szulczewski.eu> * Update poetry.lock * Relase v0.0.4 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Christian Adell <christian.adell@networktocode.com> Co-authored-by: Ken Celenza <ken@celenza.org> Co-authored-by: Stephen Corry <stephen.corry@networktocode.com> Co-authored-by: Patryk Szulczewski <patryk.szulczewski@networktocode.com> Co-authored-by: Federico87 <15066806+lvrfrc87@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Network to Code <federico.olivieri@networktocode.com> Co-authored-by: Leo Kirchner <leo.kirchner98@gmail.com> Co-authored-by: Leo Kirchner <Kircheneer@users.noreply.github.com>
lvrfrc87
added a commit
that referenced
this pull request
May 12, 2023
* Update readme to start with use cases (#84) * Update readme to start with use cases * Apply suggestions from code review Co-authored-by: Patryk Szulczewski <patryk@szulczewski.eu> Co-authored-by: Stephen Corry <stephen.corry@networktocode.com> * Update README.md Co-authored-by: Patryk Szulczewski <patryk@szulczewski.eu> Co-authored-by: Stephen Corry <stephen.corry@networktocode.com> * Doc update (#87) * Fix operator checks to follow other check_type logic. (#85) * Fix operator checks to follow other check_type logic. * Add new release 0.0.2 Co-authored-by: Patryk Szulczewski <patryk.szulczewski@networktocode.com> * Implement `ge` and `le` operator type (#89) * Release 0.0.2 (#88) * Update readme to start with use cases (#84) * Update readme to start with use cases * Apply suggestions from code review Co-authored-by: Patryk Szulczewski <patryk@szulczewski.eu> Co-authored-by: Stephen Corry <stephen.corry@networktocode.com> * Update README.md Co-authored-by: Patryk Szulczewski <patryk@szulczewski.eu> Co-authored-by: Stephen Corry <stephen.corry@networktocode.com> * Doc update (#87) * Fix operator checks to follow other check_type logic. (#85) * Fix operator checks to follow other check_type logic. * Add new release 0.0.2 Co-authored-by: Patryk Szulczewski <patryk.szulczewski@networktocode.com> Co-authored-by: Christian Adell <christian.adell@networktocode.com> Co-authored-by: Ken Celenza <ken@celenza.org> Co-authored-by: Patryk Szulczewski <patryk@szulczewski.eu> Co-authored-by: Stephen Corry <stephen.corry@networktocode.com> Co-authored-by: Patryk Szulczewski <patryk.szulczewski@networktocode.com> * add operator ge and le * fix validate tests Co-authored-by: Christian Adell <christian.adell@networktocode.com> Co-authored-by: Ken Celenza <ken@celenza.org> Co-authored-by: Patryk Szulczewski <patryk@szulczewski.eu> Co-authored-by: Stephen Corry <stephen.corry@networktocode.com> Co-authored-by: Patryk Szulczewski <patryk.szulczewski@networktocode.com> * Fix parameter_match check, to support non-normalized data (#90) * Fix parameter_match check, to support non-normalized data * Add test * Update tests. * remove test print Co-authored-by: Patryk Szulczewski <patryk.szulczewski@networktocode.com> * Update mypy * Bugfix to data normalization * Fix ref_key parsing * Update docs * Issue 92 (#98) * Base-line tests for future refactor. * Refactor to simplify code. * Implement issue #92 * Bump certifi from 2022.9.24 to 2022.12.7 (#95) Bumps [certifi](https://github.com/certifi/python-certifi) from 2022.9.24 to 2022.12.7. - [Release notes](https://github.com/certifi/python-certifi/releases) - [Commits](certifi/python-certifi@2022.09.24...2022.12.07) --- updated-dependencies: - dependency-name: certifi dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update version and changelog * update poetry lock * Update changelog * Issue 94 & 91 (#100) * Baseline unittests * Fix issue #94 * Remove test print * Fix issue #91 * Relax deepdiff dependency. * Update pyproject.toml Co-authored-by: Patryk Szulczewski <patryk@szulczewski.eu> * Update poetry.lock * Relase v0.0.4 * Release v0.0.4 (#105) --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Christian Adell <christian.adell@networktocode.com> Co-authored-by: Ken Celenza <ken@celenza.org> Co-authored-by: Stephen Corry <stephen.corry@networktocode.com> Co-authored-by: Patryk Szulczewski <patryk.szulczewski@networktocode.com> Co-authored-by: Federico87 <15066806+lvrfrc87@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Network to Code <federico.olivieri@networktocode.com> Co-authored-by: Leo Kirchner <leo.kirchner98@gmail.com> Co-authored-by: Leo Kirchner <Kircheneer@users.noreply.github.com>
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.
This PR fixes
operatorcheck logic and returned results to make them the same as for other check types.When the check passes then returned data result is empty, only when the check fails data result is returned to indicate why the check failed.
This is the main behavior for other checks and I think operator check should follow the same behavior.