toolslm 0.2.2__tar.gz → 0.2.3__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.
- {toolslm-0.2.2/toolslm.egg-info → toolslm-0.2.3}/PKG-INFO +1 -1
- {toolslm-0.2.2 → toolslm-0.2.3}/settings.ini +1 -1
- toolslm-0.2.3/toolslm/__init__.py +1 -0
- {toolslm-0.2.2 → toolslm-0.2.3}/toolslm/funccall.py +8 -6
- {toolslm-0.2.2 → toolslm-0.2.3/toolslm.egg-info}/PKG-INFO +1 -1
- toolslm-0.2.2/toolslm/__init__.py +0 -1
- {toolslm-0.2.2 → toolslm-0.2.3}/LICENSE +0 -0
- {toolslm-0.2.2 → toolslm-0.2.3}/MANIFEST.in +0 -0
- {toolslm-0.2.2 → toolslm-0.2.3}/README.md +0 -0
- {toolslm-0.2.2 → toolslm-0.2.3}/pyproject.toml +0 -0
- {toolslm-0.2.2 → toolslm-0.2.3}/setup.cfg +0 -0
- {toolslm-0.2.2 → toolslm-0.2.3}/setup.py +0 -0
- {toolslm-0.2.2 → toolslm-0.2.3}/toolslm/_modidx.py +0 -0
- {toolslm-0.2.2 → toolslm-0.2.3}/toolslm/download.py +0 -0
- {toolslm-0.2.2 → toolslm-0.2.3}/toolslm/md_hier.py +0 -0
- {toolslm-0.2.2 → toolslm-0.2.3}/toolslm/shell.py +0 -0
- {toolslm-0.2.2 → toolslm-0.2.3}/toolslm/xml.py +0 -0
- {toolslm-0.2.2 → toolslm-0.2.3}/toolslm.egg-info/SOURCES.txt +0 -0
- {toolslm-0.2.2 → toolslm-0.2.3}/toolslm.egg-info/dependency_links.txt +0 -0
- {toolslm-0.2.2 → toolslm-0.2.3}/toolslm.egg-info/entry_points.txt +0 -0
- {toolslm-0.2.2 → toolslm-0.2.3}/toolslm.egg-info/not-zip-safe +0 -0
- {toolslm-0.2.2 → toolslm-0.2.3}/toolslm.egg-info/requires.txt +0 -0
- {toolslm-0.2.2 → toolslm-0.2.3}/toolslm.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.2.3"
|
|
@@ -183,18 +183,20 @@ def python(
|
|
|
183
183
|
finally: signal.alarm(0)
|
|
184
184
|
|
|
185
185
|
# %% ../01_funccall.ipynb
|
|
186
|
-
def mk_ns(
|
|
186
|
+
def mk_ns(fs):
|
|
187
|
+
if isinstance(fs, abc.Mapping): return fs
|
|
187
188
|
merged = {}
|
|
188
|
-
for o in
|
|
189
|
-
if isinstance(o,
|
|
190
|
-
|
|
191
|
-
|
|
189
|
+
for o in listify(fs):
|
|
190
|
+
if isinstance(o, dict): merged |= o
|
|
191
|
+
elif isinstance(o, type): merged |= {n:getattr(o,n) for n,m in o.__dict__.items() if isinstance(m, (staticmethod, classmethod))}
|
|
192
|
+
elif callable(o) and hasattr(o, '__name__'): merged |= {o.__name__: o}
|
|
193
|
+
merged |= {n:getattr(o,n) for n, m in inspect.getmembers(o, inspect.ismethod)} | {n:m for n,m in o.__class__.__dict__.items() if isinstance(m, staticmethod)}
|
|
192
194
|
return merged
|
|
193
195
|
|
|
194
196
|
# %% ../01_funccall.ipynb
|
|
195
197
|
def call_func(fc_name, fc_inputs, ns, raise_on_err=True):
|
|
196
198
|
"Call the function `fc_name` with the given `fc_inputs` using namespace `ns`."
|
|
197
|
-
if not isinstance(ns, abc.Mapping): ns = mk_ns(
|
|
199
|
+
if not isinstance(ns, abc.Mapping): ns = mk_ns(ns)
|
|
198
200
|
func = ns[fc_name]
|
|
199
201
|
# Clean up bad param names
|
|
200
202
|
inps = {re.sub(r'\W', '', k):v for k,v in fc_inputs.items()}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.2.2"
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|