Federico Bond
e7475441bd
fix: run error hooks if provider returns FlagResolutionDetails with non-empty error_code ( #291 )
...
* fix: run error hooks if provider returns FlagResolutionDetails with non-empty error_code
Signed-off-by: Federico Bond <federicobond@gmail.com>
* refactor: extract error code to exception mapping to class variable
Signed-off-by: Federico Bond <federicobond@gmail.com>
---------
Signed-off-by: Federico Bond <federicobond@gmail.com>
2024-03-14 08:31:46 +11:00
renovate[bot]
3f336b3a24
chore(deps): update dependency pytest to v8.1.1 ( #289 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-09 16:47:21 +01:00
Federico Bond
789e6e0f5f
feat: implement provider status ( #288 )
...
* feat: implement provider status
Signed-off-by: Federico Bond <federicobond@gmail.com>
* feat: set provider status to fatal if initialize raises PROVIDER_FATAL error
Signed-off-by: Federico Bond <federicobond@gmail.com>
* feat: add a provider status accessor to clients
Signed-off-by: Federico Bond <federicobond@gmail.com>
* feat: short circuit flag resolution when provider is not ready
Signed-off-by: Federico Bond <federicobond@gmail.com>
---------
Signed-off-by: Federico Bond <federicobond@gmail.com>
2024-03-08 09:00:32 +11:00
renovate[bot]
7ba7d6146f
chore(deps): update dependency pytest to v8.1.0 ( #287 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-03 23:06:47 +01:00
Zhiwei
ae26217328
docs: add Missing Imports in Provider Dev Example in README ( #286 )
...
docs: add missing imports in provider dev example in README
Signed-off-by: Zhiwei <zhi.wei.liang@outlook.com>
2024-03-03 12:04:45 -03:00
Anton Grübel
5acd6a6598
refactor: improve Hook Hints typing ( #285 )
...
* improve Hook Hints typing
Signed-off-by: gruebel <anton.gruebel@gmail.com>
* ignore lint issue for this line
Signed-off-by: gruebel <anton.gruebel@gmail.com>
* exclude TYPE_CHECKING from coverage report
Signed-off-by: gruebel <anton.gruebel@gmail.com>
---------
Signed-off-by: gruebel <anton.gruebel@gmail.com>
2024-03-03 00:38:14 -03:00
Todd Baert
141858d235
chore: add changelog sections ( #282 )
...
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
2024-02-26 20:56:00 -03:00
renovate[bot]
b2594a567c
chore(deps): update dependency pytest to v8.0.2 ( #281 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-25 00:45:32 -03:00
renovate[bot]
bafa427a0d
chore(deps): update dependency coverage to v7.4.3 ( #280 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-24 00:25:56 +01:00
github-actions[bot]
035d0ad679
chore: release 0.5.0 ( #277 )
...
chore(main): release 0.5.0
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-02-21 16:23:33 -05:00
Federico Bond
ed6a42f264
feat!: add support for domains ( #271 )
...
* feat: add support for domains
Signed-off-by: Federico Bond <federicobond@gmail.com>
* docs: update README.md
Signed-off-by: Federico Bond <federicobond@gmail.com>
* feat: add clear_providers function to api
Signed-off-by: Federico Bond <federicobond@gmail.com>
* feat: make _get_provider function private
Signed-off-by: Federico Bond <federicobond@gmail.com>
* fix: shutdown all providers on api.shutdown
Signed-off-by: Federico Bond <federicobond@gmail.com>
* refactor: move provider dict to a ProviderRegistry class
Signed-off-by: Federico Bond <federicobond@gmail.com>
* feat: reset default provider on clear_providers and add tests
Signed-off-by: Federico Bond <federicobond@gmail.com>
* docs: update README.md
Signed-off-by: Federico Bond <federicobond@gmail.com>
---------
Signed-off-by: Federico Bond <federicobond@gmail.com>
2024-02-20 19:31:22 -03:00
renovate[bot]
0ec2b69d1e
chore(deps): update dependency coverage to v7.4.2 ( #276 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-20 21:48:09 +00:00
renovate[bot]
2b177e6ab5
chore(deps): update dependency pytest to v8.0.1 ( #275 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-17 04:24:21 +00:00
Federico Bond
77fbae7b1e
refactor: remove abstractmethod decorator from get_provider_hooks ( #274 )
...
Signed-off-by: Federico Bond <federicobond@gmail.com>
2024-02-09 18:50:28 -03:00
Federico Bond
f9833ba753
chore: update ruff version to 0.2.1 and remove preview flag ( #272 )
...
Signed-off-by: Federico Bond <federicobond@gmail.com>
2024-02-07 20:08:59 -03:00
renovate[bot]
915cabe5b1
chore(deps): update pre-commit/action action to v3.0.1 ( #273 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-07 19:52:15 +00:00
github-actions[bot]
522d425a06
chore(main): release 0.4.2 ( #238 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-02-06 07:37:38 -08:00
Federico Bond
cb1677b0a8
feat: make return value not optional in provider API functions ( #270 )
...
Signed-off-by: Federico Bond <federicobond@gmail.com>
2024-02-06 11:15:49 -03:00
Federico Bond
1282bab31e
docs: update supported spec version ( #269 )
...
Signed-off-by: Federico Bond <federicobond@gmail.com>
2024-02-05 20:49:20 -08:00
Federico Bond
caa7f36c30
feat: add FeatureProvider protocol ( #268 )
...
Signed-off-by: Federico Bond <federicobond@gmail.com>
2024-02-03 11:26:18 -03:00
Anton Grübel
3b89760d41
feat: make specific fields in HookContext immutable ( #266 )
...
make specific fields in HookContext immutable
Signed-off-by: gruebel <anton.gruebel@gmail.com>
2024-01-29 13:16:10 -03:00
Matthew M. Keeler
5ef6ca1263
fix: Allow string values for `FlagEvaluationDetails.reason` and `FlagResolutionDetails.reason` ( #264 )
...
* fix: Allow string values for `FlagEvaluationDetails.reason` and ``FlagResolutionDetails.reason`
Signed-off-by: Matthew Keeler <mkeeler@launchdarkly.com>
* Remove useless test
Signed-off-by: Matthew Keeler <mkeeler@launchdarkly.com>
---------
Signed-off-by: Matthew Keeler <mkeeler@launchdarkly.com>
2024-01-29 12:42:37 -03:00
renovate[bot]
f1b0839d16
chore(deps): update dependency pytest to v8 ( #265 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-29 10:37:07 -03:00
Federico Bond
ccbff2c5e4
feat: improve logging setup ( #261 )
...
Signed-off-by: Federico Bond <federicobond@gmail.com>
2024-01-26 23:52:33 -03:00
renovate[bot]
15ce8f9b56
chore(deps): update dependency coverage to v7.4.1 ( #263 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-26 22:44:44 +00:00
renovate[bot]
d1f27e3278
chore(deps): update actions/cache action to v4 ( #260 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-17 18:26:28 -03:00
Anton Grübel
a1c25e241b
ci: change codecov GHA version to v3 ( #259 )
...
change codecov GHA version to v3
Signed-off-by: gruebel <anton.gruebel@gmail.com>
2024-01-16 17:13:13 -03:00
Anton Grübel
1722848651
ci: use pypi trusted publishing ( #258 )
...
use pypi trusted publishing
Signed-off-by: gruebel <anton.gruebel@gmail.com>
2024-01-11 16:12:47 -05:00
Michael Beemer
4883ab47d8
ci: fix missing CodeQL workflow permissions
...
Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
2024-01-09 13:36:55 -05:00
Anton Grübel
af9d3da336
chore: enable mypy strict mode ( #257 )
...
Signed-off-by: gruebel <anton.gruebel@gmail.com>
Co-authored-by: Federico Bond <federicobond@gmail.com>
2024-01-08 20:09:53 -03:00
Anton Grübel
30f4e692d8
ci: split lint job into lint and sast ( #256 )
...
split lint job into lint and sast
Signed-off-by: gruebel <anton.gruebel@gmail.com>
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
2024-01-08 19:56:12 -03:00
Anton Grübel
b3c67b6ab3
ci: add mypy type checking and fix/exclude minor issues ( #255 )
...
* add mypy type checking and fix/exclude minor issues
Signed-off-by: gruebel <anton.gruebel@gmail.com>
* enable explicit_package_bases for mypy
Signed-off-by: gruebel <anton.gruebel@gmail.com>
---------
Signed-off-by: gruebel <anton.gruebel@gmail.com>
2024-01-07 12:56:32 -03:00
Anton Grübel
a853b85514
chore: remove excluded ruff rules and fix issues ( #254 )
...
remove excluded ruff rules and fix issues
Signed-off-by: gruebel <anton.gruebel@gmail.com>
2024-01-06 14:25:44 -03:00
Anton Grübel
49aae786fb
ci: ignore tests in CodeQL scan and add missing permission restrictions ( #253 )
...
ignore tests in CodeQL scan and add missing permission restrictions
Signed-off-by: gruebel <anton.gruebel@gmail.com>
2024-01-06 11:21:40 -03:00
Anton Grübel
3b6204daec
chore: replace black, fake8 and isort with ruff and ruff-format ( #249 )
...
* replace black, fake8 and isort with ruff and ruff-format
Signed-off-by: gruebel <anton.gruebel@gmail.com>
* fix workflow
Signed-off-by: gruebel <anton.gruebel@gmail.com>
* use full version tag for pre-commit/action action
Signed-off-by: gruebel <anton.gruebel@gmail.com>
---------
Signed-off-by: gruebel <anton.gruebel@gmail.com>
Signed-off-by: Anton Grübel <anton.gruebel@gmail.com>
2024-01-05 19:45:26 -05:00
renovate[bot]
ab50012460
chore(deps): update dependency pytest to v7.4.4 ( #250 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-31 15:18:16 +00:00
renovate[bot]
3176be5327
chore(deps): update dependency coverage to v7.4.0 ( #248 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-28 03:11:54 +00:00
renovate[bot]
c9a7bb15e3
chore(deps): update dependency black to v23.12.1 ( #246 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-23 03:25:32 +00:00
renovate[bot]
fb11280b66
chore(deps): update dependency coverage to v7.3.4 ( #245 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-20 22:48:55 +00:00
renovate[bot]
270a34c6b8
chore(deps): update dependency coverage to v7.3.3 ( #244 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-14 23:22:17 +00:00
renovate[bot]
4c416b434c
chore(deps): update github/codeql-action action to v3 ( #243 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-13 21:19:13 +00:00
renovate[bot]
48bb2a383c
chore(deps): update dependency pylint to v3.0.3 ( #241 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-12 12:35:46 +00:00
renovate[bot]
b5a6a70134
chore(deps): update dependency black to v23.12.0 ( #242 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-12 09:31:14 +00:00
renovate[bot]
4b59b65ebe
chore(deps): update actions/setup-python action to v5 ( #240 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-06 16:44:28 +00:00
renovate[bot]
56284e36fa
chore(deps): update google-github-actions/release-please-action action to v4 ( #239 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-02 02:21:11 +00:00
Federico Bond
95d69e27b3
docs: document shutdown function ( #237 )
...
Signed-off-by: Federico Bond <federicobond@gmail.com>
2023-11-13 21:34:09 -06:00
github-actions[bot]
e24a6347a1
chore(main): release 0.4.1 ( #235 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-11-08 06:17:29 -06:00
renovate[bot]
3001cf9b0f
chore(deps): update dependency black to v23.11.0 ( #236 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-08 11:21:38 +00:00
Federico Bond
963b01e66d
fix: replace str with enum value in InMemoryFlag definition ( #234 )
...
Signed-off-by: Federico Bond <federicobond@gmail.com>
2023-11-07 09:51:24 -06:00
Federico Bond
4bdd384544
fix: fix types for HookContext.{client,provider}_metadata ( #233 )
...
Signed-off-by: Federico Bond <federicobond@gmail.com>
2023-11-07 09:44:54 -06:00