MCPcopy Create free account

hub / github.com/jupytext/jupytext / functions

Functions1,277 in github.com/jupytext/jupytext

↓ 271 callersFunctioncompare
Compare two strings, lists or dict-like objects
src/jupytext/compare.py:31
↓ 221 callersMethodwrite
write the labconfig settings file
src/jupytext_config/labconfig.py:76
↓ 212 callersMethodreads
Read a notebook represented as text
src/jupytext/jupytext.py:98
↓ 203 callersMethodwrites
Return the text representation of the notebook
src/jupytext/jupytext.py:213
↓ 194 callersMethodread
read the labconfig settings file
src/jupytext_config/labconfig.py:29
↓ 186 callersFunctioncompare_notebooks
Compare the two notebooks, and raise with a meaningful message that explains the differences, if any
src/jupytext/compare.py:108
↓ 184 callersFunctionjupytext
Entry point for the jupytext script
src/jupytext/cli.py:344
↓ 135 callersFunctionread
Read a notebook from a file name or a file object :param fp: a file name or a file object :param as_version: see nbformat.read :param fmt
src/jupytext/jupytext.py:394
↓ 135 callersMethodsave
Save the file model and return the model with no content.
src/jupytext/sync_contentsmanager.py:130
↓ 110 callersFunctionwrite
Write a notebook to a file name or a file object :param nb: the notebook :param fp: a file name or a file object :param version: see nbfo
src/jupytext/jupytext.py:513
↓ 90 callersFunctionnotebook_model
Return a notebook model, with content a dictionary rather than a notebook object. To be used in tests only.
src/jupytext/compare.py:407
↓ 60 callersFunctiongit
(*args)
tests/external/pre_commit/test_pre_commit_scripts.py:16
↓ 48 callersFunctionwrites
Return the text representation of the notebook :param notebook: the notebook :param fmt: the jupytext format like `md`, `py:percent`, ...
src/jupytext/jupytext.py:435
↓ 40 callersFunctionlong_form_multiple_formats
Convert a concise encoding of jupytext.formats to a list of formats, encoded as dictionaries
src/jupytext/formats.py:634
↓ 40 callersFunctionpaired_paths
Return the list of paired notebooks, given main path, and the list of formats
src/jupytext/paired_paths.py:307
↓ 34 callersFunctionreads
Read a notebook from a string :param text: the text representation of the notebook :param fmt: (optional) the jupytext format like `md`,
src/jupytext/jupytext.py:345
↓ 29 callersFunctionlong_form_one_format
Parse 'sfx.py:percent' into {'suffix':'sfx', 'extension':'py', 'format_name':'percent'}
src/jupytext/formats.py:562
↓ 28 callersFunctionassert_conversion_same_as_mirror
This function is used in the tests
src/jupytext/compare.py:340
↓ 26 callersFunctionbase_path
Given a path and options for a format (ext, suffix, prefix), return the corresponding base path
src/jupytext/paired_paths.py:86
↓ 24 callersFunctioncompare_cells
Compare two collection of notebook cells
src/jupytext/compare.py:175
↓ 23 callersFunctionfilter_metadata
Filter the cell or notebook metadata, according to the user preference
src/jupytext/metadata_filter.py:119
↓ 23 callersMethodread_line
Read a new line
src/jupytext/stringparser.py:26
↓ 20 callersFunctiontext_to_metadata
Parse the language/cell title and associated metadata
src/jupytext/cell_metadata.py:420
↓ 19 callersFunctionmetadata_to_text
Write the cell metadata in the format key=value
src/jupytext/cell_metadata.py:466
↓ 19 callersFunctionshort_form_multiple_formats
Convert jupytext formats, represented as a list of dictionaries, to a comma separated list
src/jupytext/formats.py:683
↓ 19 callersMethodupdate
Process README.md when metadata is being prepared.
tools/absolute_links_in_readme.py:10
↓ 18 callersFunctioncomment_magic
Escape Jupyter magics with '#
src/jupytext/magics.py:105
↓ 18 callersFunctionget_timestamp
(path: str)
src/jupytext/cli.py:1120
↓ 18 callersMethodis_quoted
Is the next line quoted?
src/jupytext/stringparser.py:20
↓ 18 callersFunctionlog
(text)
src/jupytext/cli.py:348
↓ 17 callersFunctioncombine_inputs_with_outputs
Return a notebook that combines the text and metadata from the first notebook, with the outputs and metadata of the second notebook.
src/jupytext/combine.py:36
↓ 17 callersFunctiongit_timestamp
(path)
src/jupytext/cli.py:1095
↓ 17 callersFunctionguess_format
Guess the format and format options of the file, given its extension and content
src/jupytext/formats.py:306
↓ 17 callersFunctionis_active
Is the cell active for the given file extension?
src/jupytext/cell_metadata.py:295
↓ 17 callersFunctionsystem
Execute the given bash command
src/jupytext/cli.py:55
↓ 16 callersFunctionfull_path
Return the full path for the notebook, given the base path
src/jupytext/paired_paths.py:234
↓ 16 callersFunctionload_jupytext_configuration_file
Read and validate a Jupytext configuration file, and return a JupytextConfiguration object
src/jupytext/config.py:416
↓ 16 callersFunctionto_dict
(keys)
tests/functional/metadata/test_metadata_filter.py:12
↓ 15 callersMethoddefault_formats
Return the default formats, if they apply to the current path #157
src/jupytext/config.py:230
↓ 15 callersFunctionfind_jupytext_configuration_file
Return the first jupytext configuration file in the current directory, or any parent directory
src/jupytext/config.py:321
↓ 15 callersFunctionis_magic
Is the current line a (possibly escaped) Jupyter magic, and should it be commented?
src/jupytext/magics.py:69
↓ 15 callersFunctionnb
(text)
tests/integration/contents_manager/test_contentsmanager.py:1612
↓ 14 callersMethodrename_file
Rename the current file. If the file is a notebook, we rename the paired files as well
src/jupytext/sync_contentsmanager.py:530
↓ 13 callersFunctionshort_form_one_format
Represent one jupytext format as a string
src/jupytext/formats.py:659
↓ 11 callersFunctionget_format_implementation
Return the implementation for the desired format
src/jupytext/formats.py:251
↓ 11 callersFunctionheader_to_metadata_and_cell
Return the metadata, a boolean to indicate if a jupyter section was found, the first cell of notebook if some metadata is found outside t
src/jupytext/header.py:169
↓ 11 callersFunctionread_format_from_metadata
Return the format of the file, when that information is available from the metadata
src/jupytext/formats.py:299
↓ 10 callersFunctionauto_ext_from_metadata
Script extension from notebook metadata
src/jupytext/formats.py:749
↓ 10 callersFunctionfind_base_path_and_format
Return the base path and the format corresponding to the given path
src/jupytext/paired_paths.py:291
↓ 10 callersFunctionmetadata_filter_as_dict
Return the metadata filter represented as either None (no filter), or a dictionary with at most two keys: 'additional' and 'excluded', which c
src/jupytext/metadata_filter.py:24
↓ 10 callersFunctionpep8_lines_between_cells
How many blank lines should be added between the two python paragraphs to make them pep8?
src/jupytext/pep8.py:82
↓ 10 callersFunctionuncomment_magic
Unescape Jupyter magics
src/jupytext/magics.py:137
↓ 9 callersFunctioncell_ends_with_function_or_class
Does the last line of the cell belong to an indented code?
src/jupytext/pep8.py:27
↓ 9 callersFunctiongit_in_tmpdir
Return a function that will execute git instruction in the desired directory
tests/external/pre_commit/test_pre_commit_scripts.py:13
↓ 9 callersMethodis_code
Is this cell a code cell?
src/jupytext/cell_to_text.py:101
↓ 9 callersFunctionis_myst_available
Whether the markdown-it-py package is available.
src/jupytext/myst.py:34
↓ 9 callersFunctionmatches_mystnb
Attempt to distinguish a file as myst, only given its extension and content. :param ext: the extension of the file :param requires_meta: requ
src/jupytext/myst.py:70
↓ 9 callersFunctionrearrange_jupytext_metadata
Convert the jupytext_formats metadata entry to jupytext/formats, etc. See #91
src/jupytext/formats.py:518
↓ 9 callersFunctionrecursive_update
Update recursively a (nested) dictionary with the content of another. Inspired from https://stackoverflow.com/questions/3232943/update-value-of-a-
src/jupytext/header.py:148
↓ 9 callersFunctionuncomment
Remove prefix and space, or only prefix, when possible
src/jupytext/cell_reader.py:34
↓ 8 callersMethodnew_untitled
Create a new untitled file or directory in path We override the base function because that one does not take the 'ext' argument
src/jupytext/sync_contentsmanager.py:465
↓ 8 callersFunctionparse_key_equal_value
Parse a string of the form 'key1=value1 key2=value2
src/jupytext/cell_metadata.py:341
↓ 8 callersFunctionreraise
Return a function that raises the given error when evaluated
src/jupytext/reraise.py:4
↓ 8 callersFunctionsplit
(path, sep)
src/jupytext/paired_paths.py:49
↓ 8 callersFunctionthree_backticks_or_more
Return a string with enough backticks to encapsulate the given code cell in Markdown cf. https://github.com/mwouts/jupytext/issues/712
src/jupytext/cell_to_text.py:32
↓ 7 callersFunctioncheck_active_cell
(ext, active_dict)
tests/functional/others/test_active_cells.py:63
↓ 7 callersFunctiondivine_format
Guess the format of the notebook, based on its content #148
src/jupytext/formats.py:397
↓ 7 callersFunctionmyst_extensions
The allowed extensions for the myst format.
src/jupytext/myst.py:49
↓ 7 callersFunctionpipe_notebook
Pipe the notebook, in the desired representation, to the given command. Update the notebook with the returned content if desired.
src/jupytext/cli.py:1282
↓ 7 callersMethodupdate_paired_notebooks
Update the list of paired notebooks to include/update the current pair
src/jupytext/sync_contentsmanager.py:99
↓ 7 callersFunctionvalidate_one_format
Validate extension and options for the given format
src/jupytext/formats.py:714
↓ 6 callersMethod__init__
(self, cell, default_language, fmt=None, unsupported_keys=None)
src/jupytext/cell_to_text.py:54
↓ 6 callersFunctionblack_invariant
Remove characters that may be changed when reformatting the text with black
src/jupytext/combine.py:16
↓ 6 callersMethodget_and_check_timestamp
(self, path: str)
src/jupytext/cli.py:1141
↓ 6 callersFunctionis_untracked
Check whether a file was created or modified and needs to be added to the git index
src/jupytext/cli.py:1022
↓ 6 callersFunctionlist_folder_contents
(tmp_path)
tests/integration/contents_manager/test_contentsmanager.py:1787
↓ 6 callersFunctionmyst_to_notebook
Convert text written in the myst format to a notebook. :param text: the file text :param code_directive: the name of the directive to search
src/jupytext/myst.py:244
↓ 6 callersFunctionread_one_file
(path, fmt)
src/jupytext/cli.py:1217
↓ 6 callersFunctionsubset_metadata
Filter the metadata
src/jupytext/metadata_filter.py:205
↓ 5 callersFunctioncomment_lines
Return commented lines
src/jupytext/languages.py:221
↓ 5 callersFunctionmetadata_to_rmd_options
Convert language and metadata information to their rmd representation
src/jupytext/cell_metadata.py:81
↓ 5 callersFunctionnotebook_formats
Return the list of formats for the current notebook
src/jupytext/config.py:456
↓ 5 callersFunctionread_pair
Read a notebook given its inputs and outputs path and formats
src/jupytext/sync_pairs.py:16
↓ 5 callersMethodset_default_format_options
Set default format option
src/jupytext/config.py:184
↓ 5 callersFunctionstr2bool
Parse Yes/No/Default string https://stackoverflow.com/questions/15008758/parsing-boolean-values-with-argparse
src/jupytext/cli.py:74
↓ 5 callersFunctionuncomment_line
Remove prefix (and space) from line
src/jupytext/header.py:44
↓ 5 callersFunctionunesc
Uncomment once a commented line
src/jupytext/magics.py:125
↓ 5 callersFunctionusual_language_name
Return the usual language name (one that may be found in _SCRIPT_EXTENSIONS above)
src/jupytext/languages.py:132
↓ 4 callersMethod__init__
Create a cell reader with empty content
src/jupytext/cell_reader.py:123
↓ 4 callersFunction_flush_markdown
When we find a cell we check if there is preceding text.o
src/jupytext/myst.py:286
↓ 4 callersFunction_warn_on_unsupported_keys
(unsupported_keys)
src/jupytext/jupytext.py:567
↓ 4 callersFunctionbuild_async_jupytext_contents_manager_class
Derives an asynchronous TextFileContentsManager class from the given base class, which is supposed to be asynchronous too.
src/jupytext/async_contentsmanager.py:50
↓ 4 callersFunctionbuild_sync_jupytext_contents_manager_class
Derives an synchronous TextFileContentsManager class from the given base class, which is supposed to be synchronous too.
src/jupytext/sync_contentsmanager.py:56
↓ 4 callersFunctioncell_ends_with_code
Is the last line of the cell a line with code?
src/jupytext/pep8.py:53
↓ 4 callersMethodcheck_timestamp
(self, path: str)
src/jupytext/cli.py:1153
↓ 4 callersFunctiondefault_language_from_metadata_and_ext
Return the default language given the notebook metadata, and a file extension
src/jupytext/languages.py:112
↓ 4 callersFunctiondump_yaml_blocks
Where possible, we try to use a more compact metadata style. For blocks with no nested dicts, the block is denoted by starting colons::
src/jupytext/myst.py:145
↓ 4 callersMethodfilter_notebook
(self, nb, metadata, preserve_cell_ids=True)
src/jupytext/jupytext.py:175
↓ 4 callersFunctionformat_name_for_ext
Return the format name for that extension
src/jupytext/formats.py:474
↓ 4 callersFunctionget_comment
(ext)
src/jupytext/magics.py:9
next →1–100 of 1,277, ranked by callers