Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template: set LICENSE copyright to nf-core community #3366

Merged
merged 5 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@

- Use outputs instead of the environment to pass around values between steps in the Download Test Action ([#3351](https://github.com/nf-core/tools/pull/3351))
- Fix pre commit template ([#3358](https://github.com/nf-core/tools/pull/3358))
- Set LICENSE copyright to nf-core community ([#3366](https://github.com/nf-core/tools/pull/3366))

### Download

### Linting

- Linting of pipeline LICENSE file is a warning to allow for author/maintainer names ([#3366](https://github.com/nf-core/tools/pull/3366))

### Modules

- fix including modules.config ([#3356](https://github.com/nf-core/tools/pull/3356))
Expand Down
2 changes: 1 addition & 1 deletion nf_core/pipeline-template/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) {{ author }}
Copyright (c) {% if is_nfcore %} The nf-core community {% else %} The {{ short_name }} team {% endif %}

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
16 changes: 15 additions & 1 deletion nf_core/pipelines/lint/files_unchanged.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def files_unchanged(self) -> Dict[str, Union[List[str], bool]]:

passed: List[str] = []
failed: List[str] = []
warned: List[str] = []
ignored: List[str] = []
fixed: List[str] = []
could_fix: bool = False
Expand Down Expand Up @@ -173,6 +174,12 @@ def _tf(file_path: Union[str, Path]) -> Path:
shutil.copy(_tf(f), _pf(f))
passed.append(f"`{f}` matches the template")
fixed.append(f"`{f}` overwritten with template file")
elif f.name in ["LICENSE", "LICENSE.md", "LICENCE", "LICENCE.md"]:
# Report LICENSE as a warning since we are not using the manifest.author names
# TODO: Lint the content of the LICENSE file except the line containing author names
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this TODO still valid?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes :) we would have to lint for the text of the licensev (except copyright line) and make this a fail if it doesn't match. But I'm leaving this for the next version.

# to allow for people to opt-in listing author/maintainer names instead of using the "nf-core community"
warned.append(f"`{f}` does not match the template")
could_fix = True
else:
failed.append(f"`{f}` does not match the template")
could_fix = True
Expand Down Expand Up @@ -217,4 +224,11 @@ def _tf(file_path: Union[str, Path]) -> Path:
# cleaning up temporary dir
shutil.rmtree(tmp_dir)

return {"passed": passed, "failed": failed, "ignored": ignored, "fixed": fixed, "could_fix": could_fix}
return {
"passed": passed,
"failed": failed,
"warned": warned,
"ignored": ignored,
"fixed": fixed,
"could_fix": could_fix,
}
Loading