ganga.GangaCore.Lib.Notebook.Notebook module

Notebook application – execute Jupyter notebooks.

All cells in the notebooks given as inputfiles will be evaluated and the results returned in the same notebooks.

A simple example is

app = Notebook() infiles = [LocalFile(‘/abc/test.ipynb’)] outfiles = [LocalFile(‘test.ipynb’)] j = Job(application=app, inputfiles=files, backend=Local()) j.submit()

The input can come from any GangaFile type supported and the same is the case for the output.

All inputfiles matching the regular expressions (default all files ending in .ipynb) given are executed. Other files will simply be unpacked and available.

ganga.GangaCore.Lib.Notebook.Notebook.const_lock

This is a context manager which acquires the const write lock on the object’s root object.

This lock acquires exclusive access over an object tree to prevent it from changing. Reading schema attributes on the object is still allowed but changing them is not. Only one thread can hold this lock at once.