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

lint pyproject.toml file exists and content #1795

Merged
merged 2 commits into from
Aug 31, 2022
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

- Patch release to fix black linting in pipelines ([#1789](https://github.com/nf-core/tools/pull/1789))
- Add isort options to pyproject.toml ([#1792](https://github.com/nf-core/tools/pull/1792))
- Lint pyproject.toml file exists and content ([#1795](https://github.com/nf-core/tools/pull/1795))
- Update GitHub PyPI package release action to v1 ([#1785](https://github.com/nf-core/tools/pull/1785))

## [v2.5 - Gold Otter](https://github.com/nf-core/tools/releases/tag/2.5) - [2022-08-30]
Expand Down
2 changes: 2 additions & 0 deletions nf_core/lint/files_exist.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def files_exist(self):
.github/workflows/awstest.yml
.github/workflows/awsfulltest.yml
lib/WorkflowPIPELINE.groovy
pyproject.toml

Files that *must not* be present:

Expand Down Expand Up @@ -174,6 +175,7 @@ def files_exist(self):
[os.path.join(".github", "workflows", "awsfulltest.yml")],
[os.path.join("lib", f"Workflow{short_name[0].upper()}{short_name[1:]}.groovy")],
["modules.json"],
["pyproject.toml"],
]

# List of strings. Fails / warns if any of the strings exist.
Expand Down
3 changes: 2 additions & 1 deletion nf_core/lint/files_unchanged.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def files_unchanged(self):

.gitignore
.prettierignore
pyproject.toml

.. tip:: You can configure the ``nf-core lint`` tests to ignore any of these checks by setting
the ``files_unchanged`` key as follows in your ``.nf-core.yml`` config file. For example:
Expand Down Expand Up @@ -110,7 +111,7 @@ def files_unchanged(self):
[os.path.join("lib", "NfcoreTemplate.groovy")],
]
files_partial = [
[".gitignore", ".prettierignore"],
[".gitignore", ".prettierignore", "pyproject.toml"],
]

# Only show error messages from pipeline creation
Expand Down