nbsync 0.2.3__py3-none-any.whl → 0.3.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nbsync/logger.py +1 -1
- nbsync/notebook.py +8 -2
- {nbsync-0.2.3.dist-info → nbsync-0.3.1.dist-info}/METADATA +1 -1
- {nbsync-0.2.3.dist-info → nbsync-0.3.1.dist-info}/RECORD +6 -6
- {nbsync-0.2.3.dist-info → nbsync-0.3.1.dist-info}/WHEEL +0 -0
- {nbsync-0.2.3.dist-info → nbsync-0.3.1.dist-info}/licenses/LICENSE +0 -0
nbsync/logger.py
CHANGED
@@ -7,7 +7,7 @@ from typing import Any
|
|
7
7
|
_logger = logging.getLogger("nbsync")
|
8
8
|
|
9
9
|
|
10
|
-
def
|
10
|
+
def set_logger(logger: Logger | LoggerAdapter | None = None) -> Logger | LoggerAdapter:
|
11
11
|
global _logger # noqa: PLW0603
|
12
12
|
|
13
13
|
if logger:
|
nbsync/notebook.py
CHANGED
@@ -5,6 +5,8 @@ from typing import TYPE_CHECKING
|
|
5
5
|
|
6
6
|
import nbstore.notebook
|
7
7
|
|
8
|
+
from nbsync import logger
|
9
|
+
|
8
10
|
if TYPE_CHECKING:
|
9
11
|
from nbformat import NotebookNode
|
10
12
|
|
@@ -35,5 +37,9 @@ class Notebook:
|
|
35
37
|
return nbstore.notebook.equals(self.nb, other.nb)
|
36
38
|
|
37
39
|
def execute(self) -> None:
|
38
|
-
|
39
|
-
|
40
|
+
try:
|
41
|
+
nbstore.notebook.execute(self.nb)
|
42
|
+
self.execution_needed = False
|
43
|
+
|
44
|
+
except ModuleNotFoundError as e: # no cov
|
45
|
+
logger.warning(e.msg)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: nbsync
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.3.1
|
4
4
|
Summary: A core library to synchronize Jupyter notebooks and Markdown documents, enabling seamless integration and dynamic content execution
|
5
5
|
Project-URL: Documentation, https://daizutabi.github.io/nbsync/
|
6
6
|
Project-URL: Source, https://github.com/daizutabi/nbsync
|
@@ -1,11 +1,11 @@
|
|
1
1
|
nbsync/__init__.py,sha256=3NuWx9D0LcBnXjEKrC-uypNDOz8rLWXI7mIjdN9xSeE,126
|
2
2
|
nbsync/cell.py,sha256=C7VqQO3mxZ7Nj4ufywTnaqZAegT7zqA6iN2WV6X5X5c,3786
|
3
|
-
nbsync/logger.py,sha256=
|
3
|
+
nbsync/logger.py,sha256=snNRqi9xESj4B-Z9GQffCBlgqeVujvuXuBveWAebIWM,736
|
4
4
|
nbsync/markdown.py,sha256=xcPhQKWpFDyVQ_xtZCpFrnR0QED_hYs4PAyaT7dF3t4,3830
|
5
|
-
nbsync/notebook.py,sha256=
|
5
|
+
nbsync/notebook.py,sha256=UncedeEzU-hYa8eZ_NQKjjOcaAiCxb3oIgwGB1mTKas,1143
|
6
6
|
nbsync/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
7
|
nbsync/sync.py,sha256=ZzMPeshh6BCPI6bqCEOrx-SFr7GCajL8F1QxdbOArd0,3864
|
8
|
-
nbsync-0.
|
9
|
-
nbsync-0.
|
10
|
-
nbsync-0.
|
11
|
-
nbsync-0.
|
8
|
+
nbsync-0.3.1.dist-info/METADATA,sha256=rcM781_X3a9OKa6juL5aK0W3PEcU_1miAaUx-c48Eys,6552
|
9
|
+
nbsync-0.3.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
10
|
+
nbsync-0.3.1.dist-info/licenses/LICENSE,sha256=wy1pqn52upuo_qYwY-epWmspwE-3UWJso0xodciGXYc,1062
|
11
|
+
nbsync-0.3.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|