Jupyter Notebooks as Markdown Documents, Julia, Python or R scripts

Overview

CI Documentation Status codecov.io Language grade: Python Code style: black GitHub language count Conda Version Pypi pyversions Binder:notebook Binder:lab

Have you always wished Jupyter notebooks were plain text documents? Wished you could edit them in your favorite IDE? And get clear and meaningful diffs when doing version control? Then... Jupytext may well be the tool you're looking for!

Jupytext is a plugin for Jupyter that can save Jupyter notebooks as either

Use cases

Common use cases for Jupytext are:

  • Doing version control on Jupyter Notebooks
  • Editing, merging or refactoring notebooks in your favorite text editor
  • Applying Q&A checks on notebooks.

Install

You can install Jupytext with

  • pip install jupytext
  • or conda install jupytext -c conda-forge.

Please note that Jupytext includes an extension for Jupyter Lab. In the latest version of Jupytext, this extension is compatible with Jupyter Lab >= 3.0 only. If you use Jupyter Lab 2.x, please either stay with Jupytext 1.8.2, or install, on top of the latest pip or conda version of Jupytext, a version of the extension that is compatible with Jupyter Lab 2.x:

jupyter labextension install [email protected]  # For Jupyter Lab 2.x

Then, restart your Jupyter server (for more installation details, see the install section in the documentation).

When Jupytext is installed, .py and .md files have a notebook icon. And you can really open and run these files as notebooks

    With a click on the text file in Jupyter Notebook

    (click on the image above to try this on Binder)

    With a click on the text file in JupyterLab To do that, you will need to change the default viewer for text notebooks by copy-pasting the following settings (or the subset that matches your use case) in the `Document Manager` section:
    {
      "defaultViewers": {
        "markdown": "Jupytext Notebook",
        "myst": "Jupytext Notebook",
        "r-markdown": "Jupytext Notebook",
        "quarto": "Jupytext Notebook",
        "julia": "Jupytext Notebook",
        "python": "Jupytext Notebook",
        "r": "Jupytext Notebook"
      }
    }

    Here is a screencast of the steps to follow:

    (click on the image above to try this on Binder)

    Another possibility is to activate this with a default_setting_overrides.json file in the .jupyter/labconfig folder with e.g.

    wget https://raw.githubusercontent.com/mwouts/jupytext/main/binder/labconfig/default_setting_overrides.json -P  ~/.jupyter/labconfig/
    

    Note: to open links to .md files in notebooks with the Notebook editor, use jupyterlab>=4.0.0a16.

    With a right click and open with notebook in Jupyter Lab

    (click on the image above to try this on Binder)

Paired notebooks

The most convenient way to use Jupytext is probably through paired notebooks.

To pair a given .ipynb or text notebook to an additional notebook format, use either

    the "pair notebook with..." commands in Jupyter Lab

    the "pair notebook with..." menu entries in Jupyter Notebook

    jupytext at the command line

    with e.g.

    jupytext --set-formats ipynb,py:percent notebook.ipynb
    

    see the documentation.

    or a local or global jupytext.toml configuration file.

    with e.g. the following content:

    formats = "ipynb,py:percent"
    

    see the documentation.

When you save a paired notebook in Jupyter, both the .ipynb file and the text version are updated on disk.

When a paired notebook is opened or reloaded in Jupyter, the input cells are loaded from the text file, and combined with the output cells from the .ipynb file.

You can edit the text representation of the notebook in your favorite editor, and get the changes back in Jupyter by simply reloading the notebook (Ctrl+R in Jupyter Notebook, "reload notebook" in Jupyter Lab). And the changes are propagated to the .ipynb file when you save the notebook.

Alternatively, you can synchronise the two representations by running jupytext --sync notebook.ipynb at the command line.

Which text format?

Jupytext implements many text formats for Jupyter Notebooks. If your notebook is mostly made of code, you will probably prefer to save it as a script:

  • Use the percent format, a format with explicit cell delimiters (# %%), supported by many IDE (Spyder, Hydrogen, VS Code, PyCharm and PTVS)
  • Or use the light format, if you prefer to see fewer cell markers.

If your notebook contains more text than code, if you are writing a documentation or a book, you probably want to save your notebook as a Markdown document

More resources?

If you're new to Jupytext, you may want to start with the FAQ or with the Tutorials, or with this short introduction to Jupytext: .

Comments
  • Maintain cell metadata for RISE

    Maintain cell metadata for RISE

    I wanted to use jupytext to have a paired md+ipynb notebook that I also use for presentation with the RISE plugin https://github.com/damianavila/RISE

    Unfortunately, every time I reload the browser all the metadata information about whether a cell is a slide, fragment, or should be skipped, gets lost.

    opened by boazbk 57
  • Pandoc format for Jupyter notebook

    Pandoc format for Jupyter notebook

    Pandoc allow users to create Jupyter notebook from Markdown files, cf. the documentation. We'll try to plug pandoc into Jupytext and see if that is usable.

    opened by mwouts 40
  • How to build a documentation site with Jupytext?

    How to build a documentation site with Jupytext?

    The purpose of this issue is to document a few ways to build a documentation site. Our requirements are:

    • The source documents can be edited as Jupyter notebooks
    • Source files are text files (Markdown or others)
    • Documentation site can show the result of the code being executed, including plots.

    We should explore at least

    • Jupyter Book (can we use it with Jupytext notebooks?)
    • Sphinx and Sphinx-gallery
    documentation 
    opened by mwouts 38
  • Consider support for Quarto qmd format?

    Consider support for Quarto qmd format?

    I wonder whether you would also consider supporting the new Quarto qmd format.

    Why?

    Because Quarto is looking like a very nice system for writing books and reports with excecutable documents, such as Jupyter and R notebooks. Qmd format is Quarto's cross-language text format for notebooks. It assumes .Rmd files are R notebooks, so Qmd format is the natural format for Jupyter notebooks in text form. We (@stefanv and I) are writing our new edition of a statistics book using Quarto. It would be a significant gain in usability if we could use the Jupytext / Notebook integration to edit and execute our documents in native Qmd format (although we are using Rmd at the moment).

    What?

    It's a slightly modified version of .Rmd format, where the cell metadata goes in comments at the top of the cell, as in:

    ```{python}
    #| warning: false
    #| echo: true
    ...
    ```
    opened by matthew-brett 35
  • Enable integration with pre-commit

    Enable integration with pre-commit

    This is a first attempt at an implementation of the suggestion in #691 to enable "proper" integration with the pre-commit framework. The changes summarized:

    • A new .pre-commit-hooks.yaml file, which tells pre-commit how to install this package (pre-commit does this internally), which command to run, and what the default options are
    • A new cli argument, --add-untracked, which adds any output files that weren't previously tracked by git to the index. Two points to note here:
      • The reason we are tracking only new files is that pre-commit doesn't consider changes to them if they aren't in the index (pre-commit requires all files in the index be unchanged by all hooks before passing)
      • The command will return a non-zero status code in case any newly generated files are actually added. This is because by adding them "on the fly" during the hook, pre-commit doesn't pass them to any other configured hooks for further checks, so they could be wrongly accepted into the commit.

    The net effect is a proper pre-commit hook, which will only allow a commit as long as the configured Jupytext command doesn't change any of the files in the index, or add any new ones. This is how pre-commit's hooks are expected to operate.

    Questions:

    • This is a bit of an adjustment to how Jupytext's main command is operating - is it too much? How easy would it be to make this separate/not expose the --add-untracked option so publicly?
    • How to test this behaviour (will be investigating, this is a WIP)?
    opened by JohnPaton 32
  • Metadata for hiding input/output or cells

    Metadata for hiding input/output or cells

    Hi @mwouts,

    I am currently working on a pipeline that chains together jupyter/jupytext notebooks into a reproducible workflow. I created two 'render engines', one based on papermill and one on knitr. Ideally, using jupytext, one could use them interchangeably on the same notebook.

    I am currently struggling with the cell metadata to control the visibility of cell inputs/outputs. I have seen that you have been experimenting with both papermill and jupyterbook. I also observed that you implemented some conversion of cell metadata for Rmarkdown. Ideally, there would be common conventions between jupytext, jupyterbook, Rmarkdown etc.

    First, my observations:

    • nbconvert supports contolling cell visibility when creating a html report by using nbconvert.preprocessors.TagRemovePreprocessor
    • Rmarkdown uses include=FALSE to hide an entire cell, results='hide' to hide output and echo=FALSE to hide input.
    • jupyter book supports hide_input and remove_input to hide the input, remove_cell for an entir cell, and to my knowledge no option to hide output only.
    • jupytext currently uses hide_output and hide_input when converting from Rmarkdown.

    Now, my questions/suggestsions:

    • Are you aware of more/different tags from other projects?
    • Did you come up with current jupytext hide_output and hide_input, or are they supposed to be compatible with another project?
    • Rmarkdown include=FALSE translates currently into hide_output. I believe it should translate into remove_cell or equivalent.
    • Rmarkdown results='hide' is currently not converted. It should translate into hide_output.

    Let me know what you think!

    Best, Gregor

    opened by grst 30
  • opening jupytext notebooks in jlab

    opening jupytext notebooks in jlab

    Hiya

    trying to migrate from classic to something more modern, I'm facing an issue that has to do with the awkward path that seems to be the only way to open a jupytext notebook under jlab

    • from the UI, clicking say foo.md in the file browser results in a markdown editor; I need to do right-click → open withNotebook to get it to open as a notebook
    • from the outside, I'd need a way to do the same from a regular URL; opening lab/tree/path/foo.md has the same result as from the UI, so I can't seem to find any way to open it as a notebook from a URL

    the first issue is an impediment but of course something I can live with; the second is more of a showstopper for me at this point

    I'd love to find a way around this

    ps for reference, I've be stirring this in a couple other threads already https://discourse.jupyter.org/c/jupyterlab/17 and more marginally in https://github.com/jupyterlab/retrolab/issues/162

    in the latter @jtpio suggested that an extension could come in handy, but I must honestly admit that the whole jlab extension ecosystem has scared the hell out of me a bit, so I am unsure what this would actually involve..

    opened by parmentelat 27
  • Extension not loading in jupyterlab 3

    Extension not loading in jupyterlab 3

    In Jupyterlab 3.0.4 with Jupytext 1.9.1 on Ubuntu 20.04.1 LTS the filemanager does not appear to be loading. Specifically the log line that says the jupytext file manager loads in not showing up. I can use the console commands to pair a notebook but no additional files are saved. The GUI also does not show previously paired files as notebooks either.

    I can use the most recent version of jupytext with jupyter notebook just fine. I can also downgrade to lab 2.2 and the old plugin and it works fine as well.

    I have tried all variations of enabling and configuration files listed in the install documentation and nothing has worked. I am fairly sure there is a bug here but there's no error message so it is a bit hard to say.

    Let me know if there's any more information I can provide.

    Here's a little bit of additional debug info:

    [email protected]:~$ jupyter labextension list
    JupyterLab v3.0.4
    /home/g/.local/share/jupyter/labextensions
            jupyterlab-jupytext v1.3.0 enabled OK (python, jupytext)
            @jupyter-widgets/jupyterlab-manager v3.0.0 enabled OK (python, jupyterlab_widgets)
    
    Other labextensions (built into JupyterLab)
       app dir: /home/g/.local/share/jupyter/lab
    

    Contents of .jupyter/jupyter_notebook_config.json:

    {
      "NotebookApp": {
        "nbserver_extensions": {
          "jupytext": true
        }
      }
    }
    
    documentation 
    opened by gstorer 27
  • Jupyter extension for Jupytext

    Jupyter extension for Jupytext

    An extension for Jupyter would make the configuration of paired notebooks easier. Rather than asking to edit the jupytext_formats metadata, we should offer the user an interface where the user can select the desired notebook extensions (among ipynb, py, jl, R, md, Rmd; the order matters), and the format for each extension (default, light, percent, sphinx...).

    The documentation on how to distribute a notebook extension is here. Extensions have to be written in Javascript, which I have almost never practiced before - help is welcome!

    Useful references are:

    help wanted 
    opened by mwouts 27
  • Jupytext plugin for the pre-commit package, compatible with black and flake8

    Jupytext plugin for the pre-commit package, compatible with black and flake8

    the pre-commit package (described in this blog) provides a framework for managing precommit hooks. It would be great if jupytext had an option that would allow it to be a pre-commit hook with that package -- essentially it would just need to suppress the stdout message and return 0, adding the translated file to the index. Specifically, this script is working for me now:

    import sys
    import subprocess
    from pathlib import Path
    
    cmd = f"jupytext --to py:percent {sys.argv[1]}"
    notebook = Path(sys.argv[1])
    pyfile = str(notebook.with_suffix(".py"))
    status1, output1 = subprocess.getstatusoutput(cmd)
    cmd = f"git add {pyfile}"
    status2, output2 = subprocess.getstatusoutput(cmd)
    with open("jupytext_logfile.txt", "w") as f:
        f.write(
            (f"{sys.argv}\n" f"{status1}\n" f"{output1}\n" f"{status2}\n" f"{output2}\n")
        )
    sys.exit(0)
    

    when I save it as pre_commit_jupytext.py and call it with a pre-commit config entry in .pre-commit-config.yaml that looks like this:

    repos
    -   repo: local
        hooks:
        - id: jupytext
          name: jupytext
          entry: python a301/scripts/pre_commit_jupytext.py
          language: system
    

    but I think smoothing this a little with a command line option would be a nice addition.

    opened by phaustin 23
  • Extend Jupytext to C# and F#

    Extend Jupytext to C# and F#

    C#, F# and Powershell Jupyter notebooks were announced in this post from the .NET blog. A preview of Powershell notebooks was then provided by @TylerLeonhardt in this post.

    In november 2019 (Jupytext 1.3) we extended Jupytext to Powershell. Now I'd be curious to extend Jupytext to C# and F#, and then experiment with a) turning documentation repositories like e.g. PowerShell-Docs or C#-Docs into live interactive Jupyter notebooks with MyBinder b) editing/running the .ipynb notebook through a paired script in Visual Studio Code.

    The repository dotnet/interactive seems to be a great ressource to start with. There, one can find

    • an interactive binder service, see NotebooksOnBinder (followed by instructions on how to install the dotnet framework locally)
    • as well as example notebooks in the three languages.

    This thread may also be of interest to @dfinke who authored PowerShellNotebook, a collection of scripts that can convert notebooks to scripts, and text to notebooks.

    opened by mwouts 22
  • Windows sync different folders

    Windows sync different folders

    I'm using:

    jupytext --set-formats notebooks//ipynb,scripts//py:percent notebooks/*.ipynb
    

    in Windows PowerShell

    That command resulted in:

    Paired paths 'notebooks/example.ipynb','scripts/example.py' do not include the current notebook path 'notebooks\example.ipynb'. Current format is 'notebooks//ipynb', and paired formats are 'notebooks//ipynb,scripts//py:percent'.
    

    I think this is OS specific bug?

    NOTE: already using the latest pypi package of jupytext and using VSCode power shell

    opened by yasirroni 3
  • jupytext --execute is stalled and won't return

    jupytext --execute is stalled and won't return

    using the notebook here as a source, https://github.com/flotpython/exos/blob/main/ds-howtos/coronavirus-howto-nb.md

    I try to execute it offline doing (from the repo root) jupytext --execute -v ./ds-howtos/coronavirus-howto-nb.md -o ./ds-howtos/coronavirus-howto-nb.md-trash.md and it hangs for as long as I have been to try - 10 minutes or something

    while the same notebook under jupyter (classic) can be executed with 'run all cells' in a reasonable amount of time it's not fast, alright, but it does go through in a matter of 20-30 s or something

    is there a way for me to troubleshoot this ? I was expecting some sort of --verbose or --debug option in an attempt to get a clue on what cell can be the problem, to no avail so far

    thanks !

    ps: I am using version 1.14.2; and then again with 1.14.4 but same behaviour

    opened by parmentelat 0
  • 1.14.4: Tags are not saved in MyST format

    1.14.4: Tags are not saved in MyST format

    Add example tags to a MyST .md cell with a plain text editor as described here:

    • https://github.com/mwouts/jupytext/blob/main/docs/formats.md#myst-markdown

    For example:

    :tags: [hide-output, show-input]
    

    When I then open the .md file with Jupytext, make changes, and save, the tags are removed. It seems like this is an obvious issue, but can anyone else reproduce? I'm having trouble guessing what I'm doing wrong.

    Saving the tags to a cell within Jupyter to start also doesn't get them written (just ignored on save).

    opened by davidvandebunte 0
  • Can't open the jupyter notebook after the jupytext installation

    Can't open the jupyter notebook after the jupytext installation

    I followed the documentation and installed the jupytext into my environment. When I tried to open the jupyter notebook, it gave me an error as following: [C 17:38:32.393 NotebookApp] Bad config encountered during initialization: The 'contents_manager_class' trait of a NotebookApp instance expected a subclass of notebook.services.contents.manager.ContentsManager or jupyter_server.contents.services.managers.ContentsManage, not the JupytextContentsManager JupytextContentsManager.

    opened by cacoto 17
Releases(v1.14.4)
  • v1.14.4(Dec 11, 2022)

  • v1.14.3(Dec 11, 2022)

    Fixed

    • When the default contents manager is async (i.e. jupyter_server>=2.0.0), the Jupyter server extension for Jupytext derives a contents manager from LargeFileManager instead, as async contents managers are not supported by Jupytext at the moment (#1020)
    • We have made adjustments on the CI as flake8 was moved to GitHub, and Python 3.6 is not available anymore on ubuntu-latest
    Source code(tar.gz)
    Source code(zip)
  • v1.14.2(Dec 5, 2022)

    Fixed

    • The sample notebooks have been normalized with nbformat.validator.normalize (#1002).
    • The warnings in the test suite that we cannot fix are filtered using a new pytest.ini file
    • We updated the yarn.lock file for the jupyter lab extension to address security vulnerabilities (#984, #1005, #1011)

    Changed

    • The CI uses Python 3.9 rather than 3.7 when testing conda environments

    Added

    • Gnuplot is now supported (#998) - thanks to razimantv for this contribution
    • We now test Jupytext against Python 3.6 to 3.11 on the CI
    • We have added a test to document how to use the folder and prefix matching when pairing notebooks (#974)
    Source code(tar.gz)
    Source code(zip)
  • v1.14.1(Jul 29, 2022)

    Fixed

    • The timestamp of a paired notebook is the timestamp of the most recent paired file. This fixes the warning "File Changed" after reloading the notebook in Jupyter (#978).
    Source code(tar.gz)
    Source code(zip)
  • v1.14.0(Jul 3, 2022)

    Changed

    • The Jupytext configuration file has a new option cm_config_log_level that defaults to info_if_changed. With that value, the contents manager will log a line regarding the configuration file used only when the config file is not the same as the one previously used (#959) - many thanks to R.C. Thomas for suggesting this and thoughtfully testing the patch.
    • Hidden configuration files like .jupytext.toml or .jupytext.py are now ignored by Jupytext's contents manager when allow_hidden=False (that option was introduced in jupyter_server==2.0.0a1) (#964).
    • We have changed jupytext --set-formats to make it more similar to jupytext --sync. Now --set-formats will not override existing paired files anymore (#969).

    Added

    • We have added a test test_pre_commit_hook_sync_with_no_config that documents how to use the pre-commit hook without a configuration file (#967)
    Source code(tar.gz)
    Source code(zip)
  • v1.13.8(Apr 4, 2022)

    Fixed

    • Text-only notebooks are always trusted (as they don't include any output cells) (#941)
    • We made sure that our tests also work in absence of a Python kernel (#906)
    • The coverage of the tests folder has been restored at 100%
    • Bash commands like !{cmd} are now correctly escaped in the py:percent format (#938)

    Added

    • Added Tcl as a supported language (#930) - thanks to shishitao for this contribution
    • Added Maxima as a supported language (#927) - thanks to Alberto Lusiani for contributing a sample Maxima notebook.

    Changed

    • The Jupytext contents manager is derived from the LargeFileManager imported from jupyter_server rathen than notebook (#933)
    • Allow for markdown-it-py v2 (#924)
    • We have updated the hooks used in the test pre-commits, to fix an issue on the CI (#940, #942)
    • We updated the yarn.lock file for the jupyter lab extension (#904, #925, #935, #939)
    Source code(tar.gz)
    Source code(zip)
  • v1.13.7(Feb 9, 2022)

    Fixed

    • The Jupytext CLI only suggest --update when the target is an .ipynb file (#905) - thanks to st-- for this contribution
    • We made sure that commands like cat notebook.md | jupytext --execute work (#908)

    Added

    • Added Haskell as supported language (#909) - thanks to codeweber for this contribution

    Changed

    • We have updated the pre-commit hooks and in particular we switched to the first stable version of black==22.1.0.
    • We require pandoc==2.16.2 for testing. The representation for code cells changed from ``` {.python} to ``` python in that version of Pandoc (#906). We don't use pandoc>=2.17 in tests at the moment because of the introduction of cell ids that cannot be filtered.
    • Jupytext will not add anymore a UTF-8 encoding on Python scripts when the notebook contains non-ascii characters (#907)
    • We have added pyupgrade to the pre-commit hooks used for developing Jupytext (#907)
    Source code(tar.gz)
    Source code(zip)
  • v1.13.6(Jan 11, 2022)

    Fixed

    • The text_representation metadata of text notebooks is filtered from .ipynb files both in jupytext.write and in the contents manager for Jupyter (#900)

    Changed

    • Jupytext will not issue a warning when a format suffix starting with '.', '-' or '_' is passed to the --to option (#901)
    Source code(tar.gz)
    Source code(zip)
  • v1.13.5(Dec 28, 2021)

  • v.1.13.5(Dec 27, 2021)

  • v1.13.4(Dec 12, 2021)

    Changed

    • The test suite filters the warnings that don't belong to Jupytext (#823)

    Fixed

    • The parsing of notebooks that don't have a YAML header (like docs/formats.md) was improved.
    • The test suite works with pytest-randomly (#838)
    Source code(tar.gz)
    Source code(zip)
  • v1.13.3(Dec 4, 2021)

    Changed

    • The "Jupytext Notebook" factory that lets the user configure the Notebook viewer as the default for text notebooks accepts more filetypes: "myst", "r-markdown" and "quarto" (#803)
    • Empty MyST Markdown files are valid notebooks (#883)
    • Jupytext also works with markdown-it-py v2.0 (#885)
    Source code(tar.gz)
    Source code(zip)
  • v1.13.2(Nov 30, 2021)

    Changed

    • The extension for Jupyter Lab benefited from a series of improvements contributed by Frédéric Collonval:
      • A new "Jupytext Notebook" factory offers the option to open text notebooks directly with the notebook view (#803). To use it, follow the instructions in the documentation.
      • The ICommandPalette is optional, for compatibility with RISE within JupyterLab RISE#605
      • Added support for translation
    • Branch master was renamed to main (links update)
    Source code(tar.gz)
    Source code(zip)
  • v1.13.1.2(Nov 8, 2021)

  • v1.13.1(Oct 7, 2021)

  • v1.13.0(Sep 25, 2021)

    Added

    • The Jupytext CLI has a new --diff command to show the differences between two notebooks (and if you want to see the changes in a file being updated by Jupytext, use --show-changes) (#799)
    • Jupyter will show the diff between text and ipynb paired notebooks when it cannot open a paired notebook because the ipynb version is more recent. Also, if the inputs in the two files are identical then the notebook will open with no error (#799)
    • The py:percent format will use raw strings when encoding Markdown cells as string, if they contain backslash characters (#836)

    Fixed

    • We have upgraded the jupyterlab extension dependencies and especially ansi-regex to fix a security vulnerability (#857)

    Changed

    • The Jupytext configuration file is reloaded only when a notebook is opened, saved, or when a different folder is explored (#797)
    Source code(tar.gz)
    Source code(zip)
  • v1.12.0(Sep 8, 2021)

    Added

    • Jupytext supports Quarto notebooks (with .qmd extension) (#837)
    • Jupytext can be configured through the pyproject.toml file. Thanks to Robin Brown for this contribution! (#828)
    • Jupytext now supports OCaml files with .ml extension. Thanks to Quentin Fortier for getting this started (#832)

    Fixed

    • Added more test to make sure that notebooks can be trusted. In practice, notebooks could not be trusted in JupyterLab<3.0.13 because of the absence of cell ids (#826)
    Source code(tar.gz)
    Source code(zip)
  • v1.11.5(Aug 31, 2021)

    Fixed

    • Fixed typos revealed by codespell - thanks to @hectormz for this contribution (#829)
    • We updated the dependencies of the jupyterlab-jupytext extension to address several security issues (#842) (#843)
    • The Jupytext dev environment (requirements-dev.txt) now uses jupyterlab==3.0.17 rather than 3.0.0 because of another security issue (#839)
    Source code(tar.gz)
    Source code(zip)
  • v1.11.4(Jul 14, 2021)

    Changed

    • The documentation illustrates how the cell_markers option (and the other ones) can be set directly in the jupytext.toml config file (#809).
    • The dependency on mdit-py-plugins through markdown-it-py[plugins] was made explicit (#814)

    Fixed

    • System assigns of the form var = !cmd are commented out (#816)
    • Fixed an InconsistentPath issue with notebooks paired with scripts in a folder. The prefix in the Jupytext formats always use /, while paths might use either / or \ (#806)
    • Tests that cannot succeed are skipped when either the Jupytext folder is not a git repository, when sphinx-gallery is too recent, or when pandoc is not up-to-date (#814)
    • Removed the mention of '--update' in 'jupytext --pipe' since outputs are preserved already
    Source code(tar.gz)
    Source code(zip)
  • v1.11.3(Jun 10, 2021)

    Changed

    • Jupytext CLI has a new option --use-source-timestamp that sets the last modification time of the output file equal to that of the source file (this avoids having to change the timestamp of the source file) (#784)
    • In the pre-commit mode, Jupytext now uses the commit timestamp to determine which file in the pair is the most recent (#780)

    Fixed

    • Dependencies of the JupyterLab extension have been upgraded to fix a security vulnerability (#798)
    • The --warn-only option also applies to pipes. Use this if the pipe may fail, e.g. if you apply black on a possibly invalid script (#781)
    • Variables assigned from a magic command are commented out in py scripts (#781)
    • Fixed a round-trip issue on notebooks that have None/null in their metadata (#792)
    Source code(tar.gz)
    Source code(zip)
  • v1.11.2(May 2, 2021)

    Changed

    • Jupytext's dependency markdown-it-py is now in v1 (#769)
    • The optional argument fmt in jupytext.reads now has the default value None - thanks to Yuvi Panda (#763)

    Fixed

    • All text files are opened with an explicit utf-8 encoding (#770)
    • Previously --pipe black was not always putting two blank lines between functions. To fix that we load the internal Jupytext cell metadata like lines_to_next_cell from the text file rather than ipynb (#761)
    • The timestamp of the source file is not updated any more when the destination file is not in the pair (#765, #767)

    Added

    • A new test documents when the ipython3 pygment lexer appears in MyST Markdown files (#759)
    Source code(tar.gz)
    Source code(zip)
  • v1.11.1(Mar 25, 2021)

  • v1.11.0(Mar 18, 2021)

    Fixed

    • The jupytext.toml config file can now be used together with the jupytext pre-commit hook (#752)
    • The notebook_extensions option of the jupytext.toml file now works (#746)

    Changed

    • The options in jupytext.toml where renamed to match the jupytext metadata in the text notebooks. One should now use formats rather than default_jupytext_formats and notebook_metadata_filter rather than default_notebook_metadata_filter (#753)
    Source code(tar.gz)
    Source code(zip)
  • v1.10.3(Mar 7, 2021)

    Fixed

    • We have updated marked, an indirect dependency of the jupyterlab-jupytext extension, to fix a moderate vulnerability (#750).
    • We use non-random cell ids in the tests to avoid test failures due to duplicate cell ids (#747)
    Source code(tar.gz)
    Source code(zip)
  • v1.10.2(Feb 16, 2021)

    Fixed

    • We have adjusted the MANIFEST.in file to exclude the node_modules but still include the JupyterLab extension that was missing in the .tar.gz (and conda) package in v1.10.1. Many thanks to Martin Renou for providing the fix at (#741)
    Source code(tar.gz)
    Source code(zip)
  • v1.10.1(Feb 10, 2021)

    Added

    • The recursive glob pattern **/*.ipynb is now supported by Jupytext - Thanks to Banst for this contribution (#731)
    • Sage notebooks are supported. They can be converted to .sage and .md files and back. Thanks to Lars Franke for suggesting this! (#727)
    • Jupytext is also accessible with python -m jupytext. Thanks to Matthew Brett for his PR! (#739)

    Changed

    • We have tested Jupytext with the new cell ids introduced in nbformat>=5.1.0. Cell ids are preserved by the --sync and --update command. So we removed the constraint on the version of nbformat (#735).

    Fixed

    • We filtered out the node_modules folder from the .tar.gz package for Jupytext (#730)
    Source code(tar.gz)
    Source code(zip)
  • v1.10.1rc0(Feb 10, 2021)

    Added

    • The recursive glob pattern **/*.ipynb is now supported by Jupytext - Thanks to Banst for this contribution (#731)
    • Sage notebooks are supported. They can be converted to .sage and .md files and back. Thanks to Lars Franke for suggesting this! (#727)
    • Jupytext is also accessible with python -m jupytext. Thanks to Matthew Brett for his PR! (#739)

    Changed

    • We have tested Jupytext with the new cell ids introduced in nbformat>=5.1.0. Cell ids are preserved by the --sync and --update command. So we removed the constraint on the version of nbformat (#735).

    Fixed

    • We filtered out the node_modules folder from the .tar.gz package for Jupytext (#730)
    Source code(tar.gz)
    Source code(zip)
  • v1.10.0(Feb 4, 2021)

    Added

    • Jupytext has a pre-commit hook! Many thanks to John Paton and Aaron Gokaslan for making this happen (#698)
    • Jupytext CLI will not rewrite files that don't change (#698).
    • If you want to see the diff for changed files, use the new --diff option (#722)
    • We have added isort and autoflake8 to the pre-commit configuration file used for developing the Jupytext project (#709)
    • We made sure that py:percent scripts end with exactly one blank line (#682)
    • We checked that Jupytext works well with symbolic links to folders (not files!) (#696)

    Changed

    • Jupytext does not work properly with the new cell ids of the version 4.5 of nbformat>=5.1.0 yet, so we added the requirement nbformat<=5.0.8 (#715)
    • Jupytext will issue an informative error or warning on notebooks in a version of nbformat that is not known to be supported (#681, #715)

    Fixed

    • Code cells that contain triple backticks (or more) are now encapsulated with four backticks (or more) in the Markdown and MyST Markdown formats. The version number for the Markdown format was increased to 1.3, and the version number for the MyST Markdown format was increased to 0.13 (#712)
    • Indented magic commands are supported (#694)
    Source code(tar.gz)
    Source code(zip)
  • v1.9.1(Jan 6, 2021)

  • v1.9.0(Jan 5, 2021)

Owner
Marc Wouts
Research Manager at Capital Fund Management
Marc Wouts
Pydocstringformatter - A tool to automatically format Python docstrings that tries to follow recommendations from PEP 8 and PEP 257.

Pydocstringformatter A tool to automatically format Python docstrings that tries to follow recommendations from PEP 8 and PEP 257. See What it does fo

Daniël van Noord 31 Dec 29, 2022
Main repository for the Sphinx documentation builder

Sphinx Sphinx is a tool that makes it easy to create intelligent and beautiful documentation for Python projects (or other documents consisting of mul

5.1k Jan 02, 2023
Tutorial for STARKs with supporting code in python

stark-anatomy STARK tutorial with supporting code in python Outline: introduction overview of STARKs basic tools -- algebra and polynomials FRI low de

121 Jan 03, 2023
Count the number of lines of code in a directory, minus the irrelevant stuff

countloc Simple library to count the lines of code in a directory (excluding stuff like node_modules) Simply just run: countloc node_modules args to

Anish 4 Feb 14, 2022
Generates, filters, parses, and cleans data regarding the financial disclosures of judges in the American Judicial System

This repository contains code that gets data regarding financial disclosures from the Court Listener API main.py: contains driver code that interacts

Ali Rastegar 2 Aug 06, 2022
Hjson for Python

hjson-py Hjson, a user interface for JSON Hjson works with Python 2.5+ and Python 3.3+ The Python implementation of Hjson is based on simplejson. For

Hjson 185 Dec 13, 2022
Documentation for the lottie file format

Lottie Documentation This repository contains both human-readable and machine-readable documentation about the Lottie format The documentation is avai

LottieFiles 25 Jan 05, 2023
Convert excel xlsx file's table to csv file, A GUI application on top of python/pyqt and other opensource softwares.

Convert excel xlsx file's table to csv file, A GUI application on top of python/pyqt and other opensource softwares.

David A 0 Jan 20, 2022
A plugin to introduce a generic API for Decompiler support in GEF

decomp2gef A plugin to introduce a generic API for Decompiler support in GEF. Like GEF, the plugin is battery-included and requires no external depend

Zion 379 Jan 08, 2023
Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.

Introduction Swagger UI allows anyone — be it your development team or your end consumers — to visualize and interact with the API’s resources without

Swagger 23.2k Dec 29, 2022
A python package to import files from an adjacent folder

EasyImports About EasyImports is a python package that allows users to easily access and import files from sister folders: f.ex: - Project - Folde

1 Jun 22, 2022
A tutorial for people to run synthetic data replica's from source healthcare datasets

Synthetic-Data-Replica-for-Healthcare Description What is this? A tailored hands-on tutorial showing how to use Python to create synthetic data replic

11 Mar 22, 2022
Data science on SDGs - Udemy Online Course Material: Data Science on Sustainable Development Goals

Data Science on Sustainable Development Goals (SDGs) Udemy Online Course Material: Data Science on Sustainable Development Goals https://bit.ly/data_s

Frank Kienle 1 Jan 04, 2022
A web app builds using streamlit API with python backend to analyze and pick insides from multiple data formats.

Data-Analysis-Web-App Data Analysis Web App can analysis data in multiple formates(csv, txt, xls, xlsx, ods, odt) and gives shows you the analysis in

Kumar Saksham 19 Dec 09, 2022
Essential Document Generator

Essential Document Generator Dead Simple Document Generation Whether it's testing database performance or a new web interface, we've all needed a dead

Shane C Mason 59 Nov 11, 2022
Service for visualisation of high dimensional for hydrosphere

hydro-visualization Service for visualization of high dimensional for hydrosphere DEPENDENCIES DEBUG_ENV = bool(os.getenv("DEBUG_ENV", False)) APP_POR

hydrosphere.io 1 Nov 12, 2021
🏆 A ranked list of awesome python developer tools and libraries. Updated weekly.

Best-of Python Developer Tools 🏆 A ranked list of awesome python developer tools and libraries. Updated weekly. This curated list contains 250 awesom

Machine Learning Tooling 646 Jan 07, 2023
Fun interactive program to sort a list :)

LHD-Build-Sort-a-list Fun interactive program to sort a list :) Inspiration LHD Build Write a script to sort a list. What it does It is a menu driven

Ananya Gupta 1 Jan 15, 2022
A fast time mocking alternative to freezegun that wraps libfaketime.

python-libfaketime: fast date/time mocking python-libfaketime is a wrapper of libfaketime for python. Some brief details: Linux and OS X, Pythons 3.5

Simon Weber 68 Jun 10, 2022
Proyecto - Desgaste y rendimiento de empleados de IBM HR Analytics

Acceder al código desde Google Colab para poder ver de manera adecuada todas las visualizaciones y poder interactuar con ellas. Links de acceso: Noteb

1 Jan 31, 2022