From eb72f09b0923fa325a1935f13fcbc5626c241373 Mon Sep 17 00:00:00 2001 From: mashehu Date: Thu, 11 Jul 2024 14:10:34 +0200 Subject: [PATCH 1/4] update to pytest 8 and move it to dev requirements --- requirements-dev.txt | 3 ++- requirements.txt | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index ebfbb530d3..2c7bb0c8cf 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -7,7 +7,6 @@ ruff Sphinx sphinx-rtd-theme textual-dev==1.5.1 -mypy types-PyYAML types-requests types-jsonschema @@ -16,4 +15,6 @@ types-PyYAML types-requests types-setuptools pytest-textual-snapshot==0.4.0 +pytest-workflow>=2.0.0 +pytest>=8.0.0 ruff diff --git a/requirements.txt b/requirements.txt index ccfc1bc9c1..524b739e89 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,8 +11,6 @@ pdiff pre-commit prompt_toolkit>=3.0.3 pydantic>=2.2.1 -pytest-workflow>=2.0.0 -pytest>=7.0.0 pyyaml questionary>=1.8.0 refgenie From 66c8ca5e9d16435e8fc8a8077666af7d61ff9cbb Mon Sep 17 00:00:00 2001 From: mashehu Date: Thu, 11 Jul 2024 14:10:42 +0200 Subject: [PATCH 2/4] fix deprecation warning --- nf_core/pipelines/download.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nf_core/pipelines/download.py b/nf_core/pipelines/download.py index 8454f894a2..24de045a68 100644 --- a/nf_core/pipelines/download.py +++ b/nf_core/pipelines/download.py @@ -20,7 +20,7 @@ import rich import rich.progress from git.exc import GitCommandError, InvalidGitRepositoryError -from pkg_resources import parse_version as version_parser +from setuptools._distutils.version import LooseVersion as VersionParser import nf_core import nf_core.pipelines.list @@ -1693,7 +1693,7 @@ def tidy_tags_and_branches(self): else: # desired revisions may contain arbitrary branch names that do not correspond to valid sematic versioning patterns. valid_versions = [ - version_parser(v) + VersionParser(v) for v in desired_revisions if re.match(r"\d+\.\d+(?:\.\d+)*(?:[\w\-_])*", v) ] From 66be4a0a52390d2637eafda4e702bc97d3016a73 Mon Sep 17 00:00:00 2001 From: mashehu Date: Thu, 11 Jul 2024 14:10:42 +0200 Subject: [PATCH 3/4] fix deprecation warning --- nf_core/pipelines/download.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/nf_core/pipelines/download.py b/nf_core/pipelines/download.py index 8454f894a2..43b63d8192 100644 --- a/nf_core/pipelines/download.py +++ b/nf_core/pipelines/download.py @@ -20,7 +20,7 @@ import rich import rich.progress from git.exc import GitCommandError, InvalidGitRepositoryError -from pkg_resources import parse_version as version_parser +from packaging.version import Version import nf_core import nf_core.pipelines.list @@ -1693,13 +1693,11 @@ def tidy_tags_and_branches(self): else: # desired revisions may contain arbitrary branch names that do not correspond to valid sematic versioning patterns. valid_versions = [ - version_parser(v) - for v in desired_revisions - if re.match(r"\d+\.\d+(?:\.\d+)*(?:[\w\-_])*", v) + Version(v) for v in desired_revisions if re.match(r"\d+\.\d+(?:\.\d+)*(?:[\w\-_])*", v) ] # valid versions sorted in ascending order, last will be aliased as "latest". latest = sorted(valid_versions)[-1] - self.repo.create_head("latest", latest) + self.repo.create_head("latest", str(latest)) self.checkout(latest) if self.repo.head.is_detached: self.repo.head.reset(index=True, working_tree=True) From ed64d5415e22def0d6abc8fc4a9b142d00a3f8b7 Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Thu, 11 Jul 2024 12:31:13 +0000 Subject: [PATCH 4/4] [automated] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c2f5d99df..706d155d27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,6 +47,7 @@ - update output_dir for api docs to new website structure ([#3051](https://github.com/nf-core/tools/pull/3051)) - Update pre-commit hook astral-sh/ruff-pre-commit to v0.5.1 ([#3052](https://github.com/nf-core/tools/pull/3052)) - update api docs to new structure ([#3054](https://github.com/nf-core/tools/pull/3054)) +- Update to pytest v8 and move it to dev dependencies ([#3058](https://github.com/nf-core/tools/pull/3058)) ## [v2.14.1 - Tantalum Toad - Patch](https://github.com/nf-core/tools/releases/tag/2.14.1) - [2024-05-09]