Commit Graph

3 Commits

Author SHA1 Message Date
Manuel Schönlaub 50f5a484a0
fix: Fix type checking (#25)
* Fix type checking within client

Signed-off-by: Manuel Schönlaub <manuel.schoenlaub@gmail.com>

* Make linter happy

Signed-off-by: Manuel Schönlaub <manuel.schoenlaub@gmail.com>

* Migrate Hook Hints to Mapping

Signed-off-by: Manuel Schönlaub <manuel.schoenlaub@gmail.com>

* Fix type annotations in FlagEvaluationDetails

Signed-off-by: Manuel Schönlaub <manuel.schoenlaub@gmail.com>

* Fix last hint typing

Signed-off-by: Manuel Schönlaub <manuel.schonlaub@prodigygame.com>

* Rework typing

Signed-off-by: Manuel Schönlaub <manuel.schonlaub@prodigygame.com>

Signed-off-by: Manuel Schönlaub <manuel.schoenlaub@gmail.com>
Signed-off-by: Manuel Schönlaub <manuel.schonlaub@prodigygame.com>
2022-11-21 17:39:37 -05:00
Andrew Helsby df0c033083
fix: Unit tests (#28)
* fix/unit-tests: Improve unit test coverage to ensure spec is followed
Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com>

Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com>

* fix/unit-tests: Add test coverage around hooks
Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com>

Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com>

* fix/unit-tests: Parametrize test_should_use_no_op_provider_if_none_provided
Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com>

Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com>

* fix/unit-tests: Parametrize all flag type methods in open feature client
Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com>

Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com>

* fix/unit-tests: Parametrize all flag type methods in open feature client
Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com>

Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com>

* fix/unit-tests: Add fixture to clear global provider after each tests
Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com>

Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com>

* fix/unit-tests: Mock hooks in tests
Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com>

Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com>

* fix/unit-tests: Update docstring on clear_provider method
Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com>

Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com>

* fix/unit-tests: remove setup method in client tests
Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com>

Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com>

* fix/unit-tests: Remove invalid flag type check in private method _create_provider_evaluation and move to public method
Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com>

Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com>

Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com>
2022-11-02 16:24:16 +04:00
Andrew Helsby bc58cd8932
hooks: Implementation of hooks for python OpenFeature (#6)
* hooks: Implementation of hooks for python Open Feature

Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com>

* hooks: Fix tests broken as a result of providing hook support

Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com>

* hooks: Add api level evaluation context support

Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com>

* hooks: Change typing on iterables to be compatible with python 3.8

Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com>

* hooks: Add docstring for evaluate_flag_details method

Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com>

* hooks: Add docstring for evaluate_flag_details method

Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com>

* hooks: docstring change requested in review

Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com>

* hooks: add docstrings and comments to

Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com>

* hooks: Use correct exception in error hooks in the client

Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com>

* hooks: Set empty evaluation context in no op provider to None

Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com>

Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com>
2022-09-02 12:23:15 +04:00