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

Latest version does not work due to pytest deprecation #122

Closed
Redmar-van-den-Berg opened this issue Dec 17, 2020 · 1 comment
Closed

Latest version does not work due to pytest deprecation #122

Redmar-van-den-Berg opened this issue Dec 17, 2020 · 1 comment

Comments

@Redmar-van-den-Berg
Copy link
Collaborator

It looks like pytest has deprecated a function that is used by pytest-workflow, which causes a fresh conda install of pytest-workflow 1.5 to fail.

Either with this deprecation error:

=================================================== test session starts ===================================================
platform linux -- Python 3.9.1, pytest-6.1.1, py-1.10.0, pluggy-0.13.1
rootdir: /
plugins: workflow-1.2.0
collecting ... 
collected 0 items / 1 error                                                                                               

========================================================= ERRORS ==========================================================
______________________________________________ ERROR collecting test session ______________________________________________
Direct construction of YamlFile has been deprecated, please use YamlFile.from_parent.
See https://docs.pytest.org/en/stable/deprecations.html#node-construction-changed-to-node-from-parent for more details.
================================================= short test summary info =================================================
ERROR 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
==================================================== 1 error in 0.48s =====================================================

Or by skipping all tests

test-sanity-snakemake:
	command:   snakemake --version

	directory: /tmp/pytest_workflow_70c8pejs/test-sanity-snakemake
	stdout:    /tmp/pytest_workflow_70c8pejs/test-sanity-snakemake/log.out
	stderr:    /tmp/pytest_workflow_70c8pejs/test-sanity-snakemake/log.err
'test-sanity-snakemake' python error during starting.
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/pytest-wf-latest/lib/python3.9/site-packages/_pytest/main.py", line 269, in wrap_session
INTERNALERROR>     session.exitstatus = doit(config, session) or 0
INTERNALERROR>   File "/pytest-wf-latest/lib/python3.9/site-packages/_pytest/main.py", line 323, in _main
INTERNALERROR>     config.hook.pytest_runtestloop(session=session)
INTERNALERROR>   File "/pytest-wf-latest/lib/python3.9/site-packages/pluggy/hooks.py", line 286, in __call__
INTERNALERROR>     return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR>   File "/pytest-wf-latest/lib/python3.9/site-packages/pluggy/manager.py", line 93, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/pytest-wf-latest/lib/python3.9/site-packages/pluggy/manager.py", line 84, in <lambda>
INTERNALERROR>     self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
INTERNALERROR>   File "/pytest-wf-latest/lib/python3.9/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/pytest-wf-latest/lib/python3.9/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/pytest-wf-latest/lib/python3.9/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/pytest-wf-latest/lib/python3.9/site-packages/pytest_workflow/plugin.py", line 259, in pytest_runtestloop
INTERNALERROR>     session.config.workflow_queue.process(  # type: ignore
INTERNALERROR>   File "/pytest-wf-latest/lib/python3.9/site-packages/pytest_workflow/workflow.py", line 196, in process
INTERNALERROR>     raise self._process_errors[0]
INTERNALERROR>   File "/pytest-wf-latest/lib/python3.9/site-packages/pytest_workflow/workflow.py", line 84, in start
INTERNALERROR>     self._popen = subprocess.Popen(  # nosec: Shell is not enabled. # noqa
INTERNALERROR>   File "/pytest-wf-latest/lib/python3.9/subprocess.py", line 947, in __init__
INTERNALERROR>     self._execute_child(args, executable, preexec_fn, close_fds,
INTERNALERROR>   File "/pytest-wf-latest/lib/python3.9/subprocess.py", line 1819, in _execute_child
INTERNALERROR>     raise child_exception_type(errno_num, err_msg, err_filename)
INTERNALERROR> FileNotFoundError: [Errno 2] No such file or directory: 'snakemake'
 Removing temporary directories and logs. Use '--kwd' or '--keep-workflow-wd' to disable this behaviour.
================================================== no tests ran in 0.32s ==================================================

@rhpvorderman
Copy link
Member

There must be something incorrect with your channel priority in conda.
As your log states:

platform linux -- Python 3.9.1, pytest-6.1.1, py-1.10.0, pluggy-0.13.1
rootdir: /
plugins: workflow-1.2.0

Emphasis mine. Pytest-workflow-1.2.0 is the latest version on bioconda. This contains code deprecated by pytest. The issue was fixed in 1.3.0. When installing with conda-forge as the top-channel, the 1.5.0 version should be installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants