{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# ワークフロー実行結果を書き戻す\n", "\n", "このノートブックでは、変更内容をginリポジトリに書き戻します。 \n", "※各セクションのセルでpapermillによって自動実行されるノートブックなので手作業での実施は非推奨です。" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "tags": [ "parameters" ] }, "outputs": [], "source": [ "SIBLING_NAME = \"gin\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "※PATHが指定されない場合は/home/jovyan/をPATHとする" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "tags": [ "parameters" ] }, "outputs": [], "source": [ "PATH = \"/home/jovyan\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 1. 書き戻しの準備を行う" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from datalad import api\n", "\n", "api.save(message=SAVE_MESSAGE, path=PATH, recursive=True)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 2. 変更内容を書き戻す" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from datalad import api\n", "\n", "api.push(to=SIBLING_NAME, result_renderer='default', path=PATH, recursive=True)" ] } ], "metadata": { "celltoolbar": "Tags", "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.8" } }, "nbformat": 4, "nbformat_minor": 4 }