diff --git a/nf_core/lint/files_exist.py b/nf_core/lint/files_exist.py index 2f835b3aae..c5bc3f9d23 100644 --- a/nf_core/lint/files_exist.py +++ b/nf_core/lint/files_exist.py @@ -27,7 +27,9 @@ def files_exist(self): 'docs/usage.md', '.github/workflows/branch.yml', '.github/workflows/ci.yml', - '.github/workflows/linting.yml' + '.github/workflows/linting.yml', + 'lib/NfcoreSchema.groovy', + 'lib/nfcore_external_java_deps.jar' Files that *should* be present:: @@ -71,6 +73,8 @@ def files_exist(self): [os.path.join(".github", "workflows", "branch.yml")], [os.path.join(".github", "workflows", "ci.yml")], [os.path.join(".github", "workflows", "linting.yml")], + [os.path.join("lib", "NfcoreSchema.groovy")], + [os.path.join("lib", "nfcore_external_java_deps.jar")], ] files_warn = [ ["main.nf"], diff --git a/nf_core/lint/files_unchanged.py b/nf_core/lint/files_unchanged.py index a1ad03d3cf..4f487ed072 100644 --- a/nf_core/lint/files_unchanged.py +++ b/nf_core/lint/files_unchanged.py @@ -38,7 +38,9 @@ def files_unchanged(self): 'bin/markdown_to_html.py', 'conf/charliecloud.config', 'docs/README.md', - 'docs/images/nf-core-PIPELINE_logo.png' + 'docs/images/nf-core-PIPELINE_logo.png', + 'lib/NfcoreSchema.groovy', + 'lib/nfcore_external_java_deps.jar' Files that can have additional content but must include the template contents:: @@ -97,6 +99,8 @@ def files_unchanged(self): [os.path.join("conf", "charliecloud.config")], [os.path.join("docs", "README.md")], [os.path.join("docs", "images", "nf-core-{}_logo.png".format(short_name))], + [os.path.join("lib", "NfcoreSchema.groovy")], + [os.path.join("lib", "nfcore_external_java_deps.jar")], ] files_partial = [ [".gitignore", "foo"], @@ -144,15 +148,15 @@ def _tf(file_path): for f in files: try: if filecmp.cmp(_pf(f), _tf(f), shallow=True): - passed.append(f"'{f}' matches the template") + passed.append(f"`{f}` matches the template") else: if "files_unchanged" in self.fix: # Try to fix the problem by overwriting the pipeline file shutil.copy(_tf(f), _pf(f)) - passed.append(f"'{f}' matches the template") - fixed.append(f"'{f}' overwritten with template file") + passed.append(f"`{f}` matches the template") + fixed.append(f"`{f}` overwritten with template file") else: - failed.append(f"'{f}' does not match the template") + failed.append(f"`{f}` does not match the template") could_fix = True except FileNotFoundError: pass @@ -178,7 +182,7 @@ def _tf(file_path): with open(_tf(f), "r") as fh: template_file = fh.read() if template_file in pipeline_file: - passed.append(f"'{f}' matches the template") + passed.append(f"`{f}` matches the template") else: if "files_unchanged" in self.fix: # Try to fix the problem by overwriting the pipeline file @@ -186,10 +190,10 @@ def _tf(file_path): template_file = fh.read() with open(_pf(f), "w") as fh: fh.write(template_file) - passed.append(f"'{f}' matches the template") - fixed.append(f"'{f}' overwritten with template file") + passed.append(f"`{f}` matches the template") + fixed.append(f"`{f}` overwritten with template file") else: - failed.append(f"'{f}' does not match the template") + failed.append(f"`{f}` does not match the template") could_fix = True except FileNotFoundError: pass