bibliotekar.Shelf#
- class bibliotekar.Shelf(path)[source]#
- A code shelf. - Methods - __init__(path)- Initialize from any path within the shelf. - latest_commit_of(path)- Get the latest commit of a file in this shelf. - Find all notebook templates in this shelf. - Find all notebooks in this shelf. - scripts()- Find all scripts in this shelf. - Find all code submissions in this shelf. - Attributes - The name of this shelf. - Path to the notebooks directory in this shelf. - The git repository of this shelf. - The root directory of this shelf. - Path to the scripts directory in this shelf. - Path to the templates directory in this shelf. - The URL of this shelf. - latest_commit_of(path)[source]#
- Get the latest commit of a file in this shelf. - Return type:
- Commit|- None
 
 - notebook_templates()[source]#
- Find all notebook templates in this shelf. - This function yields all Jupyter notebook template submissions in - self. Only templates in the- {root}/templatesfolder and its subfolders are yielded.- Yields:
- Paths to all notebook templates that were found. 
- Return type:
- Iterable[- Path]
 
 - notebooks()[source]#
- Find all notebooks in this shelf. - This function yields all Jupyter notebook submissions in - self. Only notebooks in the- {root}/notebooksfolder and its subfolders are yielded.- Yields:
- Paths to all notebooks that were found. 
- Return type:
- Iterable[- Path]
 
 - property repo: Repo#
- The git repository of this shelf. 
 - scripts()[source]#
- Find all scripts in this shelf. - This function yields all Python scripts submissions in - self. Only scripts in the- {root}/scriptsfolder and its subfolders are yielded.- Yields:
- Paths to all scripts that were found. 
- Return type:
- Iterable[- Path]
 
 - submissions()[source]#
- Find all code submissions in this shelf. - This function yields all - Jupyter notebooks, 
- Jupyter notebook templates, 
- Python scripts. 
 - Only files in the respective submission folders and their subfolders are yielded. - Yields:
- Paths to all files that were found. 
 - See also - fShelf.notebooks
- Find only Jupyter notebooks. 
- Shelf.notebook_templates
- Find only Jupyter notebook templates. 
- Shelf.scripts
- Find only Python scripts. 
 - Return type:
- Iterable[- Path]