Skip to content

Commit

Permalink
Merge pull request #1793 from nf-core/dev
Browse files Browse the repository at this point in the history
Dev -> Master v2.5.1
  • Loading branch information
mirpedrol authored Sep 1, 2022
2 parents cd0ac0b + ee6b104 commit cf280d6
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 14 deletions.
9 changes: 5 additions & 4 deletions .github/RELEASE_CHECKLIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@

1. Check issue milestones to see outstanding issues to resolve if possible or transfer to the milestones for the next release e.g. [`v1.9`](https://github.com/nf-core/tools/issues?q=is%3Aopen+is%3Aissue+milestone%3A1.9)
2. Most importantly, pick an undeniably outstanding [name](http://www.codenamegenerator.com/) for the release where _Prefix_ = _Metal_ and _Dictionary_ = _Animal_.
3. Check whether the GitHub Actions workflow scripts need updating of the Nextflow versions
3. Check the [pipeline health page](https://nf-co.re/pipeline_health) to make sure that all repos look sane (missing `TEMPLATE` branches etc)
4. Create a PR to `dev` to bump the version in `CHANGELOG.md` and `setup.py`.
5. Make sure all CI tests are passing!
6. Create a PR from `dev` to `master`
7. Make sure all CI tests are passing again (additional tests are run on PRs to `master`)
8. Request review (2 approvals required)
9. Merge the PR into `master`
10. Wait for CI tests on the commit to passed
11. (Optional but a good idea) Run a manual sync on `nf-core/testpipeline` and check that CI is passing on the resulting PR.
12. Create a new release copying the `CHANGELOG` for that release into the description section.
10. Run `rich-codex` to regenerate docs screengrabs (actions `workflow_dispatch` button)
11. Wait for CI tests on the commit to passed
12. (Optional but a good idea) Run a manual sync on `nf-core/testpipeline` and check that CI is passing on the resulting PR.
13. Create a new release copying the `CHANGELOG` for that release into the description section.

## After release

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ jobs:

- name: Publish dist to PyPI
if: github.repository == 'nf-core/tools'
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.pypi_password }}
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# nf-core/tools: Changelog

## [v2.5.1 - Gold Otter Patch](https://github.com/nf-core/tools/releases/tag/2.5.1) - [2022-08-31]

- 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]

### Template
Expand Down
8 changes: 4 additions & 4 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ authors:
given-names: Johannes
- family-names: Wilm
given-names: Andreas
- family-names: Ulysse Garcia
given-names: Maxime
- family-names: Garcia
given-names: Maxime Ulysse
- family-names: Di Tommaso
given-names: Paolo
- family-names: Nahnsen
Expand All @@ -39,8 +39,8 @@ prefered-citation:
given-names: Johannes
- family-names: Wilm
given-names: Andreas
- family-names: Ulysse Garcia
given-names: Maxime
- family-names: Garcia
given-names: Maxime Ulysse
- family-names: Di Tommaso
given-names: Paolo
- family-names: Nahnsen
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
9 changes: 6 additions & 3 deletions nf_core/pipeline-template/bin/check_samplesheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ def _validate_pair(self, row):
"""Assert that read pairs have the same file extension. Report pair status."""
if row[self._first_col] and row[self._second_col]:
row[self._single_col] = False
if Path(row[self._first_col]).suffixes[-2:] != Path(row[self._second_col]).suffixes[-2:]:
first_col_suffix = Path(row[self._first_col]).suffixes[-2:]
second_col_suffix = Path(row[self._second_col]).suffixes[-2:]
if first_col_suffix != second_col_suffix:
raise AssertionError("FASTQ pairs must have the same file extensions.")
else:
row[self._single_col] = True
Expand Down Expand Up @@ -157,7 +159,7 @@ def sniff_format(handle):
handle.seek(0)
sniffer = csv.Sniffer()
if not sniffer.has_header(peek):
logger.critical(f"The given sample sheet does not appear to contain a header.")
logger.critical("The given sample sheet does not appear to contain a header.")
sys.exit(1)
dialect = sniffer.sniff(peek)
return dialect
Expand Down Expand Up @@ -195,7 +197,8 @@ def check_samplesheet(file_in, file_out):
reader = csv.DictReader(in_handle, dialect=sniff_format(in_handle))
# Validate the existence of the expected header columns.
if not required_columns.issubset(reader.fieldnames):
logger.critical(f"The sample sheet **must** contain the column headers: {', '.join(required_columns)}.")
req_cols = ", ".join(required_columns)
logger.critical(f"The sample sheet **must** contain these column headers: {req_cols}.")
sys.exit(1)
# Validate each row.
checker = RowChecker()
Expand Down
10 changes: 10 additions & 0 deletions nf_core/pipeline-template/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Config file for Python. Mostly used to configure linting of bin/check_samplesheet.py with Black.
# Should be kept the same as nf-core/tools to avoid fighting with template synchronisation.
[tool.black]
line-length = 120
target_version = ["py37", "py38", "py39", "py310"]

[tool.isort]
profile = "black"
known_first_party = ["nf_core"]
multi_line_output = 3
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from setuptools import find_packages, setup

version = "2.5"
version = "2.5.1"

with open("README.md") as f:
readme = f.read()
Expand Down

0 comments on commit cf280d6

Please sign in to comment.