lineapy.editors package

Submodules

lineapy.editors.ipython module

Transforms all executions in IPython to execute with lineapy, by adding to input_transformers_post. You can find more documentations below: https://ipython.readthedocs.io/en/stable/config/inputtransforms.html

lineapy.editors.ipython.start(session_name: Optional[str] = None, db_url: Optional[str] = None, ipython: Optional[InteractiveShell] = None) None[source]

Initializing the runtime so that the cells are traced with lineapy.

lineapy.editors.ipython.stop() None[source]

Stop tracing if the stop() was called in the cell and should_stop was set. Also track the lib information (would be the most complete).

lineapy.editors.ipython.visualize(*, live=False) None[source]

Display a visualization of the Linea graph from this session using Graphviz.

If live=True, then this visualization will live update after cell execution. Note that this comes with a substantial performance penalty, so it is False by default.

Note: If the visualization is not live, it will print out the visualization as of the previous cell execution, not the one where visualize is executed.

lineapy.editors.ipython_cell_storage module

lineapy.editors.ipython_cell_storage.cleanup_cells()[source]

Remove the temporary directory with all of the files

lineapy.editors.ipython_cell_storage.get_cell_path(cell: JupyterCell) Path[source]

Return the path to the temporary file for the given cell. This is used for both generating the file and accessing the file.

lineapy.editors.ipython_cell_storage.get_location_path(location: Union[Path, JupyterCell]) Path[source]

Currently, this function is used exclusively for accurate error reporting (e.g., when there is an exception, such as 1/0). Without providing a file path, the errors will show up as “?” in both IPython and CLI executions.

We had add the get_cell_path as a special case because the file location is managed separately by us (not the user provided file path).

Module contents