diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index c02a3b7..e4d4bd9 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -64,7 +64,7 @@ jobs: path: dist - name: Install build + test dependencies - run: pip install pytest dist/*.whl + run: pip install pytest dist/*.whl nbconvert ipykernel - name: Test package run: jupyter nbconvert examples/**/*.ipynb src/**/*.ipynb --to=notebook --execute --output-dir=$(mktemp -d) diff --git a/src/literary/core/transformers.ipynb b/src/literary/core/transformers.ipynb index 53eb2f1..288d5c1 100644 --- a/src/literary/core/transformers.ipynb +++ b/src/literary/core/transformers.ipynb @@ -16,14 +16,7 @@ "cell_type": "code", "execution_count": 1, "id": "eaa04dfe-1007-44a8-ad14-28f16f82f5c5", - "metadata": { - "execution": { - "iopub.execute_input": "2021-05-17T16:24:07.671316Z", - "iopub.status.busy": "2021-05-17T16:24:07.670669Z", - "iopub.status.idle": "2021-05-17T16:24:07.959810Z", - "shell.execute_reply": "2021-05-17T16:24:07.958354Z" - } - }, + "metadata": {}, "outputs": [], "source": [ "%load_ext literary.notebook\n", @@ -38,12 +31,6 @@ "execution_count": 2, "id": "extended-national", "metadata": { - "execution": { - "iopub.execute_input": "2021-05-17T16:24:07.965391Z", - "iopub.status.busy": "2021-05-17T16:24:07.964182Z", - "iopub.status.idle": "2021-05-17T16:24:07.967385Z", - "shell.execute_reply": "2021-05-17T16:24:07.968202Z" - }, "tags": [ "export" ] @@ -62,12 +49,6 @@ "execution_count": 3, "id": "elect-event", "metadata": { - "execution": { - "iopub.execute_input": "2021-05-17T16:24:07.974379Z", - "iopub.status.busy": "2021-05-17T16:24:07.973776Z", - "iopub.status.idle": "2021-05-17T16:24:07.977045Z", - "shell.execute_reply": "2021-05-17T16:24:07.977552Z" - }, "tags": [ "export" ] @@ -82,12 +63,6 @@ "execution_count": 4, "id": "opponent-bottle", "metadata": { - "execution": { - "iopub.execute_input": "2021-05-17T16:24:07.981273Z", - "iopub.status.busy": "2021-05-17T16:24:07.980672Z", - "iopub.status.idle": "2021-05-17T16:24:07.983199Z", - "shell.execute_reply": "2021-05-17T16:24:07.983787Z" - }, "tags": [ "export" ] @@ -118,12 +93,6 @@ "execution_count": 5, "id": "swedish-denial", "metadata": { - "execution": { - "iopub.execute_input": "2021-05-17T16:24:07.995409Z", - "iopub.status.busy": "2021-05-17T16:24:07.994720Z", - "iopub.status.idle": "2021-05-17T16:24:07.998263Z", - "shell.execute_reply": "2021-05-17T16:24:07.997281Z" - }, "tags": [ "export" ] @@ -175,14 +144,7 @@ "cell_type": "code", "execution_count": 6, "id": "imperial-character", - "metadata": { - "execution": { - "iopub.execute_input": "2021-05-17T16:24:08.004341Z", - "iopub.status.busy": "2021-05-17T16:24:08.003348Z", - "iopub.status.idle": "2021-05-17T16:24:08.005602Z", - "shell.execute_reply": "2021-05-17T16:24:08.004995Z" - } - }, + "metadata": {}, "outputs": [], "source": [ "ipython_transformer = IPythonTransformer(error_if_ipython=True)" @@ -200,14 +162,7 @@ "cell_type": "code", "execution_count": 7, "id": "transsexual-chart", - "metadata": { - "execution": { - "iopub.execute_input": "2021-05-17T16:24:08.009670Z", - "iopub.status.busy": "2021-05-17T16:24:08.009018Z", - "iopub.status.idle": "2021-05-17T16:24:08.011318Z", - "shell.execute_reply": "2021-05-17T16:24:08.011828Z" - } - }, + "metadata": {}, "outputs": [], "source": [ "node = ast.parse(\"get_ipython().magic('matplotlib inline')\")" @@ -225,14 +180,7 @@ "cell_type": "code", "execution_count": 8, "id": "guided-planning", - "metadata": { - "execution": { - "iopub.execute_input": "2021-05-17T16:24:08.016506Z", - "iopub.status.busy": "2021-05-17T16:24:08.015891Z", - "iopub.status.idle": "2021-05-17T16:24:08.018662Z", - "shell.execute_reply": "2021-05-17T16:24:08.018038Z" - } - }, + "metadata": {}, "outputs": [], "source": [ "with pytest.raises(ValueError):\n", @@ -253,12 +201,6 @@ "execution_count": 9, "id": "indonesian-prior", "metadata": { - "execution": { - "iopub.execute_input": "2021-05-17T16:24:08.031708Z", - "iopub.status.busy": "2021-05-17T16:24:08.031058Z", - "iopub.status.idle": "2021-05-17T16:24:08.035317Z", - "shell.execute_reply": "2021-05-17T16:24:08.033968Z" - }, "tags": [ "export" ] @@ -360,14 +302,7 @@ "cell_type": "code", "execution_count": 10, "id": "rental-ladder", - "metadata": { - "execution": { - "iopub.execute_input": "2021-05-17T16:24:08.040967Z", - "iopub.status.busy": "2021-05-17T16:24:08.040280Z", - "iopub.status.idle": "2021-05-17T16:24:08.042713Z", - "shell.execute_reply": "2021-05-17T16:24:08.042069Z" - } - }, + "metadata": {}, "outputs": [], "source": [ "transformer = PatchTransformer(patch_decorator_id=\"patch\")" @@ -377,14 +312,7 @@ "cell_type": "code", "execution_count": 11, "id": "speaking-yellow", - "metadata": { - "execution": { - "iopub.execute_input": "2021-05-17T16:24:08.046797Z", - "iopub.status.busy": "2021-05-17T16:24:08.046189Z", - "iopub.status.idle": "2021-05-17T16:24:08.049001Z", - "shell.execute_reply": "2021-05-17T16:24:08.048399Z" - } - }, + "metadata": {}, "outputs": [], "source": [ "node = ast.parse(\n", @@ -407,31 +335,27 @@ "cell_type": "code", "execution_count": 12, "id": "polyphonic-airfare", - "metadata": { - "execution": { - "iopub.execute_input": "2021-05-17T16:24:08.053388Z", - "iopub.status.busy": "2021-05-17T16:24:08.052793Z", - "iopub.status.idle": "2021-05-17T16:24:08.055769Z", - "shell.execute_reply": "2021-05-17T16:24:08.055148Z" - } - }, + "metadata": {}, "outputs": [], "source": [ "new_node = transformer.visit(node)" ] }, + { + "cell_type": "code", + "execution_count": null, + "id": "8b266ea1-cf33-4911-bca6-2141119d3a15", + "metadata": {}, + "outputs": [], + "source": [ + "raise ValueError" + ] + }, { "cell_type": "code", "execution_count": 13, "id": "charitable-regular", - "metadata": { - "execution": { - "iopub.execute_input": "2021-05-17T16:24:08.060187Z", - "iopub.status.busy": "2021-05-17T16:24:08.059551Z", - "iopub.status.idle": "2021-05-17T16:24:08.063878Z", - "shell.execute_reply": "2021-05-17T16:24:08.063338Z" - } - }, + "metadata": {}, "outputs": [ { "name": "stdout",