{ "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'\n", "SAVE_MESSAGE = '[GIN] modify on binder'\n", "PATH = '/home/jovyan'\n", "IS_RECURSIVE = True\n", "TO_GIT = False\n", "RESULT_RENDERER = 'default'" ] }, { "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=IS_RECURSIVE, to_git=TO_GIT)\n", "api.unlock(PATH)" ] }, { "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=RESULT_RENDERER, path=PATH, recursive=IS_RECURSIVE)" ] } ], "metadata": { "celltoolbar": "Tags", "kernelspec": { "display_name": "Python 3 (ipykernel)", "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.10" } }, "nbformat": 4, "nbformat_minor": 4 }