Skip to content

Commit ca36652

Browse files
committed
Rerun performance benchmarks
1 parent cad571f commit ca36652

File tree

6 files changed

+10
-19
lines changed

6 files changed

+10
-19
lines changed

.pre-commit-config.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ repos:
88
additional_dependencies:
99
- black==23.3.0 # Matches hook
1010

11-
# - id: jupytext
12-
# args: [--sync]
13-
1411
- repo: https://github.com/psf/black
1512
rev: 23.3.0
1613
hooks:

NOTES.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
# TODO
22

33
## Triage
4-
- [ ] Consider how to set off the 'proceed' output as a dedicated code block in jupyter
5-
- [ ] Read `runbook plan ...` support reading params from file
4+
- [x] Read `runbook plan ...` support reading params from file
65
- [ ] Re-export confirm(style) and gather from sh lib
76
- [ ] Make sure we can run directly fully through cli
87
- [ ] If no argument included for RUNBOOK TITLE in edit/plan/run then prompt with options
9-
- [ ] Include field 'embeds' in the metadata to help with referencing them
8+
- [x] Include field 'embeds' in the metadata to help with referencing them
109
- [ ] --- Add helper for referencing the embeds?
1110
- [ ] Use execute and upload output to S3 for non-interactive: https://github.com/nteract/papermill/tree/main?tab=readme-ov-file#execute-via-cli
1211

1312
## P0
13+
- [ ] Install pre-commit.yml or git integration during `init` for secure linting and talisman
1414
- [x] Setup versioning and bumper (using versioner from npm ecosystem @release-it and @release-it/bumper)
1515
- [x] Fix tag key getting stripped out of planned runbooks b/c it breaks papermill
16-
- [ ] Setup a watcher for auto-exporting html or other formats
1716
- [x] Setup tagging in the notebooks to auto-set those values
18-
- [ ] Setup git to autoclear cell outputs for a given folder's notebooks (ie templates) https://stackoverflow.com/a/58004619
17+
- [ ] Security: Setup git to autoclear cell outputs for a given folder's notebooks (ie templates) https://stackoverflow.com/a/58004619
1918
- [x] Assess if we need shell completions
2019
- [x] Yes, very nice and use https://click.palletsprojects.com/en/8.1.x/shell-completion/#custom-type-completion to define for custom types, ie only find ipynb files for edit, create, etc
2120
- [ ] Integrate mechanisms to read Grafana or other data sources and package "pre/post check" helpers
@@ -25,8 +24,8 @@
2524
- [ ] Include safe way to retry when APIs fail but with confirmation
2625
- for handling the case when infrastructure API calls fail when made in large async batch
2726
- [ ] Immutably store everything with bookstore https://github.com/nteract/bookstore
27+
- [ ] Setup a watcher for auto-exporting html or other formats
2828
- [x] Use slack notify for posting execution steps: https://github.com/keitakurita/jupyter-slack-notify
29-
- [ ] Install pre-commit.yml or git integration during `init`
3029

3130
## P2
3231
- [x] Setup different folder from runbooks for execution files?

PERFORMANCE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
22
|:---|---:|---:|---:|---:|
3-
| `runbook` | 373.6 ± 6.5 | 367.8 | 389.6 | 1.00 |
3+
| `runbook` | 390.5 ± 3.8 | 383.6 | 395.0 | 1.00 |

runbook/cli/commands/create.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@
2828
@click.pass_context
2929
def create(ctx, filename, template, language):
3030
"""Create a new runbook from [template]"""
31-
# TODO: guard against anything other than a bare name
32-
# Allow override for alternate language default
33-
# TODO: allow reading from project config file
31+
3432
if language:
3533
template = language
3634
if path.basename(filename) != filename:

runbook/cli/commands/plan.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,6 @@ def plan(ctx, input, embed, identifier="", params={}):
118118
if not Path(output_folder).exists():
119119
os.makedirs(output_folder, exist_ok=True)
120120

121-
# TODO: safety check if we already have one with this SHA in folder, in which case prompt
122-
# and offer to skip.
123-
124121
pm.execute_notebook(
125122
input_path=input,
126123
output_path=full_output,
@@ -133,8 +130,6 @@ def plan(ctx, input, embed, identifier="", params={}):
133130
full_output,
134131
]
135132

136-
# TODO: join the unified logic of create and plan
137-
138133
nbconvert_launch_instance(argv, clear_output=True)
139134

140135
for f in embed:

runbook/cli/lib.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import sys
33
from io import StringIO
44

5-
from nbconvert.nbconvertapp import NbConvertApp
65
from ulid import ULID
76

87

@@ -21,6 +20,9 @@ def ts_id(length=10):
2120

2221
# Suppresses nbconvert output
2322
def nbconvert_launch_instance(argv, clear_output=True):
23+
# Imported here to avoid performance hit of importing it
24+
from nbconvert.nbconvertapp import NbConvertApp
25+
2426
if clear_output:
2527
argv.insert(0, "--ClearOutputPreprocessor.enabled=True")
2628
stdout = sys.stdout

0 commit comments

Comments
 (0)