Package: pylabnotebook
Labnotebook 📔🖥This project aims to help bioinformaticians in creating the so called "Laboratory notebook" automatically, thanks to git workflow manager.IMPORTANT: this tool is based on git and its application, in particular, through git history it will create an html notebook divided by date and commit.FeaturesAutomatically create a laboratory notebookCustomizable CSS fileDirect link to analysis files (expecially for user who creates .html reports. e.g. markdown or jupyter notebook html)Export to htmlInstallationTo install the package, run:pip install pylabnotebookThis will install the pylabnotebook package; you can then runlabnotebookfunction from within the terminal (detailed explanation below).Notebook structureThe structure of the notebook is very simple. You can see an examplehere.On top, you have the notebook name, the author and the notebook creation date. Then, for each day, you have a list of all the commits done, organized as follow:Commit message (first line)Commit bodyCommit authorCommit shaAnalysis file (which can be hidden if you don't have this type of features)List of changed filesCreate a notebookTo create a notebook, go to the folder in which is present the .git folder and typelabnotebook create -n <name_of_the_notebook>. If you want to have spaces in your name, just wrap it into quotes.A .labnotebook folder is created, containing config.json file, a basic .css file and three file containing head, body and footer html file.IMPORTANT: never change the name of the created folder and its files!Update a notebookWhen you want to update the notebook, go to the folder in which is present the .git folder, typelabnotebook update. It will check for new commits and upate the files in .labnotebook folder.If the git history have changed and the last commit present in the labnotebook is no longer in git history, it will raise an error; you can skip this by forcing the update (-f/--force).IMPORTANT: After each notebook update a commit is made with labnotebook as author. This will ensure that these commits are not considered during the update, as only commits without labnotebook as author are used.Link to analysis filesWhen updating the notebook, it automatically create a list of analysis files for each commit with direct links to them. By default, it takes all the .html files changed/added in that commit.If you want to add different extensions, you can update the .labnotebook config.json file by adding/removing extensions in the ANALYSIS_EXT variable. Each extension should be separated by a comma, as it is considered an array (eg. "ANALYSIS_EXT": ['.html', '.txt'])Just type the extension, not wildcards or other special characters.Moreover, by creating a ".labignore" file, you can exclude some files/folders to be recognized as analysis files (as for a standard .gitignore file it will use wildcards).Export html fileWhen you want to export the full html file containing the notebook, go to the folder in which is present the .git folder, typelabnotebook export -o <name_of_the_output_file>.Issue reporting and suggestionsIf you find any issue or you want to suggest some edit, please feel free to open an issue or a pull request.