execnb 0.1.16__tar.gz → 0.1.18__tar.gz
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.
- {execnb-0.1.16/execnb.egg-info → execnb-0.1.18}/PKG-INFO +2 -2
- execnb-0.1.18/execnb/__init__.py +1 -0
- {execnb-0.1.16 → execnb-0.1.18}/execnb/nbio.py +9 -6
- {execnb-0.1.16 → execnb-0.1.18/execnb.egg-info}/PKG-INFO +2 -2
- {execnb-0.1.16 → execnb-0.1.18}/execnb.egg-info/requires.txt +1 -1
- {execnb-0.1.16 → execnb-0.1.18}/settings.ini +2 -2
- execnb-0.1.16/execnb/__init__.py +0 -1
- {execnb-0.1.16 → execnb-0.1.18}/LICENSE +0 -0
- {execnb-0.1.16 → execnb-0.1.18}/MANIFEST.in +0 -0
- {execnb-0.1.16 → execnb-0.1.18}/README.md +0 -0
- {execnb-0.1.16 → execnb-0.1.18}/execnb/_modidx.py +0 -0
- {execnb-0.1.16 → execnb-0.1.18}/execnb/shell.py +0 -0
- {execnb-0.1.16 → execnb-0.1.18}/execnb.egg-info/SOURCES.txt +0 -0
- {execnb-0.1.16 → execnb-0.1.18}/execnb.egg-info/dependency_links.txt +0 -0
- {execnb-0.1.16 → execnb-0.1.18}/execnb.egg-info/entry_points.txt +0 -0
- {execnb-0.1.16 → execnb-0.1.18}/execnb.egg-info/not-zip-safe +0 -0
- {execnb-0.1.16 → execnb-0.1.18}/execnb.egg-info/top_level.txt +0 -0
- {execnb-0.1.16 → execnb-0.1.18}/pyproject.toml +0 -0
- {execnb-0.1.16 → execnb-0.1.18}/setup.cfg +0 -0
- {execnb-0.1.16 → execnb-0.1.18}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: execnb
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.18
|
|
4
4
|
Summary: A description of your project
|
|
5
5
|
Home-page: https://github.com/AnswerDotAI/execnb/
|
|
6
6
|
Author: Jeremy Howard
|
|
@@ -16,7 +16,7 @@ Classifier: License :: OSI Approved :: Apache Software License
|
|
|
16
16
|
Requires-Python: >=3.7
|
|
17
17
|
Description-Content-Type: text/markdown
|
|
18
18
|
License-File: LICENSE
|
|
19
|
-
Requires-Dist: fastcore>=1.
|
|
19
|
+
Requires-Dist: fastcore>=1.10.4
|
|
20
20
|
Requires-Dist: ipython
|
|
21
21
|
Provides-Extra: dev
|
|
22
22
|
Requires-Dist: matplotlib; extra == "dev"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.18"
|
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/01_nbio.ipynb.
|
|
4
4
|
|
|
5
5
|
# %% auto 0
|
|
6
|
-
__all__ = ['NbCell', 'dict2nb', 'read_nb', '
|
|
6
|
+
__all__ = ['NbCell', 'dict2nb', 'read_nb', 'mk_cell', 'new_nb', 'nb2dict', 'nb2str', 'write_nb']
|
|
7
7
|
|
|
8
8
|
# %% ../nbs/01_nbio.ipynb
|
|
9
9
|
from fastcore.basics import *
|
|
10
|
+
from fastcore.xtras import rtoken_hex
|
|
10
11
|
from fastcore.imports import *
|
|
11
12
|
|
|
12
13
|
import ast,functools
|
|
@@ -22,6 +23,7 @@ class NbCell(AttrDict):
|
|
|
22
23
|
def __init__(self, idx, cell):
|
|
23
24
|
super().__init__(cell)
|
|
24
25
|
self.idx_ = idx
|
|
26
|
+
if 'id' not in self: self.id = rtoken_hex(4)
|
|
25
27
|
if 'source' in self: self.set_source(self.source)
|
|
26
28
|
|
|
27
29
|
def set_source(self, source):
|
|
@@ -60,11 +62,6 @@ def read_nb(path):
|
|
|
60
62
|
res['path_'] = str(path)
|
|
61
63
|
return res
|
|
62
64
|
|
|
63
|
-
# %% ../nbs/01_nbio.ipynb
|
|
64
|
-
def new_nb(cells=None, meta=None, nbformat=4, nbformat_minor=5):
|
|
65
|
-
"Returns an empty new notebook"
|
|
66
|
-
return dict2nb(cells=cells or [],metadata=meta or {},nbformat=nbformat,nbformat_minor=nbformat_minor)
|
|
67
|
-
|
|
68
65
|
# %% ../nbs/01_nbio.ipynb
|
|
69
66
|
def mk_cell(text, # `source` attr in cell
|
|
70
67
|
cell_type='code', # `cell_type` attr in cell
|
|
@@ -77,6 +74,12 @@ def mk_cell(text, # `source` attr in cell
|
|
|
77
74
|
kwargs['execution_count']=0
|
|
78
75
|
return NbCell(0, dict(cell_type=cell_type, source=text, directives_={}, **kwargs))
|
|
79
76
|
|
|
77
|
+
# %% ../nbs/01_nbio.ipynb
|
|
78
|
+
def new_nb(cells=None, meta=None, nbformat=4, nbformat_minor=5):
|
|
79
|
+
"Returns an empty new notebook"
|
|
80
|
+
cells = [o if isinstance(o,dict) else mk_cell(o) for o in cells]
|
|
81
|
+
return dict2nb(cells=cells or [],metadata=meta or {},nbformat=nbformat,nbformat_minor=nbformat_minor)
|
|
82
|
+
|
|
80
83
|
# %% ../nbs/01_nbio.ipynb
|
|
81
84
|
def nb2dict(d, k=None):
|
|
82
85
|
"Convert parsed notebook to `dict`"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: execnb
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.18
|
|
4
4
|
Summary: A description of your project
|
|
5
5
|
Home-page: https://github.com/AnswerDotAI/execnb/
|
|
6
6
|
Author: Jeremy Howard
|
|
@@ -16,7 +16,7 @@ Classifier: License :: OSI Approved :: Apache Software License
|
|
|
16
16
|
Requires-Python: >=3.7
|
|
17
17
|
Description-Content-Type: text/markdown
|
|
18
18
|
License-File: LICENSE
|
|
19
|
-
Requires-Dist: fastcore>=1.
|
|
19
|
+
Requires-Dist: fastcore>=1.10.4
|
|
20
20
|
Requires-Dist: ipython
|
|
21
21
|
Provides-Extra: dev
|
|
22
22
|
Requires-Dist: matplotlib; extra == "dev"
|
|
@@ -9,9 +9,9 @@ user = AnswerDotAI
|
|
|
9
9
|
author = Jeremy Howard
|
|
10
10
|
author_email = j@fast.ai
|
|
11
11
|
branch = main
|
|
12
|
-
version = 0.1.
|
|
12
|
+
version = 0.1.18
|
|
13
13
|
min_python = 3.7
|
|
14
|
-
requirements = fastcore>=1.
|
|
14
|
+
requirements = fastcore>=1.10.4 ipython
|
|
15
15
|
dev_requirements = matplotlib Pillow mistletoe
|
|
16
16
|
console_scripts = exec_nb=execnb.shell:exec_nb
|
|
17
17
|
audience = Developers
|
execnb-0.1.16/execnb/__init__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.1.16"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|