From bf5bdb57bf1e0f338b8098ee27423e07d4179e3a Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Tue, 30 Aug 2022 15:38:10 +0200 Subject: [PATCH 01/15] Bump to v2.6dev --- .github/RELEASE_CHECKLIST.md | 9 +++++---- CHANGELOG.md | 10 ++++++++++ setup.py | 2 +- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/RELEASE_CHECKLIST.md b/.github/RELEASE_CHECKLIST.md index e086d286aa..c5b3464b83 100644 --- a/.github/RELEASE_CHECKLIST.md +++ b/.github/RELEASE_CHECKLIST.md @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index aa177f6ecd..8132f37c05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # nf-core/tools: Changelog +## v2.6dev + +### Template + +### Linting + +### General + +### Modules + ## [v2.5 - Gold Otter](https://github.com/nf-core/tools/releases/tag/2.5) - [2022-08-30] ### Template diff --git a/setup.py b/setup.py index ac95a82c90..0759633a0b 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import find_packages, setup -version = "2.5" +version = "2.6dev" with open("README.md") as f: readme = f.read() From 9c942b81f96cbe32f64e38b9c6be96e0e90e5865 Mon Sep 17 00:00:00 2001 From: "Maxime U. Garcia" Date: Tue, 30 Aug 2022 16:55:48 +0200 Subject: [PATCH 02/15] Update CITATION.cff --- CITATION.cff | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CITATION.cff b/CITATION.cff index 4533e2f28c..017666c018 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -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 @@ -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 From 23bd7e4306822cfec7a6c5e1b2a80725a5351d1c Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Tue, 30 Aug 2022 17:39:24 +0200 Subject: [PATCH 03/15] add pyproject.toml file for black custom parameters --- nf_core/pipeline-template/pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 nf_core/pipeline-template/pyproject.toml diff --git a/nf_core/pipeline-template/pyproject.toml b/nf_core/pipeline-template/pyproject.toml new file mode 100644 index 0000000000..53cc9af325 --- /dev/null +++ b/nf_core/pipeline-template/pyproject.toml @@ -0,0 +1,3 @@ +[tool.black] +line-length = 120 +target_version = ["py37", "py38", "py39", "py310"] From 732bbd0fdd475dab0f803342ddecf991daf0b30c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlia=20Mir=20Pedrol?= Date: Wed, 31 Aug 2022 09:34:28 +0200 Subject: [PATCH 04/15] Apply suggestion from code review Co-authored-by: Phil Ewels --- nf_core/pipeline-template/pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nf_core/pipeline-template/pyproject.toml b/nf_core/pipeline-template/pyproject.toml index 53cc9af325..1ed87cee5b 100644 --- a/nf_core/pipeline-template/pyproject.toml +++ b/nf_core/pipeline-template/pyproject.toml @@ -1,3 +1,5 @@ +# 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"] From 2983c47a9f2b7764f498caae44dbb323fd90021c Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Wed, 31 Aug 2022 10:55:06 +0200 Subject: [PATCH 05/15] bump to 2.5.1 --- CHANGELOG.md | 4 ++++ setup.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8132f37c05..eb7e437216 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ ### Modules +## [v2.5 - Gold Otter Patch](https://github.com/nf-core/tools/releases/tag/2.5) - [2022-08-31] + +- Patch release to fix black linting in pipelines ([#1789](https://github.com/nf-core/tools/pull/1789)). + ## [v2.5 - Gold Otter](https://github.com/nf-core/tools/releases/tag/2.5) - [2022-08-30] ### Template diff --git a/setup.py b/setup.py index 0759633a0b..f3335db354 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import find_packages, setup -version = "2.6dev" +version = "2.5.1" with open("README.md") as f: readme = f.read() From 20d9b73a3cd3a760e32ac839fa79b646de362f8e Mon Sep 17 00:00:00 2001 From: Fabian Egli Date: Tue, 30 Aug 2022 15:51:12 +0200 Subject: [PATCH 06/15] use GitHub PyPI publish action release v1 --- .github/workflows/deploy-pypi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-pypi.yml b/.github/workflows/deploy-pypi.yml index 391a8ef94f..8d951b416d 100644 --- a/.github/workflows/deploy-pypi.yml +++ b/.github/workflows/deploy-pypi.yml @@ -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 }} From 2d51c96f89114e1a499a4b7591cf4bd3507dd4be Mon Sep 17 00:00:00 2001 From: Fabian Egli Date: Tue, 30 Aug 2022 15:58:22 +0200 Subject: [PATCH 07/15] update GitHub PyPI release action to v1 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8132f37c05..8948fa0515 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ ### General +- Update GitHub PyPI package release action to v1 ([#1785](https://github.com/nf-core/tools/pull/1785)) + ### Modules ## [v2.5 - Gold Otter](https://github.com/nf-core/tools/releases/tag/2.5) - [2022-08-30] From 6fabd3aecced72a8c57248470d848154b62cb13e Mon Sep 17 00:00:00 2001 From: Fabian Egli Date: Wed, 31 Aug 2022 11:28:22 +0200 Subject: [PATCH 08/15] use nf-core tools isort settings in pipeline template --- nf_core/pipeline-template/pyproject.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nf_core/pipeline-template/pyproject.toml b/nf_core/pipeline-template/pyproject.toml index 1ed87cee5b..0d62beb6f9 100644 --- a/nf_core/pipeline-template/pyproject.toml +++ b/nf_core/pipeline-template/pyproject.toml @@ -3,3 +3,8 @@ [tool.black] line-length = 120 target_version = ["py37", "py38", "py39", "py310"] + +[tool.isort] +profile = "black" +known_first_party = ["nf_core"] +multi_line_output = 3 From d79c14e43fd72cf786cfdfbecce760ecf9c58e80 Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Wed, 31 Aug 2022 12:15:26 +0200 Subject: [PATCH 09/15] update changelog --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 66dc35aa0c..e3aa9da72f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,13 +8,13 @@ ### General -- Update GitHub PyPI package release action to v1 ([#1785](https://github.com/nf-core/tools/pull/1785)) - ### Modules ## [v2.5 - Gold Otter Patch](https://github.com/nf-core/tools/releases/tag/2.5) - [2022-08-31] -- Patch release to fix black linting in pipelines ([#1789](https://github.com/nf-core/tools/pull/1789)). +- 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)) +- 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] From c40a0c93c3987e8c9e5baba622a50900ffd41bee Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Wed, 31 Aug 2022 12:45:02 +0200 Subject: [PATCH 10/15] remove v2.6dev from changelog --- CHANGELOG.md | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e3aa9da72f..a0232b58c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,15 +1,5 @@ # nf-core/tools: Changelog -## v2.6dev - -### Template - -### Linting - -### General - -### Modules - ## [v2.5 - Gold Otter Patch](https://github.com/nf-core/tools/releases/tag/2.5) - [2022-08-31] - Patch release to fix black linting in pipelines ([#1789](https://github.com/nf-core/tools/pull/1789)) From 8fed2ae0fe60e40f07177dc8872b149371c653af Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Wed, 31 Aug 2022 13:21:23 +0200 Subject: [PATCH 11/15] lint pyproject.toml file exists and content --- nf_core/lint/files_exist.py | 2 ++ nf_core/lint/files_unchanged.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/nf_core/lint/files_exist.py b/nf_core/lint/files_exist.py index a65f28f11d..bc0f732b2e 100644 --- a/nf_core/lint/files_exist.py +++ b/nf_core/lint/files_exist.py @@ -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: @@ -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. diff --git a/nf_core/lint/files_unchanged.py b/nf_core/lint/files_unchanged.py index 7c82d9961b..8b63a5769e 100644 --- a/nf_core/lint/files_unchanged.py +++ b/nf_core/lint/files_unchanged.py @@ -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: @@ -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 From d5cbde0f8ef80bb9e78c44fba3f074e9d7f668eb Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Wed, 31 Aug 2022 13:25:17 +0200 Subject: [PATCH 12/15] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e3aa9da72f..ccfac9cd04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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] From 2d7360fc9fa348ca7ba5c2335e5b5872d9a20029 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlia=20Mir=20Pedrol?= Date: Wed, 31 Aug 2022 14:15:37 +0200 Subject: [PATCH 13/15] Update CHANGELOG.md Co-authored-by: Phil Ewels --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0232b58c8..11cdbf0683 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # nf-core/tools: Changelog -## [v2.5 - Gold Otter Patch](https://github.com/nf-core/tools/releases/tag/2.5) - [2022-08-31] +## [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)) From 8d9bae6d8dd0a78b9a40e2f6cfe40ddb16dbfa2a Mon Sep 17 00:00:00 2001 From: fabianegli Date: Tue, 30 Aug 2022 17:39:37 +0200 Subject: [PATCH 14/15] be compliant with black defaults --- nf_core/pipeline-template/bin/check_samplesheet.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nf_core/pipeline-template/bin/check_samplesheet.py b/nf_core/pipeline-template/bin/check_samplesheet.py index 9a8b896239..6e778747c0 100755 --- a/nf_core/pipeline-template/bin/check_samplesheet.py +++ b/nf_core/pipeline-template/bin/check_samplesheet.py @@ -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 @@ -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() From 9d30b2b26423ffffd4355fbf3842faf8b59a1774 Mon Sep 17 00:00:00 2001 From: fabianegli Date: Tue, 30 Aug 2022 18:00:03 +0200 Subject: [PATCH 15/15] remove unnecessary f-string --- nf_core/pipeline-template/bin/check_samplesheet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/pipeline-template/bin/check_samplesheet.py b/nf_core/pipeline-template/bin/check_samplesheet.py index 6e778747c0..11b155723a 100755 --- a/nf_core/pipeline-template/bin/check_samplesheet.py +++ b/nf_core/pipeline-template/bin/check_samplesheet.py @@ -159,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