forked from cms-sw/cmssw
-
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.
Merge pull request cms-sw#152 from ktf/use-yaml-for-watcher
Move all watchers to be in the yaml file.
- Loading branch information
Showing
4 changed files
with
584 additions
and
509 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,19 @@ | ||
#!/usr/bin/env python | ||
|
||
from watchers import * | ||
from releases import * | ||
import yaml | ||
import re | ||
# Validate the schema of watchers. | ||
|
||
KEY_RE = "[^@]+" | ||
VALUE_RE = "[A-Za-z0-0.*+]" | ||
|
||
w = yaml.load(open("watchers.yaml", "r")) | ||
assert(type(w) == dict) | ||
for (key, value) in w.items(): | ||
assert(type(key) == str) | ||
assert(re.match(KEY_RE, key)) | ||
assert(type(value) == list) | ||
for x in value: | ||
assert(type(x) == str) | ||
assert(re.match(VALUE_RE, x)) |
Oops, something went wrong.