-
Notifications
You must be signed in to change notification settings - Fork 386
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
1.13.6: pytest is failing (relaxed jupyter_packaging
dependencies)
#906
Comments
Hi @kloczek , thank you for the report! First I have a question for you - would you be interested in automating the build of the RPM package? Do you think we could do this on our CI with an appropriate GitHub action? Hopefully that could spare you some time and also I guess I would break less often the RPM packaging process 😄 Regarding the test failures, I think the current conditions for skipping some tests are not appropriate for your environment. In particular I see these two errors:
|
Hi @kloczek , I have tried to fix a few of the failures in this branch - can you tell me if you still see issues with that branch? Regarding the version of |
I have already such automation 😄
WIll check that ASP. Thank you 😄 |
FYI I have merged this into
Well maybe it is already a good thing if this work on the Linux distribution made available on GitHub actions? |
Just tested 1.13.7. + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-jupytext-1.13.7-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-jupytext-1.13.7-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.12, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupytext-1.13.7, configfile: pyproject.toml
plugins: anyio-3.3.4, black-0.3.12
collected 2731 items
tests/test_active_cells.py ............................ [ 1%]
tests/test_auto_ext.py ...............................................................x.s....................... [ 4%]
tests/test_black.py ...sss....... [ 4%]
tests/test_cell_id.py . [ 4%]
tests/test_cell_markers.py .. [ 4%]
tests/test_cell_metadata.py ............................................................ [ 7%]
tests/test_cells.py ................ [ 7%]
tests/test_changelog.py ... [ 7%]
tests/test_cli.py .................................................................................................................................................. [ 13%]
..........ssssss........................................sssssssssssssss........................................................................................ss... [ 19%]
s........................................................................ssssssss...s......s................. [ 23%]
tests/test_cli_check.py .. [ 23%]
tests/test_cli_config.py ........... [ 23%]
tests/test_cm_config.py .............. [ 24%]
tests/test_combine.py .................................................... [ 25%]
tests/test_compare.py ..................... [ 26%]
tests/test_config.py .................. [ 27%]
tests/test_contentsmanager.py ...................................................ssssssssssssssssssssssss........................................................... [ 32%]
.................................................................................................................................................................... [ 38%]
......................................................................................................................................F..s.......................... [ 44%]
...........ss [ 44%]
tests/test_custom_cell_magics.py . [ 44%]
tests/test_doc_files_are_notebooks.py ............... [ 45%]
tests/test_doxygen.py .......... [ 45%]
tests/test_escape_magics.py ................................................................................ [ 48%]
tests/test_execute.py ssssssssFF [ 49%]
tests/test_formats.py .........................s........ [ 50%]
tests/test_header.py .......... [ 50%]
tests/test_hide_remove_input_outputs_rmarkdown.py ........ [ 50%]
tests/test_invalid_file.py ... [ 51%]
tests/test_ipynb_to_R.py .... [ 51%]
tests/test_ipynb_to_myst.py .......ss... [ 51%]
tests/test_ipynb_to_py.py .................... [ 52%]
tests/test_ipynb_to_rmd.py ........................ [ 53%]
tests/test_isort.py s [ 53%]
tests/test_jupytext_errors.py .. [ 53%]
tests/test_jupytext_nbconvert_round_trip.py ....................... [ 54%]
tests/test_jupytext_read.py .. [ 54%]
tests/test_knitr_spin.py . [ 54%]
tests/test_load_multiple.py .. [ 54%]
tests/test_markdown_in_code_cells.py .... [ 54%]
tests/test_metadata_filter.py ................. [ 55%]
tests/test_metadata_filters_from_config.py . [ 55%]
tests/test_mirror.py ............................................................................................................................................... [ 60%]
............................................................................................ssssssssssssssssssssssss............................................ssss [ 66%]
sssssss...............ss..................................................................................................... [ 71%]
tests/test_nbformat_version.py ....... [ 71%]
tests/test_paired_paths.py ...................... [ 72%]
tests/test_pep8.py .............................................................................................................................. [ 76%]
tests/test_pre_commit_0_ipynb_to_py.py s [ 76%]
tests/test_pre_commit_1_sync.py s [ 76%]
tests/test_pre_commit_1_sync_with_config.py s [ 76%]
tests/test_pre_commit_2_sync_nbstripout.py s [ 76%]
tests/test_pre_commit_3_sync_black_nbstripout.py s [ 76%]
tests/test_pre_commit_4_sync_execute.py s [ 76%]
tests/test_pre_commit_5_reformat_markdown.py s [ 76%]
tests/test_pre_commit_mode.py ............ [ 77%]
tests/test_pre_commit_scripts.py ....s..s [ 77%]
tests/test_preserve_empty_cells.py ....... [ 77%]
tests/test_pytest.py .. [ 78%]
tests/test_raw_strings.py ......... [ 78%]
tests/test_read_all_py.py ..................................................................................................................... [ 82%]
tests/test_read_dotnet_try_markdown.py ... [ 82%]
tests/test_read_empty_text_notebook.py ........................s........... [ 84%]
tests/test_read_folding_markers.py ..... [ 84%]
tests/test_read_incomplete_rmd.py ... [ 84%]
tests/test_read_simple_R.py ............ [ 84%]
tests/test_read_simple_clojure.py . [ 84%]
tests/test_read_simple_csharp.py ....... [ 85%]
tests/test_read_simple_groovy.py . [ 85%]
tests/test_read_simple_hydrogen.py ....... [ 85%]
tests/test_read_simple_ipynb.py . [ 85%]
tests/test_read_simple_java.py . [ 85%]
tests/test_read_simple_julia.py . [ 85%]
tests/test_read_simple_markdown.py .................................... [ 86%]
tests/test_read_simple_matlab.py .. [ 86%]
tests/test_read_simple_nomarker.py .. [ 86%]
tests/test_read_simple_ocaml.py .. [ 87%]
tests/test_read_simple_pandoc.py ssss. [ 87%]
tests/test_read_simple_percent.py ...................... [ 88%]
tests/test_read_simple_python.py ................................................ [ 89%]
tests/test_read_simple_quarto.py s [ 89%]
tests/test_read_simple_rmd.py .......... [ 90%]
tests/test_read_simple_rust.py ... [ 90%]
tests/test_read_simple_scheme.py . [ 90%]
tests/test_read_simple_sphinx.py ... [ 90%]
tests/test_read_write_functions.py ..... [ 90%]
tests/test_remove_encoding.py . [ 90%]
tests/test_rmd_to_ipynb.py ...... [ 90%]
tests/test_save_multiple.py ..................................................... [ 92%]
tests/test_stringparser.py .... [ 92%]
tests/test_trust_notebook.py ................................................. [ 94%]
tests/test_unicode.py ................................ [ 95%]
tests/test_using_cli.py F [ 95%]
tests/test_write_does_not_modify_notebook.py .............................................................................................................. [100%]
================================================================================= FAILURES =================================================================================
_________________________ test_python_kernel_preserves_R_files[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.7/tests/notebooks/R/simple_r_script.R] __________________________
nb_file = '/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.7/tests/notebooks/R/simple_r_script.R'
tmpdir = local('/tmp/pytest-of-tkloczko/pytest-0/test_python_kernel_preserves_R0')
@pytest.mark.parametrize("nb_file", list_notebooks("R"))
def test_python_kernel_preserves_R_files(nb_file, tmpdir):
"""Opening a R file with a Jupyter server that has no R kernel should not modify the file"""
tmp_r_file = str(tmpdir.join("script.R"))
with open(nb_file) as fp:
script = fp.read()
with open(tmp_r_file, "w") as fp:
fp.write(script)
# create contents manager
cm = jupytext.TextFileContentsManager()
cm.root_dir = str(tmpdir)
# open notebook, set Python kernel and save
model = cm.get("script.R")
> model["content"].metadata["kernelspec"] = kernelspec_from_language("python")
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.7/tests/test_contentsmanager.py:1233:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
language = 'python'
def kernelspec_from_language(language):
"""Return the python kernel that matches the current env, or the first kernel that matches the given language"""
if language == "python":
# Return the kernel that matches the current Python executable
for name in find_kernel_specs():
kernel_specs = get_kernel_spec(name)
cmd = kernel_specs.argv[0]
if (
kernel_specs.language == "python"
and os.path.isfile(cmd)
and os.path.samefile(cmd, sys.executable)
):
return {
"name": name,
"language": language,
"display_name": kernel_specs.display_name,
}
> raise ValueError(
"No kernel found that matches the current python executable {}\n".format(
sys.executable
)
+ "Install one with 'python -m ipykernel install --name kernel_name [--user]'"
)
E ValueError: No kernel found that matches the current python executable /usr/bin/python3
E Install one with 'python -m ipykernel install --name kernel_name [--user]'
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.7/jupytext/kernels.py:46: ValueError
_____________________________________________________________ test_execute_text_file_does_update_the_metadata ______________________________________________________________
sample_md_notebook = "---\njupyter:\n jupytext:\n text_representation:\n extension: .md\n format_name: markdown\n format_version: '1.1'\n jupytext_version: 1.1.0\n---\n\n```python\n1 + 1\n```\n"
tmp_path = PosixPath('/tmp/pytest-of-tkloczko/pytest-0/test_execute_text_file_does_up0')
def test_execute_text_file_does_update_the_metadata(sample_md_notebook, tmp_path):
md_file = tmp_path / "nb.md"
md_file.write_text(sample_md_notebook)
> jupytext([str(md_file), "--execute"])
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.7/tests/test_execute.py:270:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.7/jupytext/cli.py:488: in jupytext
exit_code += jupytext_single_file(nb_file, args, log)
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.7/jupytext/cli.py:588: in jupytext_single_file
kernelspec = kernelspec_from_language(language)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
language = 'python'
def kernelspec_from_language(language):
"""Return the python kernel that matches the current env, or the first kernel that matches the given language"""
if language == "python":
# Return the kernel that matches the current Python executable
for name in find_kernel_specs():
kernel_specs = get_kernel_spec(name)
cmd = kernel_specs.argv[0]
if (
kernel_specs.language == "python"
and os.path.isfile(cmd)
and os.path.samefile(cmd, sys.executable)
):
return {
"name": name,
"language": language,
"display_name": kernel_specs.display_name,
}
> raise ValueError(
"No kernel found that matches the current python executable {}\n".format(
sys.executable
)
+ "Install one with 'python -m ipykernel install --name kernel_name [--user]'"
)
E ValueError: No kernel found that matches the current python executable /usr/bin/python3
E Install one with 'python -m ipykernel install --name kernel_name [--user]'
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.7/jupytext/kernels.py:46: ValueError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
[jupytext] Reading /tmp/pytest-of-tkloczko/pytest-0/test_execute_text_file_does_up0/nb.md in format md
______________________________________________________________ test_cat_execute_does_not_update_the_metadata _______________________________________________________________
sample_md_notebook = "---\njupyter:\n jupytext:\n text_representation:\n extension: .md\n format_name: markdown\n format_version: '1.1'\n jupytext_version: 1.1.0\n---\n\n```python\n1 + 1\n```\n"
tmp_path = PosixPath('/tmp/pytest-of-tkloczko/pytest-0/test_cat_execute_does_not_upda0')
def test_cat_execute_does_not_update_the_metadata(sample_md_notebook, tmp_path):
md_file = tmp_path / "nb.md"
md_file.write_text(sample_md_notebook)
# read md notebook on stdin - this does the same as
# cat notebook.md | jupytext --execute
with open(md_file) as fp, mock.patch("sys.stdin", fp):
> jupytext(["--execute"])
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.7/tests/test_execute.py:284:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.7/jupytext/cli.py:488: in jupytext
exit_code += jupytext_single_file(nb_file, args, log)
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.7/jupytext/cli.py:588: in jupytext_single_file
kernelspec = kernelspec_from_language(language)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
language = 'python'
def kernelspec_from_language(language):
"""Return the python kernel that matches the current env, or the first kernel that matches the given language"""
if language == "python":
# Return the kernel that matches the current Python executable
for name in find_kernel_specs():
kernel_specs = get_kernel_spec(name)
cmd = kernel_specs.argv[0]
if (
kernel_specs.language == "python"
and os.path.isfile(cmd)
and os.path.samefile(cmd, sys.executable)
):
return {
"name": name,
"language": language,
"display_name": kernel_specs.display_name,
}
> raise ValueError(
"No kernel found that matches the current python executable {}\n".format(
sys.executable
)
+ "Install one with 'python -m ipykernel install --name kernel_name [--user]'"
)
E ValueError: No kernel found that matches the current python executable /usr/bin/python3
E Install one with 'python -m ipykernel install --name kernel_name [--user]'
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.7/jupytext/kernels.py:46: ValueError
_____________________________________________________________ test_jupytext_commands_in_the_documentation_work _____________________________________________________________
tmpdir = local('/tmp/pytest-of-tkloczko/pytest-0/test_jupytext_commands_in_the_0')
@requires_black
@requires_myst
@pytest.mark.skipif(
not os.path.isdir(doc_path), reason="Documentation folder is missing"
)
def test_jupytext_commands_in_the_documentation_work(tmpdir):
# Read the documentation as a bash notebook
using_cli = os.path.join(doc_path, "using-cli.md")
assert os.path.isfile(using_cli)
using_cli_nb = jupytext.read(using_cli)
# Run the commands in tmpdir on a sample notebook
jupytext.write(
new_notebook(cells=[new_code_cell("1+1")]), str(tmpdir.join("notebook.ipynb"))
)
os.chdir(str(tmpdir))
cmd_tested = 0
for cell in using_cli_nb.cells:
if cell.cell_type != "code":
continue
if not cell.source.startswith("jupytext"):
continue
for cmd in cell.source.splitlines():
if not cmd.startswith("jupytext"):
continue
# Do not test commands that involve reading a notebook from stdin
if "read ipynb from stdin" in cmd:
continue
# We can't run pytest inside pytest
if "pytest {}" in cmd:
continue
# We need to remove the comments that may follow the jupytext command
if "#" in cmd:
left, comment = cmd.rsplit("#", 1)
if '"' not in comment:
cmd = left
print(f"Testing: {cmd}")
args = shlex.split(cmd)[1:]
> assert not jupytext_cli(args), cmd
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.7/tests/test_using_cli.py:58:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.7/jupytext/cli.py:488: in jupytext
exit_code += jupytext_single_file(nb_file, args, log)
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.7/jupytext/cli.py:588: in jupytext_single_file
kernelspec = kernelspec_from_language(language)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
language = 'python'
def kernelspec_from_language(language):
"""Return the python kernel that matches the current env, or the first kernel that matches the given language"""
if language == "python":
# Return the kernel that matches the current Python executable
for name in find_kernel_specs():
kernel_specs = get_kernel_spec(name)
cmd = kernel_specs.argv[0]
if (
kernel_specs.language == "python"
and os.path.isfile(cmd)
and os.path.samefile(cmd, sys.executable)
):
return {
"name": name,
"language": language,
"display_name": kernel_specs.display_name,
}
> raise ValueError(
"No kernel found that matches the current python executable {}\n".format(
sys.executable
)
+ "Install one with 'python -m ipykernel install --name kernel_name [--user]'"
)
E ValueError: No kernel found that matches the current python executable /usr/bin/python3
E Install one with 'python -m ipykernel install --name kernel_name [--user]'
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.7/jupytext/kernels.py:46: ValueError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
Testing: jupytext --to py notebook.ipynb
[jupytext] Reading notebook.ipynb in format ipynb
[jupytext] Writing notebook.py
Testing: jupytext --to py:percent notebook.ipynb
[jupytext] Reading notebook.ipynb in format ipynb
[jupytext] Writing notebook.py in format py:percent (destination file replaced)
Testing: jupytext --to py:percent --opt comment_magics=false notebook.ipynb
[jupytext] Reading notebook.ipynb in format ipynb
[jupytext] Writing notebook.py in format py:percent (destination file replaced)
Testing: jupytext --to markdown notebook.ipynb
[jupytext] Reading notebook.ipynb in format ipynb
[jupytext] Writing notebook.md
Testing: jupytext --output script.py notebook.ipynb
[jupytext] Reading notebook.ipynb in format ipynb
[jupytext] Writing script.py
Testing: jupytext --to notebook notebook.py
[jupytext] Reading notebook.py in format py
[jupytext] Writing notebook.ipynb (destination file replaced [use --update to preserve cell outputs and ids])
Testing: jupytext --update --to notebook notebook.py
[jupytext] Reading notebook.py in format py
Testing: jupytext --to md --test notebook.ipynb
[jupytext] Reading notebook.ipynb in format ipynb
Testing: jupytext --to md --output - notebook.ipynb
---
jupyter:
jupytext:
comment_magics: false
main_language: python
text_representation:
extension: .md
format_name: markdown
format_version: '1.3'
jupytext_version: 1.13.7
---
```python
1+1 Testing: jupytext --set-formats ipynb,py notebook.ipynb tests/test_cli.py::test_format_prefix_suffix tests/test_contentsmanager.py: 48 warnings -- Docs: https://docs.pytest.org/en/stable/warnings.html
|
Ha ha thank you @kloczek! And I see that three of them are tests that I just added in the latest release... I really need to add an entry on the CI that will test the package in the absence of a kernel. |
So should I add |
Well you don't need to (I prefer to fix the test requirements and make sure we skip the tests that cannot succeed). But if you want to, that will increase the coverage. What you need to do is to make sure
By the way I have integrated on |
Looks like something has changes iin 1.14.2 and now pytest is failing in new way + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-jupytext-1.14.2-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-jupytext-1.14.2-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra --deselect tests/test_contentsmanager.py::test_python_kernel_preserves_R_files --deselect tests/test_execute.py::test_cat_execute_does_not_update_the_metadata --deselect tests/test_execute.py::test_execute_text_file_does_update_the_metadata --deselect tests/test_using_cli.py::test_jupytext_commands_in_the_documentation_work
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.15, pytest-7.2.0, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupytext-1.14.2, configfile: pytest.ini
plugins: anyio-3.6.2, black-0.3.12
collected 2839 items / 4 deselected / 2835 selected
tests/test_active_cells.py ............................ [ 0%]
tests/test_auto_ext.py .................................................................x.s........................ [ 4%]
tests/test_black.py ...sss....... [ 4%]
tests/test_cell_id.py . [ 4%]
tests/test_cell_markers.py .. [ 4%]
tests/test_cell_metadata.py ............................................................ [ 6%]
tests/test_cells.py ................ [ 7%]
tests/test_changelog.py ... [ 7%]
tests/test_cli.py ................................................^C
[tkloczko@pers-jacek SPECS]$
============================================================================= warnings summary =============================================================================
jupytext/cell_reader.py:20
/home/tkloczko/rpmbuild/BUILD/jupytext-1.14.2/jupytext/cell_reader.py:20: UserWarning: Sphinx Gallery in version 0.11.1 is not supported by Jupytext. Please use sphinx-gallery<=0.7.0 instead. If that is an issue, feel free to report it at https://github.com/mwouts/jupytext/issues, or even better, prepare a PR to handle the new signature of sphinx_gallery.notebook.rst2md.
warnings.warn(
../../../../../usr/lib/python3.8/site-packages/notebook/nbextensions.py:15
/usr/lib/python3.8/site-packages/notebook/nbextensions.py:15: DeprecationWarning: Jupyter is migrating its paths to use standard platformdirs
given by the platformdirs library. To remove this warning and
see the appropriate new directories, set the environment variable
`JUPYTER_PLATFORM_DIRS=1` and then run `jupyter --paths`.
The use of platformdirs will be the default in `jupyter_core` v6
from jupyter_core.paths import (
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================================= short test summary info ==========================================================================
SKIPPED [1] tests/test_auto_ext.py:36: No file_extension in language_info
SKIPPED [1] tests/test_black.py:68: autopep8 not found
SKIPPED [1] tests/test_black.py:79: flake8 not found
SKIPPED [1] tests/test_black.py:91: flake8 not found
XFAIL tests/test_auto_ext.py::test_auto_from_kernelspecs_works[/home/tkloczko/rpmbuild/BUILD/jupytext-1.14.2/tests/notebooks/ipynb_sage/sage_print_hello.ipynb] - reason: Sage notebooks have Python in their language_info metadata, see #727
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! KeyboardInterrupt !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
/home/tkloczko/rpmbuild/BUILD/jupytext-1.14.2/jupytext/magics.py:118: KeyboardInterrupt
(to show a full traceback on KeyboardInterrupt use --full-trace)
=================================================== 258 passed, 4 skipped, 4 deselected, 1 xfailed, 2 warnings in 9.35s ==================================================== |
Hello @kloczek, sorry about that! Just to confirm, is it the |
I really have no idea what test suite is does so giving you advices wouls be not proper 😋 |
* Default to LargeFileManager when base class is async * Python 3.6 is not found anymore on ubuntu-latest * flake8 was moved to github * Use skip rather than xfail #906
Does |
Yes it is (+/- one waring) ============================================================================= warnings summary =============================================================================
jupytext/cell_reader.py:20
/home/tkloczko/rpmbuild/BUILD/jupytext-1.14.4/jupytext/cell_reader.py:20: UserWarning: Sphinx Gallery in version 0.11.1 is not supported by Jupytext. Please use sphinx-gallery<=0.7.0 instead. If that is an issue, feel free to report it at https://github.com/mwouts/jupytext/issues, or even better, prepare a PR to handle the new signature of sphinx_gallery.notebook.rst2md.
warnings.warn(
../../../../../usr/lib/python3.8/site-packages/notebook/nbextensions.py:15
/usr/lib/python3.8/site-packages/notebook/nbextensions.py:15: DeprecationWarning: Jupyter is migrating its paths to use standard platformdirs
given by the platformdirs library. To remove this warning and
see the appropriate new directories, set the environment variable
`JUPYTER_PLATFORM_DIRS=1` and then run `jupyter --paths`.
The use of platformdirs will be the default in `jupyter_core` v6
from jupyter_core.paths import (
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================================= short test summary info ==========================================================================
SKIPPED [1] tests/test_auto_ext.py:43: Sage notebooks have Python in their language_info metadata, see #727
SKIPPED [1] tests/test_auto_ext.py:36: No file_extension in language_info
SKIPPED [1] tests/test_black.py:68: autopep8 not found
SKIPPED [1] tests/test_black.py:79: flake8 not found
SKIPPED [1] tests/test_black.py:91: flake8 not found
SKIPPED [2] tests/test_cli.py:439: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [2] tests/test_cli.py:454: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [2] tests/test_cli.py:470: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [15] tests/test_cli.py:559: pandoc>=2.11 is not available
SKIPPED [1] tests/test_cli.py:676: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [1] tests/test_cli.py:691: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [1] tests/test_cli.py:841: sphinx_gallery is not available
SKIPPED [1] tests/test_cli.py:1051: pandoc>=2.11 is not available
SKIPPED [5] tests/test_cli.py:1068: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [1] tests/test_cli.py:1139: pandoc>=2.11 is not available
SKIPPED [1] tests/test_cli.py:1259: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [17] tests/test_contentsmanager.py:180: pandoc>=2.11 is not available
SKIPPED [7] tests/test_contentsmanager.py:203: quarto>=0.2 is not available
SKIPPED [1] tests/test_contentsmanager.py:1219: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [1] tests/test_contentsmanager.py:1290: sphinx_gallery is not available
SKIPPED [2] tests/test_contentsmanager.py:1867: jupyterfs is not available
SKIPPED [1] tests/test_execute.py:18: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [1] tests/test_execute.py:48: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [1] tests/test_execute.py:79: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [1] tests/test_execute.py:99: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [1] tests/test_execute.py:118: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [1] tests/test_execute.py:143: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [1] tests/test_execute.py:163: irkernel is not installed
SKIPPED [1] tests/test_execute.py:185: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [1] tests/test_execute.py:266: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [1] tests/test_execute.py:278: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [1] tests/test_formats.py:350: pandoc>=2.11 is not available
SKIPPED [1] tests/test_ipynb_to_myst.py:162: myst is available
SKIPPED [1] tests/test_ipynb_to_myst.py:171: myst is available
SKIPPED [1] tests/test_isort.py:8: isort not found
SKIPPED [17] tests/test_mirror.py:132: pandoc>=2.11 is not available
SKIPPED [7] tests/test_mirror.py:141: quarto>=0.2 is not available
SKIPPED [11] tests/test_mirror.py:168: sphinx_gallery is not available
SKIPPED [1] tests/test_mirror.py:219: sphinx_gallery is not available
SKIPPED [1] tests/test_mirror.py:225: sphinx_gallery is not available
SKIPPED [1] tests/test_pre_commit_0_ipynb_to_py.py:16: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_1_sync.py:17: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_1_sync_with_config.py:14: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_1_sync_with_no_config.py:18: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_2_sync_nbstripout.py:14: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_3_sync_black_nbstripout.py:13: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_4_sync_execute.py:15: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_5_reformat_markdown.py:15: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_scripts.py:217: flake8 not found
SKIPPED [1] tests/test_pre_commit_scripts.py:334: pandoc>=2.11 is not available
SKIPPED [1] tests/test_read_empty_text_notebook.py:14: quarto is not available
SKIPPED [1] tests/test_read_simple_pandoc.py:12: pandoc>=2.11 is not available
SKIPPED [1] tests/test_read_simple_pandoc.py:34: pandoc>=2.11 is not available
SKIPPED [1] tests/test_read_simple_pandoc.py:49: pandoc>=2.11 is not available
SKIPPED [1] tests/test_read_simple_pandoc.py:63: pandoc>=2.11 is not available
SKIPPED [1] tests/test_read_simple_pandoc.py:81: Pandoc is installed
SKIPPED [1] tests/test_read_simple_quarto.py:9: quarto>=0.2 is not available
SKIPPED [1] tests/test_using_cli.py:15: Please run 'python -m ipykernel install --name python_kernel --user'
========================================================= 2716 passed, 134 skipped, 2 warnings in 88.27s (0:01:28) ========================================================= |
Feel free to close this ticket. |
I'm trying to package your module as an rpm package. So I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
build
with--no-isolation
I'm using during all processes only locally installed modulesBecause I'm trying to build all my packages only agains what is installed (
--no-isolation
) and I havejupyter-packaging
0.11.1 I've added the patch:I'm not sure is that caused that pytest is failing. Latest pytets shows at the end few minor warnings.
Here is pytest output:
Testing: jupytext --set-formats ipynb,py notebook.ipynb
[jupytext] Reading notebook.ipynb in format ipynb
[jupytext] Updating notebook metadata with '{"jupytext": {"formats": "ipynb,py"}}'
[jupytext] Updating notebook.ipynb
[jupytext] Updating notebook.py
Testing: jupytext --sync notebook.ipynb
[jupytext] Reading notebook.ipynb in format ipynb
[jupytext] Loading notebook.py
[jupytext] Updating the timestamp of notebook.py
Testing: jupytext --set-kernel - notebook.md
[jupytext] Reading notebook.md in format md
============================================================================= warnings summary =============================================================================
jupytext/cell_reader.py:20
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/cell_reader.py:20: UserWarning: Sphinx Gallery in version 0.10.1 is not supported by Jupytext. Please use sphinx-gallery<=0.7.0 instead. If that is an issue, feel free to report it at https://github.com/mwouts/jupytext/issues, or even better, prepare a PR to handle the new signature of sphinx_gallery.notebook.rst2md.
warnings.warn(
tests/test_cli.py::test_format_prefix_suffix
[warning] You might have passed a file name to the '--to' option, when a format description was expected. Maybe you want to use the '-o' option instead?
tests/test_contentsmanager.py: 48 warnings
[warning] GObject.GError is deprecated; use GLib.GError instead
-- Docs: https://docs.pytest.org/en/stable/warnings.html
========================================================================= short test summary info ==========================================================================
SKIPPED [1] tests/test_auto_ext.py:36: No file_extension in language_info
SKIPPED [1] tests/test_black.py:68: autopep8 not found
SKIPPED [1] tests/test_black.py:79: flake8 not found
SKIPPED [1] tests/test_cli.py:807: sphinx_gallery is not available
SKIPPED [1] tests/test_cli.py:1231: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [7] tests/test_contentsmanager.py:204: quarto>=0.2 is not available
SKIPPED [1] tests/test_contentsmanager.py:1290: sphinx_gallery is not available
SKIPPED [2] tests/test_contentsmanager.py:1867: jupyterfs is not available
SKIPPED [1] tests/test_execute.py:150: irkernel is not installed
SKIPPED [1] tests/test_ipynb_to_myst.py:162: myst is available
SKIPPED [1] tests/test_ipynb_to_myst.py:171: myst is available
SKIPPED [1] tests/test_isort.py:8: isort not found
SKIPPED [7] tests/test_mirror.py:141: quarto>=0.2 is not available
SKIPPED [11] tests/test_mirror.py:168: sphinx_gallery is not available
SKIPPED [1] tests/test_mirror.py:219: sphinx_gallery is not available
SKIPPED [1] tests/test_mirror.py:225: sphinx_gallery is not available
SKIPPED [1] tests/test_pre_commit_0_ipynb_to_py.py:16: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_1_sync.py:17: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_1_sync_with_config.py:14: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_2_sync_nbstripout.py:14: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_3_sync_black_nbstripout.py:13: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_4_sync_execute.py:15: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_5_reformat_markdown.py:15: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_scripts.py:219: flake8 not found
SKIPPED [1] tests/test_read_empty_text_notebook.py:14: quarto is not available
SKIPPED [1] tests/test_read_simple_pandoc.py:82: Pandoc is installed
SKIPPED [1] tests/test_read_simple_quarto.py:9: quarto>=0.2 is not available
XFAIL tests/test_auto_ext.py::test_auto_from_kernelspecs_works[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_sage/sage_print_hello.ipynb]
reason: Sage notebooks have Python in their language_info metadata, see #727
FAILED tests/test_black.py::test_apply_black_through_jupytext[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/Line_breaks_in_LateX_305.ipynb] - Fi...
FAILED tests/test_cli.py::test_set_kernel_inplace[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/python/light_sample.py] - ValueError: No kernel found tha...
FAILED tests/test_cli.py::test_set_kernel_inplace[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/python/python_notebook_sample.py] - ValueError: No kernel...
FAILED tests/test_cli.py::test_set_kernel_auto[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/python/light_sample.py] - ValueError: No kernel found that m...
FAILED tests/test_cli.py::test_set_kernel_auto[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/python/python_notebook_sample.py] - ValueError: No kernel fo...
FAILED tests/test_cli.py::test_set_kernel_works_with_pipes_326 - ValueError: No kernel found that matches the current python executable /usr/bin/python3
FAILED tests/test_cli.py::test_utf8_out_331 - ValueError: No kernel found that matches the current python executable /usr/bin/python3
FAILED tests/test_cli.py::test_create_header_with_set_formats_and_set_kernel[md] - ValueError: No kernel found that matches the current python executable /usr/bin/python3
FAILED tests/test_cli.py::test_create_header_with_set_formats_and_set_kernel[md:myst] - ValueError: No kernel found that matches the current python executable /usr/bin/p...
FAILED tests/test_cli.py::test_create_header_with_set_formats_and_set_kernel[md:pandoc] - ValueError: No kernel found that matches the current python executable /usr/bin...
FAILED tests/test_cli.py::test_create_header_with_set_formats_and_set_kernel[py:light] - ValueError: No kernel found that matches the current python executable /usr/bin/...
FAILED tests/test_cli.py::test_create_header_with_set_formats_and_set_kernel[py:percent] - ValueError: No kernel found that matches the current python executable /usr/bi...
FAILED tests/test_contentsmanager.py::test_python_kernel_preserves_R_files[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/R/simple_r_script.R] - ValueErro...
FAILED tests/test_execute.py::test_execute - ValueError: No kernel found that matches the current python executable /usr/bin/python3
FAILED tests/test_execute.py::test_execute_readme_ok - ValueError: No kernel found that matches the current python executable /usr/bin/python3
FAILED tests/test_execute.py::test_execute_readme_not_ok - ValueError: No kernel found that matches the current python executable /usr/bin/python3
FAILED tests/test_execute.py::test_execute_sync - ValueError: No kernel found that matches the current python executable /usr/bin/python3
FAILED tests/test_execute.py::test_execute_in_subfolder - ValueError: No kernel found that matches the current python executable /usr/bin/python3
FAILED tests/test_mirror.py::test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_julia/julia_benchmark_plotly_barchart.ipynb] - Asse...
FAILED tests/test_mirror.py::test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/Notebook_with_R_magic.ipynb] - AssertionError:
FAILED tests/test_mirror.py::test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/Notebook_with_more_R_magic_111.ipynb] - Assertio...
FAILED tests/test_mirror.py::test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/World population.ipynb] - AssertionError:
FAILED tests/test_mirror.py::test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/cat_variable.ipynb] - AssertionError:
FAILED tests/test_mirror.py::test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/convert_to_py_then_test_with_update83.ipynb] - A...
FAILED tests/test_mirror.py::test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/frozen_cell.ipynb] - AssertionError:
FAILED tests/test_mirror.py::test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/jupyter.ipynb] - AssertionError:
FAILED tests/test_mirror.py::test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/jupyter_again.ipynb] - AssertionError:
FAILED tests/test_mirror.py::test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/jupyter_with_raw_cell_in_body.ipynb] - Assertion...
FAILED tests/test_mirror.py::test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/jupyter_with_raw_cell_on_top.ipynb] - AssertionE...
FAILED tests/test_mirror.py::test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/notebook_with_complex_metadata.ipynb] - Assertio...
FAILED tests/test_mirror.py::test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/nteract_with_parameter.ipynb] - AssertionError:
FAILED tests/test_mirror.py::test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/plotly_graphs.ipynb] - AssertionError:
FAILED tests/test_mirror.py::test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/sample_rise_notebook_66.ipynb] - AssertionError:
FAILED tests/test_mirror.py::test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/text_outputs_and_images.ipynb] - AssertionError:
FAILED tests/test_mirror.py::test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_R/ir_notebook.ipynb] - AssertionError:
FAILED tests/test_using_cli.py::test_jupytext_commands_in_the_documentation_work - ValueError: No kernel found that matches the current python executable /usr/bin/python3
============================================= 36 failed, 2621 passed, 50 skipped, 1 xfailed, 50 warnings in 148.36s (0:02:28) ==============================================
The text was updated successfully, but these errors were encountered: