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

remove bioconda badge check comment, add zenodo doi check #2254

Merged
merged 2 commits into from
Apr 26, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@
- Simplify pipeline README ([#2186](https://github.com/nf-core/tools/issues/2186))
- Added support for the apptainer container engine via `-profile apptainer`. ([#2244](https://github.com/nf-core/tools/issues/2244)) [Contributed by @jfy133]
- Add tower.yml file to the pipeline template ([#2251](https://github.com/nf-core/tools/pull/2251))
- Add mastodon badge to README ([#2253](https://github.com/nf-core/tools/pull/2253))

### Linting

- Update modules lint test to fail if enable_conda is found ([#2213](https://github.com/nf-core/tools/pull/2213))
- Read module lint configuration from `.nf-core.yml`, not `.nf-core-lint.yml` ([#2221](https://github.com/nf-core/tools/pull/2221))
- `nf-core schema lint` now defaults to linting `nextflow_schema.json` if no filename is provided ([#2225](https://github.com/nf-core/tools/pull/2225))
- Warn if `/zenodo.XXXXXX` is present in the Readme ([#2254](https://github.com/nf-core/tools/pull/2254))

### Modules

Expand Down
22 changes: 15 additions & 7 deletions nf_core/lint/readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,12 @@ def readme(self):
[![Nextflow](https://img.shields.io/badge/nextflow-%E2%89%A50.27.6-brightgreen.svg)](https://www.nextflow.io/)
* Bioconda badge
.. note:: This badge are a markdown image ``![alt-text](<image URL>)`` *inside* a markdown link ``[markdown image](<link URL>)``, so a bit fiddly to write.
* If your pipeline contains a file called ``environment.yml`` in the root directory, a bioconda badge is required
mashehu marked this conversation as resolved.
Show resolved Hide resolved
* Required badge code:
* Zenodo release
.. code-block:: md
[![install with bioconda](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg)](https://bioconda.github.io/)
* If pipeline is released but still contains a 'zenodo.XXXXXXX' tag, the test fails
.. note:: These badges are a markdown image ``![alt-text](<image URL>)`` *inside* a markdown link ``[markdown image](<link URL>)``, so a bit fiddly to write.
"""
passed = []
warned = []
Expand Down Expand Up @@ -62,4 +58,16 @@ def readme(self):
else:
warned.append("README did not have a Nextflow minimum version badge.")

if "zenodo_doi" not in ignore_configs:
# Check that zenodo.XXXXXXX has been replaced with the zendo.DOI
zenodo_re = r"/zenodo\.X+"
match = re.search(zenodo_re, content)
if match:
warned.append(
"README contains the placeholder `zenodo.XXXXXXX`. "
"This should be replaced with the zenodo doi (after the first release)."
)
else:
passed.append("README Zenodo placeholder was replaced with DOI.")

return {"passed": passed, "warned": warned, "failed": failed}