-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Varun Mittal <varunmittal91@gmail.com> Signed-off-by: Joshua Kwan <joshk@ternary.app> Signed-off-by: Mike Fuller <mike@finops.org> Signed-off-by: Justin Ohrenberger <justinohrenberger@gmail.com> Co-authored-by: Varun Mittal <varunmittal91@gmail.com> Co-authored-by: Joshua Kwan <joshua.m.kwan@gmail.com> Co-authored-by: johrenberger <122705393+johrenberger@users.noreply.github.com>
- Loading branch information
1 parent
c58c2b0
commit 7f80091
Showing
263 changed files
with
1,629 additions
and
395 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
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
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,21 @@ | ||
import os | ||
import pathlib | ||
import shutil | ||
import yaml | ||
|
||
def copy_rules(basedir): | ||
with open(os.path.join(basedir, 'version_sets.yaml'), 'r') as file: | ||
version_sets = yaml.safe_load(file) | ||
|
||
for version, base_files in version_sets.items(): | ||
dest = os.path.join(basedir, 'version_sets', version) | ||
if os.path.exists(dest): | ||
shutil.rmtree(dest) | ||
pathlib.Path(dest).mkdir(parents=True) | ||
for f in base_files: | ||
src_file = os.path.join(basedir, 'base_rule_definitions', f) | ||
dest_file = os.path.join(dest, f) | ||
shutil.copyfile(src_file, dest_file) | ||
|
||
if __name__ == "__main__": | ||
copy_rules(basedir='focus_validator/rules') |
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
Oops, something went wrong.