MCPcopy Create free account

hub / github.com/jupytext/jupytext / functions

Functions1,277 in github.com/jupytext/jupytext

Functiontest_pipe_black_removes_lines_to_next_cell_metadata
( tmpdir, cwd_tmpdir, text="""# %% def func(): return 42 # %% func()""", )
tests/external/cli/test_black.py:218
Functiontest_pipe_black_uses_warn_only_781
(tmpdir, cwd_tmpdir, code, black_should_fail, python_notebook, capsys)
tests/external/cli/test_black.py:246
Functiontest_pipe_into_autopep8
()
tests/external/cli/test_black.py:66
Functiontest_pipe_into_black
()
tests/external/cli/test_black.py:57
Functiontest_pipe_into_flake8
()
tests/external/cli/test_black.py:75
Functiontest_pipe_into_isort
()
tests/external/cli/test_isort.py:9
Functiontest_pipe_nbconvert_execute
(tmpdir)
tests/integration/cli/test_execute.py:15
Functiontest_pipe_nbconvert_execute_sync
(tmpdir)
tests/integration/cli/test_execute.py:45
Functiontest_pipe_with_quiet_does_not_print
(tmp_path, capsys)
tests/functional/cli/test_cli.py:1357
Functiontest_pre_commit_hook
(tmpdir)
tests/external/pre_commit/test_pre_commit_scripts.py:38
Functiontest_pre_commit_hook_in_subfolder
(tmpdir)
tests/external/pre_commit/test_pre_commit_scripts.py:140
Functiontest_pre_commit_hook_ipynb_to_py
Here we document and test the expected behavior of the pre-commit hook in the directional (--to) mode. Note that here, the ipynb file is always th
tests/external/pre_commit/test_pre_commit_0_ipynb_to_py.py:11
Functiontest_pre_commit_hook_py_to_ipynb_and_md
(tmpdir)
tests/external/pre_commit/test_pre_commit_scripts.py:166
Functiontest_pre_commit_hook_sync
( tmpdir, cwd_tmpdir, tmp_repo, jupytext_repo_root, jupytext_repo_rev, python_notebook
tests/external/pre_commit/test_pre_commit_1_sync.py:12
Functiontest_pre_commit_hook_sync_black_flake8
(tmpdir, python_notebook)
tests/external/pre_commit/test_pre_commit_scripts.py:201
Functiontest_pre_commit_hook_sync_black_nbstripout
Here we sync the ipynb notebook with a py:percent file and also apply black and nbstripout.
tests/external/pre_commit/test_pre_commit_3_sync_black_nbstripout.py:10
Functiontest_pre_commit_hook_sync_execute
Here we sync the ipynb notebook with a py:percent file and execute it (this is probably not a very recommendable hook!)
tests/external/pre_commit/test_pre_commit_4_sync_execute.py:10
Functiontest_pre_commit_hook_sync_flake8
This test was extracted from test_pre_commit_hook_sync_black_flake8 to make sure that the pre-commit stops the commit when flake8 fails
tests/external/pre_commit/test_pre_commit_scripts.py:245
Functiontest_pre_commit_hook_sync_nbstripout
Here we sync the ipynb notebook with a Markdown file and also apply nbstripout.
tests/external/pre_commit/test_pre_commit_2_sync_nbstripout.py:9
Functiontest_pre_commit_hook_sync_reformat_code_and_markdown
Here we sync the ipynb notebook with a py:percent file and also apply black and pandoc to reformat both code and markdown cells.
tests/external/pre_commit/test_pre_commit_5_reformat_markdown.py:10
Functiontest_pre_commit_hook_sync_with_config
( tmpdir, cwd_tmpdir, tmp_repo, jupytext_repo_root, jupytext_repo_rev, python_notebook
tests/external/pre_commit/test_pre_commit_1_sync_with_config.py:9
Functiontest_pre_commit_hook_sync_with_no_config
In this test we reproduce the setting from https://github.com/mwouts/jupytext/issues/967
tests/external/pre_commit/test_pre_commit_1_sync_with_no_config.py:13
Functiontest_pre_commit_hook_with_subfolders_issue_506
I have the following directory structure, where the nb/test.ipynb is paired with the py/test.py. ├── nb │ └── test.ipynb └── py
tests/external/pre_commit/test_pre_commit_scripts.py:303
Functiontest_pre_commit_local_config
(tmpdir, cwd_tmpdir, tmp_repo, python_notebook, capsys)
tests/external/pre_commit/test_pre_commit_mode.py:131
Functiontest_preferred_format_allows_to_read_others_format
(python_notebook, cm, tmpdir)
tests/integration/contents_manager/test_contentsmanager.py:745
Functiontest_preferred_formats_read_auto
(tmpdir, cm)
tests/integration/contents_manager/test_contentsmanager.py:786
Functiontest_preferred_jupytext_formats_save
(tmpdir)
tests/functional/cli/test_cli_config.py:68
Functiontest_prefix_and_suffix
()
tests/unit/test_paired_paths.py:182
Functiontest_prefix_on_root_174
()
tests/unit/test_paired_paths.py:226
Functiontest_py_notebooks_are_trusted
Text notebooks don't have outputs, so they are trusted
tests/functional/others/test_trust_notebook.py:18
Functiontest_python_kernel_preserves_R_files
Opening a R file with a Jupyter server that has no R kernel should not modify the file
tests/integration/contents_manager/test_contentsmanager.py:1100
Functiontest_qmd_to_ipynb
( qmd="""Some text ```{python} 1 + 1 ``` """, nb=new_notebook( cells=[ new_markdo
tests/external/simple_external_notebooks/test_read_simple_quarto.py:9
Functiontest_question_is_not_magic
()
tests/unit/test_escape_magics.py:212
Functiontest_questions_in_unmarked_cells_are_not_uncommented_297
( text="""# This cell has no explicit marker # question? 1 + 2 """, nb=new_notebook( cells=[
tests/functional/simple_notebooks/test_read_simple_python.py:544
Functiontest_quiet_does_not_print_when_creating_missing_directory
In quiet mode, jupytext should not print a warning when creating a missing directory (#1285)
tests/functional/cli/test_cli.py:1369
Functiontest_raise_on_different_cell_content
(raise_on_first_difference)
tests/unit/test_compare.py:134
Functiontest_raise_on_different_cell_count
(raise_on_first_difference)
tests/unit/test_compare.py:163
Functiontest_raise_on_different_cell_metadata
()
tests/unit/test_compare.py:155
Functiontest_raise_on_different_cell_type
(raise_on_first_difference)
tests/unit/test_compare.py:126
Functiontest_raise_on_different_metadata
()
tests/unit/test_compare.py:106
Functiontest_raise_on_different_outputs
(raise_on_first_difference)
tests/unit/test_compare.py:207
Functiontest_raise_on_incomplete_markdown_cell
()
tests/unit/test_compare.py:141
Functiontest_raise_on_wrong_format
(tmpdir, cm)
tests/functional/others/test_save_multiple.py:82
Functiontest_raw_cell_with_metadata
( markdown="""<!-- #raw key="value" --> raw content <!-- #endraw --> """, )
tests/functional/simple_notebooks/test_read_simple_markdown.py:280
Functiontest_raw_cell_with_metadata_json
( markdown="""<!-- #raw {"key": "value"} --> raw content <!-- #endraw --> """, )
tests/functional/simple_notebooks/test_read_simple_markdown.py:264
Functiontest_raw_string_is_stable_over_round_trip
(r, triple_quote, expr)
tests/functional/others/test_raw_strings.py:27
Functiontest_raw_with_metadata
( text="""# + key="value" active="" # Raw cell # # Commented line """, notebook=new_notebook(cells=[ne
tests/functional/simple_notebooks/test_read_simple_python.py:962
Functiontest_raw_with_metadata_2
( no_jupytext_version_number, text="""# + [raw] key="value" # Raw cell # # Commented line """, not
tests/functional/simple_notebooks/test_read_simple_python.py:975
Functiontest_read_cell_explicit_start
( pynb=""" import pandas as pd # + def data(): return pd.DataFrame({'A': [0, 1]}) data() """, )
tests/functional/simple_notebooks/test_read_simple_python.py:200
Functiontest_read_cell_two_blank_lines
( pynb="""# --- # title: cell with two consecutive blank lines # --- # + a = 1 a + 2 """, )
tests/functional/simple_notebooks/test_read_simple_python.py:176
Functiontest_read_cell_with_metadata
( script="""# %% a code cell with parameters {"tags": ["parameters"]} a = 3 """, )
tests/functional/simple_notebooks/test_read_simple_percent.py:79
Functiontest_read_cell_with_metadata
( script="""# %% a code cell with parameters {"tags": ["parameters"]} a = 3 """, )
tests/functional/simple_notebooks/test_read_simple_hydrogen.py:61
Functiontest_read_cell_with_one_blank_line_end
( pynb="""import pandas """, )
tests/functional/simple_notebooks/test_read_simple_python.py:293
Functiontest_read_code_cell_fully_commented
( pynb="""# + # This is a code cell that # only contains comments """, )
tests/functional/simple_notebooks/test_read_simple_python.py:304
Functiontest_read_complex_cells
( pynb="""import pandas as pd # + def data(): return pd.DataFrame({'A': [0, 1]}) data() # + def da
tests/functional/simple_notebooks/test_read_simple_python.py:216
Functiontest_read_config
(settings_file, sample_viewer_config)
tests/unit/test_labconfig.py:35
Functiontest_read_dotnet_try_markdown
( md="""This is a dotnet/try Markdown file, inspired from this [post](https://devblogs.microsoft.com/dotne
tests/functional/simple_notebooks/test_read_dotnet_try_markdown.py:18
Functiontest_read_empty_code_cell
( script='''""" Markdown cell """ ''', )
tests/functional/simple_notebooks/test_read_simple_sphinx.py:119
Functiontest_read_empty_text_notebook
(ext, tmp_path)
tests/functional/simple_notebooks/test_read_empty_text_notebook.py:11
Functiontest_read_explicit_markdown_cell_with_triple_quote_307
( script="""# {{{ [md] {"special": "metadata"} # some text ''' # }}} print('hello world') # {{{ [md] {"s
tests/functional/simple_notebooks/test_read_simple_python.py:885
Functiontest_read_file_with_explicit_fmt
(tmpdir)
tests/functional/others/test_jupytext_read.py:12
Functiontest_read_format_from_metadata
( script="""--- jupyter: jupytext: formats: ipynb,pct.py:percent,lgt.py:light,spx.py:sphinx,md,Rmd
tests/unit/test_formats.py:169
Functiontest_read_go_notebook_with_magic_main
( go="""// %% package square // %% [markdown] // # Defining a $x^2$ function // It returns x*x. // %% fu
tests/functional/simple_notebooks/test_read_simple_go.py:69
Functiontest_read_go_notebook_with_percent_percent_and_arguments
( go="""// %% [markdown] // # Square Function // // Defines a function $f(x) = x^2$ // %% func Square(x f
tests/functional/simple_notebooks/test_read_simple_go.py:31
Functiontest_read_html_cell_from_md
(no_jupytext_version_number)
tests/functional/simple_notebooks/test_read_simple_csharp.py:61
Functiontest_read_invalid_md_file_fails
(invalid_md_file)
tests/functional/others/test_invalid_file.py:19
Functiontest_read_ipynb_from_stream
()
tests/functional/others/test_read_write_functions.py:49
Functiontest_read_julia_notebook
( markdown="""```julia 1 + 1 ``` """, )
tests/functional/simple_notebooks/test_read_simple_markdown.py:183
Functiontest_read_less_simple_file
( ext, rnb="""#' --- #' title: Less simple file #' --- #' Here we have some text #' And below we have
tests/functional/simple_notebooks/test_read_simple_R.py:51
Functiontest_read_less_simple_file
( pynb="""# --- # title: Less simple file # --- # Here we have some text # And below we have some python
tests/functional/simple_notebooks/test_read_simple_python.py:52
Functiontest_read_magics
(text="// :vars\n")
tests/functional/simple_notebooks/test_read_simple_rust.py:7
Functiontest_read_markdown_IDL
( no_jupytext_version_number, text="""--- jupyter: kernelspec: display_name: IDL [conda env:gdl]
tests/functional/simple_notebooks/test_read_simple_markdown.py:567
Functiontest_read_markdown_cell_with_triple_quote_307
( script="""# This script test that commented triple quotes ''' # do not impede the correct identification
tests/functional/simple_notebooks/test_read_simple_python.py:863
Functiontest_read_markdown_file_no_language
( markdown="""``` ls ``` ``` echo 'Hello World' ``` """, )
tests/functional/simple_notebooks/test_read_simple_markdown.py:168
Functiontest_read_markdown_idl
( no_jupytext_version_number, text="""--- jupyter: kernelspec: display_name: IDL [conda env:gdl]
tests/functional/simple_notebooks/test_read_simple_markdown.py:541
Functiontest_read_md_and_markdown_regions
( markdown="""Some text <!-- #md --> A long cell <!-- #endmd --> <!-- #markdown --> Another long cel
tests/functional/simple_notebooks/test_read_simple_markdown.py:93
Functiontest_read_more_complex_file
( script="""'''This is a markdown cell''' 1 + 2 + 3 + 4 5 6 ''' Another markdown cell''' ###############
tests/functional/simple_notebooks/test_read_simple_sphinx.py:60
Functiontest_read_mostly_R_markdown_file
( markdown="""```R ls() ``` ```R cat(stringi::stri_rand_lipsum(3), sep='\n\n') ``` """, )
tests/functional/simple_notebooks/test_read_simple_markdown.py:143
Functiontest_read_mostly_py_markdown_file
( markdown="""--- title: Simple file --- ```python import numpy as np x = np.arange(0, 2*math.pi, eps) ``
tests/functional/simple_notebooks/test_read_simple_markdown.py:13
Functiontest_read_mostly_py_rmd_file
( rmd="""--- title: Simple file --- ```{python, echo=TRUE} import numpy as np x = np.arange(0, 2*math.pi,
tests/functional/simple_notebooks/test_read_simple_rmd.py:18
Functiontest_read_multiline_comment
( pynb="""'''This is a multiline comment with "quotes", 'single quotes' # and comments and line breaks a
tests/functional/simple_notebooks/test_read_simple_python.py:565
Functiontest_read_nbconvert_script
( script=""" # coding: utf-8 # A markdown cell # In[1]: import pandas as pd pd.options.display.max_ro
tests/functional/simple_notebooks/test_read_simple_percent.py:97
Functiontest_read_nbconvert_script
( script=""" # coding: utf-8 # A markdown cell # In[1]: %pylab inline import pandas as pd pd.options.
tests/functional/simple_notebooks/test_read_simple_hydrogen.py:79
Functiontest_read_non_pep8_file
( pynb="""# --- # title: Non-pep8 file # --- # This file is non-pep8 as the function below has # two cons
tests/functional/simple_notebooks/test_read_simple_python.py:148
Functiontest_read_prev_function
( pynb="""def test_read_cell_explicit_start_end(pynb=''' import pandas as pd # + def data(): return pd
tests/functional/simple_notebooks/test_read_simple_python.py:273
Functiontest_read_py_percent_from_stream
()
tests/functional/others/test_read_write_functions.py:76
Functiontest_read_raw_cell_markdown_version_1_1
( markdown="""--- jupyter: jupytext: text_representation: extension: .md format_name: ma
tests/functional/simple_notebooks/test_read_simple_markdown.py:296
Functiontest_read_raw_cell_markdown_version_1_1_with_mimetype
( header="""--- jupyter: jupytext: text_representation: extension: .md format_name: mark
tests/functional/simple_notebooks/test_read_simple_markdown.py:322
Functiontest_read_remove_blank_lines
( script="""# %% import pandas as pd # %% Display a data frame df = pd.DataFrame({'A': [1, 2], 'B': [3, 4
tests/functional/simple_notebooks/test_read_simple_percent.py:139
Functiontest_read_remove_blank_lines
( script="""# %% import pandas as pd # %% Display a data frame df = pd.DataFrame({'A': [1, 2], 'B': [3, 4
tests/functional/simple_notebooks/test_read_simple_hydrogen.py:122
Functiontest_read_simple_code
( no_jupytext_version_number, ml="""(* %% *) let sum x y = x + y """, nb=new_notebook( cel
tests/functional/simple_notebooks/test_read_simple_ocaml.py:7
Functiontest_read_simple_file
( script="""# --- # title: Simple file # --- # %% [markdown] # This is a markdown cell # %% [md] # This
tests/functional/simple_notebooks/test_read_simple_percent.py:16
Functiontest_read_simple_file
( go="""// -*- coding: utf-8 -*- // --- // jupyter: // kernelspec: // display_name: Go (gonb) //
tests/functional/simple_notebooks/test_read_simple_go.py:5
Functiontest_read_simple_file
( script=""";; --- ;; title: Simple file ;; --- ;; Here we have some text ;; And below we have some code
tests/functional/simple_notebooks/test_read_simple_clojure.py:5
Functiontest_read_simple_file
( script=""";; --- ;; title: Simple file ;; --- ;; Here we have some text ;; And below we have some code
tests/functional/simple_notebooks/test_read_simple_scheme.py:5
Functiontest_read_simple_file
( script="""# --- # title: Simple file # --- # %% [markdown] # This is a markdown cell # %% [raw] # This
tests/functional/simple_notebooks/test_read_simple_hydrogen.py:5
Functiontest_read_simple_file
( script="""// --- // title: Simple file // --- // Here we have some text // And below we have some code
tests/functional/simple_notebooks/test_read_simple_java.py:5
Functiontest_read_simple_file
( julia='''""" cube(x) Compute the cube of `x`, ``x^3``. # Examples ```jldoctest julia> cube(2) 8 ```
tests/functional/simple_notebooks/test_read_simple_julia.py:5
Functiontest_read_simple_file
( ext, rnb="""#' --- #' title: Simple file #' --- #' Here we have some text #' And below we have some
tests/functional/simple_notebooks/test_read_simple_R.py:8
Functiontest_read_simple_file
( script="""// --- // title: Simple file // --- // Here we have some text // And below we have some code
tests/functional/simple_notebooks/test_read_simple_groovy.py:5
← previousnext →1,001–1,100 of 1,277, ranked by callers