1
0
Fork 0
mirror of https://github.com/MillironX/nf-configs.git synced 2024-12-22 02:38:16 +00:00

Use strip

This commit is contained in:
Alexander Peltzer 2019-11-26 14:04:58 +01:00
parent cb876594a3
commit 9caf9821c9
No known key found for this signature in database
GPG key ID: A4A9322B50AF95A0
2 changed files with 7 additions and 10 deletions

View file

@ -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)

View file

@ -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" }