Skip to content

Commit

Permalink
add ploomber-extension (#95)
Browse files Browse the repository at this point in the history
* adds ploomber extension

* changelog

* fix test

* lint

* fix
  • Loading branch information
edublancas authored Feb 8, 2024
1 parent 80900fc commit c3aaee8
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# CHANGELOG

## 0.0.32dev

* [Feature] Add benchmarking CLI `python -m ploomber_engine.benchmark`
* [Feature] Add `ploomber-extension` as a dependency

## 0.0.31 (2023-08-24)

Expand Down
1 change: 1 addition & 0 deletions override_failed_result_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
this happens sometimes when we make changes, we have to check manually
if differences are acceptable, then run this script
"""

from pathlib import Path
from glob import glob
import shutil
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

REQUIRES = [
"ploomber-core>=0.2",
"ploomber-extension",
"debuglater>=1.4.4",
# used for our debug now feature (PloomberNotebookClient)
"nbclient",
Expand All @@ -37,7 +38,8 @@

DEV = [
"pkgmt",
"pytest",
# using pytest 7 because of an issue when using @pytest.mark.memory
"pytest<8",
"flake8",
"invoke",
"twine",
Expand Down
1 change: 1 addition & 0 deletions src/ploomber_engine/benchmark.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
A module to benchmark notebooks in a directory.
"""

from pathlib import Path

import click
Expand Down
1 change: 1 addition & 0 deletions src/ploomber_engine/cli.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Command-line interface
"""

import ast
import click

Expand Down
1 change: 1 addition & 0 deletions src/ploomber_engine/execute.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Abstractions for running notebooks with papermill-like interface
"""

import warnings
from pathlib import Path
import csv
Expand Down
8 changes: 5 additions & 3 deletions src/ploomber_engine/ipython.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,9 +489,11 @@ def execute(self, parameters=None):
if self._debug_later:
add_debuglater_cells(
self._nb,
path_to_dump=self._debug_later
if isinstance(self._debug_later, (str, Path))
else None,
path_to_dump=(
self._debug_later
if isinstance(self._debug_later, (str, Path))
else None
),
)

with self:
Expand Down
1 change: 1 addition & 0 deletions src/ploomber_engine/testing.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Testing notebooks against their recorded outputs
"""

import warnings

import nbformat
Expand Down
1 change: 1 addition & 0 deletions src/ploomber_engine/tracking/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
NOTE: this was copied from
https://github.com/ploomber/jupyblog/blob/master/src/jupyblog/execute.py
"""

from pathlib import Path
import base64
import re
Expand Down
1 change: 1 addition & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Command-line interface tests
"""

from unittest.mock import Mock, call

import pytest
Expand Down
2 changes: 1 addition & 1 deletion tests/test_tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,4 +311,4 @@ def test_tracking_import_telemetry(tmp_empty, monkeypatch):
quiet=True,
)

assert mock.call_count == 2
assert mock.call_count == 1

0 comments on commit c3aaee8

Please sign in to comment.