Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 3.12 python support, drop 3.7 support #190

Merged
merged 5 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand All @@ -64,7 +64,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7"]
python-version: ["3.11"]
test-program: [snakemake, miniwdl]
steps:
- uses: actions/checkout@v2.3.4
Expand Down
10 changes: 5 additions & 5 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,18 @@
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+)",
"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",
Expand Down
3 changes: 2 additions & 1 deletion src/pytest_workflow/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
16 changes: 8 additions & 8 deletions tests/functional/simple_snakefile_test_cases.yml
Original file line number Diff line number Diff line change
@@ -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=<a value>."
- 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
Expand Down
Loading