* feat: implement provider events
Signed-off-by: Federico Bond <federicobond@gmail.com>
* feat: add error_code field to EventDetails and ProviderEventDetails
Signed-off-by: Federico Bond <federicobond@gmail.com>
* fix: replace strings with postponed evaluation of annotations
Signed-off-by: Federico Bond <federicobond@gmail.com>
* feat: run handlers immediately if provider already in associated state
Signed-off-by: Federico Bond <federicobond@gmail.com>
* feat: remove unused _provider from openfeature.api
Signed-off-by: Federico Bond <federicobond@gmail.com>
* test: add some comments to test cases
Signed-off-by: Federico Bond <federicobond@gmail.com>
* test: add provider event late binding test cases
Signed-off-by: Federico Bond <federicobond@gmail.com>
* fix: fix status handlers running immediately if provider already in associated state
Signed-off-by: Federico Bond <federicobond@gmail.com>
* refactor: reuse provider property in OpenFeatureClient
Signed-off-by: Federico Bond <federicobond@gmail.com>
* refactor: move _provider_status_to_event to ProviderEvent.from_provider_status
Signed-off-by: Federico Bond <federicobond@gmail.com>
* refactor: move EventSupport class to an internal module
Signed-off-by: Federico Bond <federicobond@gmail.com>
* refactor: replace EventSupport class with module-level functions
Signed-off-by: Federico Bond <federicobond@gmail.com>
* style: fix code style
---------
Signed-off-by: Federico Bond <federicobond@gmail.com>
* refactor!: simplify namespaces to make public API more pythonic
Signed-off-by: Federico Bond <federicobond@gmail.com>
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
Co-authored-by: Todd Baert <todd.baert@dynatrace.com>
* 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>