-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added mock client for when ff patch is disabled
- Loading branch information
Showing
8 changed files
with
62 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
## 0.3.3 - 2022-08-03 | ||
### Added | ||
* Added MockFeatureFlagClient which is used when env var DBT_FF_DISABLE is set in environment. This allows users to disable live clients without breaking their projects | ||
* Started using changie for changelog management |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), | ||
and is generated by [Changie](https://github.com/miniscruff/changie). |
Empty file.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
changesDir: .changes | ||
unreleasedDir: unreleased | ||
headerPath: header.tpl.md | ||
changelogPath: CHANGELOG.md | ||
versionExt: md | ||
versionFormat: '## {{.Version}} - {{.Time.Format "2006-01-02"}}' | ||
kindFormat: '### {{.Kind}}' | ||
changeFormat: '* {{.Body}}' | ||
kinds: | ||
- label: Added | ||
- label: Changed | ||
- label: Deprecated | ||
- label: Removed | ||
- label: Fixed | ||
- label: Security | ||
newlines: | ||
afterChangelogHeader: 1 | ||
beforeChangelogVersion: 1 | ||
endOfVersion: 1 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), | ||
and is generated by [Changie](https://github.com/miniscruff/changie). | ||
|
||
|
||
## 0.3.3 - 2022-08-03 | ||
### Added | ||
* Added MockFeatureFlagClient which is used when env var DBT_FF_DISABLE is set in environment. This allows users to disable live clients without breaking their projects | ||
* Started using changie for changelog management |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from typing import Union | ||
|
||
from dbt_feature_flags.base import BaseFeatureFlagsClient | ||
|
||
|
||
class MockFeatureFlagClient(BaseFeatureFlagsClient): | ||
def bool_variation(self, flag: str) -> bool: | ||
return False | ||
|
||
def string_variation(self, flag: str) -> str: | ||
return "" | ||
|
||
def number_variation(self, flag: str) -> Union[float, int]: | ||
return 0 | ||
|
||
def json_variation(self, flag: str) -> Union[dict, list]: | ||
return {} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "dbt-feature-flags" | ||
version = "0.3.2" | ||
version = "0.3.3" | ||
description = "Use feature flags in dbt models" | ||
authors = ["z3z1ma <[email protected]>"] | ||
include = ["zzz_dbt_feature_flags.pth"] | ||
|