From b5fa0fac30a79e890e8a481d6365306961d3ab4e Mon Sep 17 00:00:00 2001 From: Ruben Vorderman Date: Mon, 4 Mar 2024 15:50:17 +0100 Subject: [PATCH 1/5] Add 3.12 python support, drop 3.7 support --- .github/workflows/ci.yml | 6 +++--- HISTORY.rst | 10 +++++----- setup.py | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0b90645c..49b9f3f4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: python-version: - - "3.7" + - "3.8" steps: - uses: actions/checkout@v2.3.4 - name: Set up Python ${{ matrix.python-version }} @@ -42,11 +42,11 @@ jobs: strategy: matrix: python-version: - - "3.7" - "3.8" - "3.9" - "3.10" - "3.11" + - "3.12" steps: - uses: actions/checkout@v2.3.4 - name: Set up Python ${{ matrix.python-version }} @@ -64,7 +64,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.7"] + python-version: ["3.8"] test-program: [snakemake, miniwdl] steps: - uses: actions/checkout@v2.3.4 diff --git a/HISTORY.rst b/HISTORY.rst index 3671b423..e0a8ee69 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,11 +2,6 @@ Changelog ========== -version 2.0.2 ---------------------------- -+ Fixed a bug where pytest 8.1+ would raise a ``PluginValidationError`` because - the hook ``pytest_collect_file()`` has finally dropped the deprecated - argument ``path`` from its specification. .. Newest changes should be on top. @@ -15,6 +10,11 @@ version 2.0.2 version 2.1.0-dev --------------------------- ++ Python version 3.7 support is dropped because it is deprecated. Python + version 3.12 was added. ++ Fixed a bug where pytest 8.1+ would raise a ``PluginValidationError`` because + the hook ``pytest_collect_file()`` has finally dropped the deprecated + argument ``path`` from its specification. + Add extract_md5sum check on uncompressed contents of compressed output files. Gzipped files contain a timestamp which makes it hard to directly compare the md5sums of gzipped files. diff --git a/setup.py b/setup.py index e4de914f..f36faf0d 100644 --- a/setup.py +++ b/setup.py @@ -39,11 +39,11 @@ classifiers=[ "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: " "GNU Affero General Public License v3 or later (AGPLv3+)", From 87a6eeba09ffa70da77cc5aa238c4178a376c726 Mon Sep 17 00:00:00 2001 From: Ruben Vorderman Date: Mon, 4 Mar 2024 15:53:56 +0100 Subject: [PATCH 2/5] Fix line length error --- src/pytest_workflow/plugin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pytest_workflow/plugin.py b/src/pytest_workflow/plugin.py index fe90fe7f..142c715b 100644 --- a/src/pytest_workflow/plugin.py +++ b/src/pytest_workflow/plugin.py @@ -121,7 +121,8 @@ def pytest_collect_file(file_path, parent): """Collection hook This collects the yaml files that start with "test" and end with .yaml or .yml""" - if file_path.suffix in [".yml", ".yaml"] and file_path.name.startswith("test"): + if (file_path.suffix in [".yml", ".yaml"] and + file_path.name.startswith("test")): return YamlFile.from_parent(parent, path=file_path) return None From ae51d3b759bcd71418b54e071513f11a116b14a1 Mon Sep 17 00:00:00 2001 From: Ruben Vorderman Date: Mon, 4 Mar 2024 16:07:56 +0100 Subject: [PATCH 3/5] Fix the unstable api of snakemake to work again Removing a command line flag, and also switching error output again to stderr. --- tests/functional/simple_snakefile_test_cases.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/functional/simple_snakefile_test_cases.yml b/tests/functional/simple_snakefile_test_cases.yml index 0ca2f666..c110672e 100644 --- a/tests/functional/simple_snakefile_test_cases.yml +++ b/tests/functional/simple_snakefile_test_cases.yml @@ -1,26 +1,26 @@ - name: test-dry-run - command: snakemake -n -r -p -s SimpleSnakefile --config N_LINES_TO_READ=1 + command: snakemake -n -p -s SimpleSnakefile --config N_LINES_TO_READ=1 - name: test-config-missing - command: snakemake -n -r -p -s SimpleSnakefile + command: snakemake -n -p -s SimpleSnakefile exit_code: 1 - stdout: + stderr: contains: - "You must set --config N_LINES_TO_READ=." - name: test-config-wrong-type - command: snakemake -n -r -p -s SimpleSnakefile --config N_LINES_TO_READ=one + command: snakemake -n -p -s SimpleSnakefile --config N_LINES_TO_READ=one exit_code: 1 - stdout: + stderr: contains: - "N_LINES_TO_READ must be an integer." - name: test-config-invalid-value - command: snakemake -n -r -p -s SimpleSnakefile --config N_LINES_TO_READ=-1 + command: snakemake -n -p -s SimpleSnakefile --config N_LINES_TO_READ=-1 exit_code: 1 - stdout: + stderr: contains: - "N_LINES_TO_READ must at least be 1." - name: test-snakemake-run command: >- - snakemake --cores 1 -r -p -s SimpleSnakefile --config N_LINES_TO_READ=500 + snakemake --cores 1 -p -s SimpleSnakefile --config N_LINES_TO_READ=500 files: - path: rand/0.txt - path: rand/1.txt From 71f621b377278624de16e0ce077b2a2956ede160 Mon Sep 17 00:00:00 2001 From: Ruben Vorderman Date: Mon, 4 Mar 2024 16:16:31 +0100 Subject: [PATCH 4/5] Require a higher python version in python_requires --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index f36faf0d..6d46308e 100644 --- a/setup.py +++ b/setup.py @@ -49,8 +49,8 @@ "GNU Affero General Public License v3 or later (AGPLv3+)", "Framework :: Pytest", ], - # Because we cannot test anymore on Python 3.6. - python_requires=">=3.7", + # Because we cannot test anymore on Python 3.8. + python_requires=">=3.8", install_requires=[ "pytest>=7.0.0", # To use pathlib Path's in pytest "pyyaml", From 40857b2a96f3330a5378cd4acf22d276d0a4f902 Mon Sep 17 00:00:00 2001 From: Ruben Vorderman Date: Mon, 4 Mar 2024 16:16:48 +0100 Subject: [PATCH 5/5] Test snakemake on required 3.11 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 49b9f3f4..d0998f27 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,7 +64,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8"] + python-version: ["3.11"] test-program: [snakemake, miniwdl] steps: - uses: actions/checkout@v2.3.4