kynan / nbstripout

strip output from Jupyter and IPython notebooks
Other
1.19k stars 95 forks source link

Strip execution timing by default #118

Closed mlucool closed 4 years ago

mlucool commented 4 years ago

Removing execution timing seems in line with the rest of the defaults. Today this can be done via:

git config filter.nbstripout.extrakeys cell.metadata.execution

Can this be changed to be the default?

kynan commented 4 years ago

@mlucool agreed! Do you have an example notebook I could use as a test?

mlucool commented 4 years ago
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2020-05-28T20:57:07.733742Z",
     "iopub.status.busy": "2020-05-28T20:57:07.733470Z",
     "iopub.status.idle": "2020-05-28T20:57:07.788874Z",
     "shell.execute_reply": "2020-05-28T20:57:07.788239Z",
     "shell.execute_reply.started": "2020-05-28T20:57:07.733718Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Hello World\n"
     ]
    }
   ],
   "source": [
    "print('Hello World')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "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.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}

You can also make one in lab by setting "recordTiming": true in the Advanced Settings->Notebook.