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