nblibrarian
Tools for maintaining a library of Jupyter notebooks that are sourced from a “warehouse” of notebooks (another github repository).
Installing
You can install nblibrarian from pypi
pip install nblibrarian
or from source
git clone https://github.com/lheagy/nblibrarian
cd nblibrarian
pip install -e .
Configuring nblibrarian
There are two files that you need in order to configure nblibrarian:
.library-config.yml
The .library-config.yml file specifies details of the source repository and if you would like to include the environment.yml file and / or the requirements.txt file. (We recommend you download at least one of these). The structure of the .library-config.yml is as follows:
# information about the source library
source:
github:
user: geoscixyz # github username or organization
repo: geosci-labs # github repository
branch: master # [optional] branch to fetch material from
directory: notebooks # [optional] directory where the notebooks are in the repository - including it will speed up the search for the desired notebooks
# setup options for the library
setup:
environment: environment.yml # [optional] include the environment.yml from the source
requirements: requirements.txt # [optional] include the requirements.txt file
.jupyter-include
The .jupyter-include file describes which notebooks you would like included in your library. It follows the same syntax as a .gitignore file.
# this is a comment
# dc resistivity
notebooks/dcip/DCIP_2D_Overburden_Pseudosections.ipynb # you can specify the full path
notebooks/dcip/DC_Building_Pseudosections # also without the .ipynb extension
DC_Cylinder_2D.ipynb # or just specify the notebook name
# em
/em/EM_Pipeline.ipynb
em/EM_ThreeLoopModel.ipynb
em/*Sphere*.ipynb # includes all notebooks in a directory called em with "Sphere" in the title
# magnetics
mag/*.ipynb # includes all notebooks in the mag directory
# inversion
inversion # includes notebooks in the inversion directory
Usage
Once you have specified the .library-config.yml and the .jupyter-include, you can run nblibrarian from the command line to download the files you specified.
nblibrarian
There are also a few options, to run in verbose mode use
nblibrarian -v
If you ever want to update your library, you can always alter the .jupyter-include and re-run nblibrarian. By default, it will not overwrite your current notebooks. If you do want it to overwrite them, then run
nblibrarian --overwrite=True
If you would like to specify the path to the jupyter include and config files (for example if you put them in a different directory), then use
nblibrarian --config=.library-config.yml --jupyter-include=.jupyter-include
Issues
If you run into any bugs, questions or problems using nblibrarian, please create an issue on github.
License
This work is Licensed under the BSD 3-Clause License.
Metadata
Release files for nblibrarian 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nblibrarian-0.0.1.tar.gz | 6.3 kB | Without provenance | Details for nblibrarian-0.0.1.tar.gz |
Release files / nblibrarian-0.0.1.tar.gz
| Download URL | nblibrarian-0.0.1.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
05a3827e83f84a46758f5378fe49bba7f48fef820446606b2084d6c621b7dc3a
|
|
BLAKE2b-256 checksum How to use checksums |
2c031d2eaff4b273ef6319c6fbd898e7b297c90f5e180edf925b03ab58c3596e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.6
|
Security for nblibrarian 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.