forked from jyejare/candore
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from jyejare/inverse_compare
Inverse Reporting - Shows whats not changed
- Loading branch information
Showing
11 changed files
with
181 additions
and
99 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,10 @@ | ||
expected_constants: | ||
# These are just examples, please replace these with some real expected constants | ||
hosts: | ||
content_facet_something: content_source_something_id | ||
|
||
skipped_constants: | ||
# These are just examples, please replace these with some real skip-able constants | ||
content_view_versions: | ||
environments: | ||
permissions_something: something here |
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,10 @@ | ||
expected_variations: | ||
# These are just examples, please replace these with some real expected variations | ||
hosts: | ||
content_facet_somevar: content_source_ssomevar_id | ||
|
||
skipped_variations: | ||
# These are just examples, please replace these with some real skip-able variations | ||
content_view_versions: | ||
environments: | ||
permissions_somevar: somevar_here |
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
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
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,44 @@ | ||
""" | ||
A module responsible for calculating expected and skipped variations from | ||
`conf/variations` yaml file and convert them into processable list | ||
""" | ||
from functools import cached_property | ||
from candore.utils import yaml_reader, get_yaml_paths | ||
|
||
import yaml | ||
|
||
|
||
class Variations: | ||
def __init__(self, settings): | ||
self.settings = settings | ||
|
||
@cached_property | ||
def variations(self): | ||
yaml_data = yaml_reader(file_path=self.settings.candore.var_file) | ||
return yaml_data | ||
|
||
@cached_property | ||
def expected_variations(self): | ||
return get_yaml_paths(yaml_data=self.variations.get("expected_variations")) | ||
|
||
@cached_property | ||
def skipped_variations(self): | ||
return get_yaml_paths(yaml_data=self.variations.get("skipped_variations")) | ||
|
||
|
||
class Constants: | ||
def __init__(self, settings): | ||
self.settings = settings | ||
|
||
@cached_property | ||
def constants(self): | ||
yaml_data = yaml_reader(file_path=self.settings.candore.constant_file) | ||
return yaml_data | ||
|
||
@cached_property | ||
def expected_constants(self): | ||
return get_yaml_paths(yaml_data=self.constants.get("expected_constants")) | ||
|
||
@cached_property | ||
def skipped_constants(self): | ||
return get_yaml_paths(yaml_data=self.constants.get("skipped_constants")) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.