sphinx_gallery.interactive_example#
Binder と JupyterLite のユーティリティ関数。
Binder および JupyterLite との統合は実験段階です。この API は将来変更される可能性があります。
警告
Binder はまだベータ版の技術であるため、Binder リンクをクリックしたユーザーの体験に不安定性がある可能性があります。
関数#
- sphinx_gallery.interactive_example.check_jupyterlite_conf(jupyterlite_conf, app)[ソース]#
デフォルト値を含む完全な JupyterLite 設定を返します。
- sphinx_gallery.interactive_example.copy_binder_files(app, exception)[ソース]#
すべての Binder 要件ファイルとノートブックファイルをコピーします。
- sphinx_gallery.interactive_example.create_jupyterlite_contents(app, exception)[ソース]#
「jupyterlite」設定に従って JupyterLite コンテンツを作成します。
- sphinx_gallery.interactive_example.gen_binder_rst(fpath, binder_conf, gallery_conf)[ソース]#
Binder バッジの reST + リンクを生成します。
- パラメータ:
**fpath** (str) – Binder バッジが生成される .py ファイルへのパス。
**binder_conf** (dict または None) –
辞書の場合、次のキーが必要です
- ’binderhub_url’
Binder サービスを実行している BinderHub インスタンスの URL。
- ’org’
ドキュメントがプッシュされる GitHub 組織。
- ’repo’
ドキュメントがプッシュされる GitHub リポジトリ。
- ’branch’
ドキュメントが存在する Git ブランチ (例: gh-pages)。
- ’dependencies’
Binderspec に一致する依存関係ファイルへのパスのリスト。
**gallery_conf** (dict) – Sphinx-Gallery 設定辞書。
- 戻り値:
**rst** – このファイルにリンクする Binder バッジの reStructuredText。
- 戻り値の型:
- sphinx_gallery.interactive_example.gen_binder_url(fpath, binder_conf, gallery_conf)[ソース]#
conf.py の設定に従って Binder URL を生成します。
- パラメータ:
**fpath** (str) – Binder バッジが生成される .py ファイルへのパス。
**binder_conf** (dict または None) – Binder 設定辞書。詳細は `gen_binder_rst` を参照してください。
- 戻り値:
**binder_url** – ユーザーをライブ Binder 環境に誘導するために使用できる URL。
- 戻り値の型:
- sphinx_gallery.interactive_example.gen_jupyterlite_rst(fpath, gallery_conf)[ソース]#
Binder バッジの reST + リンクを生成します。
- パラメータ:
**fpath** (str) – JupyterLite バッジが生成される .py ファイルへのパス。
**gallery_conf** (dict) – Sphinx-Gallery 設定辞書。
- 戻り値:
**rst** – このファイルにリンクする JupyterLite バッジの reStructuredText。
- 戻り値の型: