mirror of
https://github.com/MillironX/nf-configs.git
synced 2024-11-21 16:16:04 +00:00
Use strip
This commit is contained in:
parent
cb876594a3
commit
9caf9821c9
2 changed files with 7 additions and 10 deletions
|
@ -44,28 +44,25 @@ def check_config(Config, Github):
|
|||
for line in cfg:
|
||||
if re.search(regex, line):
|
||||
hit = line.split('/')[2].split('.')[0]
|
||||
config_profiles.add(hit)
|
||||
config_profiles.add(hit.strip())
|
||||
|
||||
###Check Github Config now
|
||||
tests = set()
|
||||
with open(Github, 'r') as ghfile:
|
||||
for line in ghfile:
|
||||
if re.search('profile: ', line):
|
||||
line = line.replace('\'','').replace('[','').replace(']','')
|
||||
line = line.replace('\'','').replace('[','').replace(']','').replace('\n','')
|
||||
profiles = line.split(':')[1].split(',')
|
||||
for p in profiles:
|
||||
tests.add(p)
|
||||
|
||||
print(len(tests))
|
||||
print(len(config_profiles))
|
||||
|
||||
tests.add(p.strip())
|
||||
|
||||
###Check if sets are equal
|
||||
if tests == config_profiles:
|
||||
sys.exit(0)
|
||||
else:
|
||||
#Maybe report what is missing here too
|
||||
#print("Tests don't seem to test these profiles properly!\n")
|
||||
# print(config_profiles.difference(tests))
|
||||
print("Tests don't seem to test these profiles properly!\n")
|
||||
print(config_profiles.symmetric_difference(tests))
|
||||
sys.exit(1)
|
||||
|
||||
check_config(Config=args.CUSTOM_CONFIG,Github=args.GITHUB_CONFIG)
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
params.custom_config_version = 'master'
|
||||
params.custom_config_base = "https://raw.githubusercontent.com/nf-core/configs/${params.custom_config_version}"
|
||||
|
||||
//Please use a new line per includeConfig section to allow easier linting/parsing. Thank you.
|
||||
//Please use a new line per include Config section to allow easier linting/parsing. Thank you.
|
||||
profiles {
|
||||
awsbatch { includeConfig "${params.custom_config_base}/conf/awsbatch.config" }
|
||||
bigpurple { includeConfig "${params.custom_config_base}/conf/bigpurple.config" }
|
||||
|
|
Loading…
Reference in a new issue