gennaker-tools 0.1.5__py3-none-any.whl → 0.2.0__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.
- gennaker_tools/_version.py +1 -1
- gennaker_tools/settings_sync_extension.py +101 -39
- {gennaker_tools-0.1.5.data → gennaker_tools-0.2.0.data}/data/share/jupyter/labextensions/gennaker-tools/package.json +2 -2
- {gennaker_tools-0.1.5.data → gennaker_tools-0.2.0.data}/data/share/jupyter/labextensions/gennaker-tools/schemas/gennaker-tools/package.json.orig +1 -1
- gennaker_tools-0.1.5.data/data/share/jupyter/labextensions/gennaker-tools/static/509.4ba7e0c1be6d39a3ec07.js → gennaker_tools-0.2.0.data/data/share/jupyter/labextensions/gennaker-tools/static/509.031cb77fbf5c28a28cdf.js +1 -1
- gennaker_tools-0.1.5.data/data/share/jupyter/labextensions/gennaker-tools/static/remoteEntry.7cf8ef915feb12b1787a.js → gennaker_tools-0.2.0.data/data/share/jupyter/labextensions/gennaker-tools/static/remoteEntry.e63ec10f554c0558443e.js +1 -1
- {gennaker_tools-0.1.5.dist-info → gennaker_tools-0.2.0.dist-info}/METADATA +3 -2
- gennaker_tools-0.2.0.dist-info/RECORD +18 -0
- gennaker_tools-0.1.5.dist-info/RECORD +0 -18
- {gennaker_tools-0.1.5.data → gennaker_tools-0.2.0.data}/data/etc/jupyter/jupyter_server_config.d/gennaker_tools.json +0 -0
- {gennaker_tools-0.1.5.data → gennaker_tools-0.2.0.data}/data/share/jupyter/labextensions/gennaker-tools/install.json +0 -0
- {gennaker_tools-0.1.5.data → gennaker_tools-0.2.0.data}/data/share/jupyter/labextensions/gennaker-tools/schemas/gennaker-tools/stateless-run.json +0 -0
- {gennaker_tools-0.1.5.data → gennaker_tools-0.2.0.data}/data/share/jupyter/labextensions/gennaker-tools/static/728.c3ac4b62173ea8b3c44b.js +0 -0
- {gennaker_tools-0.1.5.data → gennaker_tools-0.2.0.data}/data/share/jupyter/labextensions/gennaker-tools/static/747.28975bdde163d0eaf6e0.js +0 -0
- {gennaker_tools-0.1.5.data → gennaker_tools-0.2.0.data}/data/share/jupyter/labextensions/gennaker-tools/static/style.js +0 -0
- {gennaker_tools-0.1.5.data → gennaker_tools-0.2.0.data}/data/share/jupyter/labextensions/gennaker-tools/static/third-party-licenses.json +0 -0
- {gennaker_tools-0.1.5.dist-info → gennaker_tools-0.2.0.dist-info}/WHEEL +0 -0
- {gennaker_tools-0.1.5.dist-info → gennaker_tools-0.2.0.dist-info}/licenses/LICENSE +0 -0
gennaker_tools/_version.py
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
from jupyter_server.extension.application import ExtensionApp
|
|
2
2
|
import jupyterlab.commands
|
|
3
3
|
|
|
4
|
-
from traitlets import Instance, default, validate, TraitError
|
|
4
|
+
from traitlets import Instance, default, validate, TraitError, Unicode
|
|
5
5
|
import pathlib
|
|
6
6
|
import watchfiles
|
|
7
7
|
import jupyter_server.serverapp
|
|
8
8
|
import asyncio
|
|
9
|
+
import aiofiles.os
|
|
9
10
|
import tomli
|
|
10
|
-
import
|
|
11
|
+
import json5
|
|
11
12
|
import tomli_w
|
|
12
|
-
import re
|
|
13
13
|
import os
|
|
14
14
|
|
|
15
15
|
|
|
@@ -18,6 +18,7 @@ class SettingsSyncApp(ExtensionApp):
|
|
|
18
18
|
name = "settings-sync"
|
|
19
19
|
load_other_extensions = True
|
|
20
20
|
settings_path = Instance(pathlib.Path)
|
|
21
|
+
null_sentinel = Unicode("__NULL__")
|
|
21
22
|
|
|
22
23
|
_task = Instance(asyncio.Task, allow_none=True)
|
|
23
24
|
_event = Instance(asyncio.Event, allow_none=True)
|
|
@@ -34,6 +35,26 @@ class SettingsSyncApp(ExtensionApp):
|
|
|
34
35
|
raise TraitError("settings_path should be a valid pathlike value")
|
|
35
36
|
return _path
|
|
36
37
|
|
|
38
|
+
def _json_mapping_to_toml(self, mapping):
|
|
39
|
+
return {
|
|
40
|
+
key: self._json_mapping_to_toml(value)
|
|
41
|
+
if isinstance(value, dict)
|
|
42
|
+
else self.null_sentinel
|
|
43
|
+
if value is None
|
|
44
|
+
else value
|
|
45
|
+
for key, value in mapping.items()
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
def _toml_mapping_to_json(self, mapping):
|
|
49
|
+
return {
|
|
50
|
+
key: self._toml_mapping_to_json(value)
|
|
51
|
+
if isinstance(value, dict)
|
|
52
|
+
else None
|
|
53
|
+
if value == self.null_sentinel
|
|
54
|
+
else value
|
|
55
|
+
for key, value in mapping.items()
|
|
56
|
+
}
|
|
57
|
+
|
|
37
58
|
def _toml_to_settings_path(self, path: pathlib.Path) -> pathlib.Path:
|
|
38
59
|
return path.with_name(path.stem)
|
|
39
60
|
|
|
@@ -46,48 +67,78 @@ class SettingsSyncApp(ExtensionApp):
|
|
|
46
67
|
def _is_toml_path(self, path: pathlib.Path) -> bool:
|
|
47
68
|
return path.suffix == ".toml"
|
|
48
69
|
|
|
49
|
-
def _strip_comments(self, source: str) -> str:
|
|
50
|
-
without_single_line_comments = re.sub(r"//.*$", "", source, flags=re.MULTILINE)
|
|
51
|
-
|
|
52
|
-
return re.sub(
|
|
53
|
-
r"/\*[\s\S]*?\*/", "", without_single_line_comments, flags=re.MULTILINE
|
|
54
|
-
)
|
|
55
|
-
|
|
56
70
|
async def _watched_files_need_sync(
|
|
57
71
|
self, path: pathlib.Path, other_path: pathlib.Path
|
|
58
72
|
) -> bool:
|
|
59
|
-
return
|
|
73
|
+
return not (
|
|
74
|
+
path.exists()
|
|
75
|
+
and other_path.exists()
|
|
76
|
+
and path.stat().st_mtime == other_path.stat().st_mtime
|
|
77
|
+
)
|
|
60
78
|
|
|
61
79
|
async def _sync_watched_files(self, path: pathlib.Path, other_path: pathlib.Path):
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
80
|
+
try:
|
|
81
|
+
if self._is_settings_path(path):
|
|
82
|
+
self.log.debug(f"Synchronising JSON to TOML for {path}")
|
|
83
|
+
settings = self._json_mapping_to_toml(json5.loads(path.read_text()))
|
|
84
|
+
with open(other_path, "wb") as f:
|
|
85
|
+
tomli_w.dump(settings, f)
|
|
86
|
+
|
|
87
|
+
else:
|
|
88
|
+
self.log.debug(f"Synchronising TOML to JSON for {path}")
|
|
89
|
+
with open(path, "rb") as f:
|
|
90
|
+
settings = self._toml_mapping_to_json(tomli.load(f))
|
|
91
|
+
with open(other_path, "w") as sf:
|
|
92
|
+
json5.dump(settings, sf, indent=2)
|
|
93
|
+
|
|
94
|
+
# Sync mtimes
|
|
95
|
+
stat = path.stat()
|
|
96
|
+
os.utime(other_path, (stat.st_atime, stat.st_mtime))
|
|
97
|
+
|
|
98
|
+
except Exception as exc:
|
|
99
|
+
self.log.error(f"Error reconciling {path} with {other_path} {exc}")
|
|
77
100
|
|
|
78
101
|
async def _unsync_watched_files(self, path: pathlib.Path, other_path: pathlib.Path):
|
|
79
102
|
if self._is_settings_path(path) and other_path.exists():
|
|
80
103
|
other_path.unlink()
|
|
81
104
|
|
|
105
|
+
async def _reconcile_initial(self, root_path):
|
|
106
|
+
"""
|
|
107
|
+
Reconcile existing files. No files will be deleted.
|
|
108
|
+
"""
|
|
109
|
+
tasks = []
|
|
110
|
+
|
|
111
|
+
async def reconcile(path):
|
|
112
|
+
for entry in await aiofiles.os.scandir(path):
|
|
113
|
+
entry_path = pathlib.Path(entry.path)
|
|
114
|
+
|
|
115
|
+
if entry.is_dir():
|
|
116
|
+
await reconcile(entry_path)
|
|
117
|
+
elif (
|
|
118
|
+
is_settings_path := self._is_settings_path(entry_path)
|
|
119
|
+
) or self._is_toml_path(entry_path):
|
|
120
|
+
other_path = (
|
|
121
|
+
self._settings_to_toml_path(entry_path)
|
|
122
|
+
if is_settings_path
|
|
123
|
+
else self._toml_to_settings_path(entry_path)
|
|
124
|
+
)
|
|
125
|
+
# Reconcile onto the "other" file if it doesn't exist, or it's older than us
|
|
126
|
+
if (
|
|
127
|
+
not other_path.exists()
|
|
128
|
+
or other_path.stat().st_mtime <= entry.stat().st_mtime
|
|
129
|
+
):
|
|
130
|
+
tasks.append(self._sync_watched_files(entry_path, other_path))
|
|
131
|
+
|
|
132
|
+
await reconcile(root_path)
|
|
133
|
+
await asyncio.gather(*tasks)
|
|
134
|
+
|
|
82
135
|
async def _event_loop(self):
|
|
136
|
+
await self._reconcile_initial(self.settings_path)
|
|
83
137
|
async for changes in watchfiles.awatch(
|
|
84
138
|
self.settings_path, stop_event=self._event
|
|
85
139
|
):
|
|
86
140
|
for change, _path in changes:
|
|
87
|
-
|
|
88
|
-
await self._reconcile_change(change, pathlib.Path(_path))
|
|
89
|
-
except Exception as exc:
|
|
90
|
-
self.log.error(exc)
|
|
141
|
+
await self._reconcile_change(change, pathlib.Path(_path))
|
|
91
142
|
|
|
92
143
|
async def _reconcile_change(self, change, path):
|
|
93
144
|
# Ignore .~ files
|
|
@@ -106,15 +157,26 @@ class SettingsSyncApp(ExtensionApp):
|
|
|
106
157
|
else self._settings_to_toml_path(path)
|
|
107
158
|
)
|
|
108
159
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
160
|
+
self.log.debug(f"Detected filesystem change {change} in {path} file")
|
|
161
|
+
|
|
162
|
+
match change:
|
|
163
|
+
# Now we have either TOML or JSON setting files
|
|
164
|
+
# File needs deleting
|
|
165
|
+
case watchfiles.Change.deleted:
|
|
166
|
+
self.log.info(f"Detected deletion of {path.name} file, synchronising")
|
|
167
|
+
await self._unsync_watched_files(path, other_path)
|
|
168
|
+
case watchfiles.Change.added:
|
|
169
|
+
if await self._watched_files_need_sync(path, other_path):
|
|
170
|
+
self.log.info(
|
|
171
|
+
f"Detected addition of {path.name} file, creating {other_path.name}"
|
|
172
|
+
)
|
|
173
|
+
await self._sync_watched_files(path, other_path)
|
|
174
|
+
case watchfiles.Change.modified:
|
|
175
|
+
if await self._watched_files_need_sync(path, other_path):
|
|
176
|
+
self.log.info(
|
|
177
|
+
f"Detected modification of {path.name} file, updating {other_path.name}"
|
|
178
|
+
)
|
|
179
|
+
await self._sync_watched_files(path, other_path)
|
|
118
180
|
|
|
119
181
|
async def _start_jupyter_server_extension(self, app):
|
|
120
182
|
self._event = asyncio.Event()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gennaker-tools",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "A JupyterLab extension to provide a restart-and-run-to-selected command variant that clears non-executed cell outputs.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jupyter",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"outputDir": "gennaker_tools/labextension",
|
|
100
100
|
"schemaDir": "schema",
|
|
101
101
|
"_build": {
|
|
102
|
-
"load": "static/remoteEntry.
|
|
102
|
+
"load": "static/remoteEntry.e63ec10f554c0558443e.js",
|
|
103
103
|
"extension": "./extension",
|
|
104
104
|
"style": "./style"
|
|
105
105
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkgennaker_tools=self.webpackChunkgennaker_tools||[]).push([[509],{509:(e,t,a)=>{a.r(t),a.d(t,{default:()=>b,reloadPlugin:()=>u,snippetsPlugin:()=>d,statelessRunPlugin:()=>p});var n,o=a(
|
|
1
|
+
"use strict";(self.webpackChunkgennaker_tools=self.webpackChunkgennaker_tools||[]).push([[509],{509:(e,t,a)=>{a.r(t),a.d(t,{default:()=>b,reloadPlugin:()=>u,snippetsPlugin:()=>d,statelessRunPlugin:()=>p});var n,o=a(931),r=a(285),s=a(769),l=a(790),i=a(505);!function(e){e.restartRunStateless="gennaker-tools:restart-run-stateless",e.resetJupyterLab="gennaker-tools:reset-jupyterlab"}(n||(n={}));const p={id:"gennaker-tools:stateless-run",description:"A JupyterLab extension.",autoStart:!0,requires:[r.ICommandPalette,o.INotebookTracker],optional:[s.ITranslator],activate:(e,t,a,o)=>{const r=(null!=o?o:s.nullTranslator).load("jupyterlab"),{commands:l,shell:i}=e;console.log("JupyterLab plugin gennaker-tools:stateless-run is activated!"),l.addCommand(n.restartRunStateless,{label:"Restart Kernel, Clear Outputs, and Run All Above Selected Cell",caption:"Clear all outputs, restart kernel, and run all cells above the selected cell",isEnabled:()=>null!==a.currentWidget&&a.currentWidget===i.currentWidget,execute:async e=>{const t=e.origin;console.log(`${n.restartRunStateless} has been called from... ${t}.`),"init"!==t&&await l.execute("apputils:run-all-enabled",{commands:["notebook:clear-all-cell-outputs","notebook:restart-and-run-to-selected"]})}});const p=r.__("Notebook Operations");t.addItem({command:n.restartRunStateless,category:p,args:{origin:"from palette"}})}},u={id:"gennaker-tools:reload",description:"A JupyterLab extension.",autoStart:!0,requires:[r.ICommandPalette],optional:[s.ITranslator],activate:(e,t,a)=>{console.log("JupyterLab plugin gennaker-tools:reload is activated!");const{commands:o}=e,r=(null!=a?a:s.nullTranslator).load("jupyterlab");o.addCommand(n.resetJupyterLab,{label:"Reset JupyterLab",caption:"Reset JupyterLab",isEnabled:()=>!0,execute:e=>{"init"!==e.origin&&window.location.reload()}});const l=r.__("Reset");t.addItem({command:n.resetJupyterLab,category:l,args:{origin:"from palette"}})}},c={properties:{snippets:{type:"array",title:"Codemirror snippets",description:"Snippets of the form accepted by Codemirrors snippetCompletion",items:{type:"object",properties:{type:{type:"string",enum:["class","constant","enum","function","interface","keyword","method","namespace","property","text","type","variable"]},body:{type:"string"},label:{type:"string"}},required:["type","body","label"]}}},additionalProperties:!1,type:"object"},d={id:"gennaker-tools:snippets",description:"A JupyterLab extension.",autoStart:!0,requires:[l.IEditorExtensionRegistry],optional:[],activate:(e,t)=>{console.log("JupyterLab plugin gennaker-tools:snippets is activated!"),t.addExtension(Object.freeze({name:"gennaker-tools:snippets",factory:()=>l.EditorExtensionRegistry.createConfigurableExtension(e=>(0,i.autocompletion)({override:[(0,i.completeFromList)(e.snippets.map(e=>{const{body:t,...a}=e;return(0,i.snippetCompletion)(t,a)}))]})),default:{snippets:[]},schema:c}))}},b=[p,u,d]}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _JUPYTERLAB;(()=>{"use strict";var e,r,t,o,n,a,i,u,l,s,f,d,c,p,h,v,g,b,
|
|
1
|
+
var _JUPYTERLAB;(()=>{"use strict";var e,r,t,o,n,a,i,u,l,s,f,d,c,p,h,v,g,m,b,y,w,k,S,j={842:(e,r,t)=>{var o={"./index":()=>t.e(509).then(()=>()=>t(509)),"./extension":()=>t.e(509).then(()=>()=>t(509)),"./style":()=>t.e(728).then(()=>()=>t(728))},n=(e,r)=>(t.R=r,r=t.o(o,e)?o[e]():Promise.resolve().then(()=>{throw new Error('Module "'+e+'" does not exist in container.')}),t.R=void 0,r),a=(e,r)=>{if(t.S){var o="default",n=t.S[o];if(n&&n!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return t.S[o]=e,t.I(o,r)}};t.d(r,{get:()=>n,init:()=>a})}},E={};function P(e){var r=E[e];if(void 0!==r)return r.exports;var t=E[e]={id:e,exports:{}};return j[e](t,t.exports,P),t.exports}P.m=j,P.c=E,P.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return P.d(r,{a:r}),r},P.d=(e,r)=>{for(var t in r)P.o(r,t)&&!P.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},P.f={},P.e=e=>Promise.all(Object.keys(P.f).reduce((r,t)=>(P.f[t](e,r),r),[])),P.u=e=>e+"."+{509:"031cb77fbf5c28a28cdf",728:"c3ac4b62173ea8b3c44b",747:"28975bdde163d0eaf6e0"}[e]+".js?v="+{509:"031cb77fbf5c28a28cdf",728:"c3ac4b62173ea8b3c44b",747:"28975bdde163d0eaf6e0"}[e],P.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),P.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="gennaker-tools:",P.l=(t,o,n,a)=>{if(e[t])e[t].push(o);else{var i,u;if(void 0!==n)for(var l=document.getElementsByTagName("script"),s=0;s<l.length;s++){var f=l[s];if(f.getAttribute("src")==t||f.getAttribute("data-webpack")==r+n){i=f;break}}i||(u=!0,(i=document.createElement("script")).charset="utf-8",P.nc&&i.setAttribute("nonce",P.nc),i.setAttribute("data-webpack",r+n),i.src=t),e[t]=[o];var d=(r,o)=>{i.onerror=i.onload=null,clearTimeout(c);var n=e[t];if(delete e[t],i.parentNode&&i.parentNode.removeChild(i),n&&n.forEach(e=>e(o)),r)return r(o)},c=setTimeout(d.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=d.bind(null,i.onerror),i.onload=d.bind(null,i.onload),u&&document.head.appendChild(i)}},P.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{P.S={};var e={},r={};P.I=(t,o)=>{o||(o=[]);var n=r[t];if(n||(n=r[t]={}),!(o.indexOf(n)>=0)){if(o.push(n),e[t])return e[t];P.o(P.S,t)||(P.S[t]={});var a=P.S[t],i="gennaker-tools",u=(e,r,t,o)=>{var n=a[e]=a[e]||{},u=n[r];(!u||!u.loaded&&(!o!=!u.eager?o:i>u.from))&&(n[r]={get:t,from:i,eager:!!o})},l=[];return"default"===t&&(u("@codemirror/autocomplete","6.19.1",()=>Promise.all([P.e(747),P.e(949)]).then(()=>()=>P(747))),u("gennaker-tools","0.2.0",()=>P.e(509).then(()=>()=>P(509)))),e[t]=l.length?Promise.all(l).then(()=>e[t]=1):1}}})(),(()=>{var e;P.g.importScripts&&(e=P.g.location+"");var r=P.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var o=t.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=t[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),P.p=e})(),t=e=>{var r=e=>e.split(".").map(e=>+e==e?+e:e),t=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),o=t[1]?r(t[1]):[];return t[2]&&(o.length++,o.push.apply(o,r(t[2]))),t[3]&&(o.push([]),o.push.apply(o,r(t[3]))),o},o=(e,r)=>{e=t(e),r=t(r);for(var o=0;;){if(o>=e.length)return o<r.length&&"u"!=(typeof r[o])[0];var n=e[o],a=(typeof n)[0];if(o>=r.length)return"u"==a;var i=r[o],u=(typeof i)[0];if(a!=u)return"o"==a&&"n"==u||"s"==u||"u"==a;if("o"!=a&&"u"!=a&&n!=i)return n<i;o++}},n=e=>{var r=e[0],t="";if(1===e.length)return"*";if(r+.5){t+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var o=1,a=1;a<e.length;a++)o--,t+="u"==(typeof(u=e[a]))[0]?"-":(o>0?".":"")+(o=2,u);return t}var i=[];for(a=1;a<e.length;a++){var u=e[a];i.push(0===u?"not("+l()+")":1===u?"("+l()+" || "+l()+")":2===u?i.pop()+" "+i.pop():n(u))}return l();function l(){return i.pop().replace(/^\((.+)\)$/,"$1")}},a=(e,r)=>{if(0 in e){r=t(r);var o=e[0],n=o<0;n&&(o=-o-1);for(var i=0,u=1,l=!0;;u++,i++){var s,f,d=u<e.length?(typeof e[u])[0]:"";if(i>=r.length||"o"==(f=(typeof(s=r[i]))[0]))return!l||("u"==d?u>o&&!n:""==d!=n);if("u"==f){if(!l||"u"!=d)return!1}else if(l)if(d==f)if(u<=o){if(s!=e[u])return!1}else{if(n?s>e[u]:s<e[u])return!1;s!=e[u]&&(l=!1)}else if("s"!=d&&"n"!=d){if(n||u<=o)return!1;l=!1,u--}else{if(u<=o||f<d!=n)return!1;l=!1}else"s"!=d&&"n"!=d&&(l=!1,u--)}}var c=[],p=c.pop.bind(c);for(i=1;i<e.length;i++){var h=e[i];c.push(1==h?p()|p():2==h?p()&p():h?a(h,r):!p())}return!!p()},i=(e,r)=>e&&P.o(e,r),u=e=>(e.loaded=1,e.get()),l=e=>Object.keys(e).reduce((r,t)=>(e[t].eager&&(r[t]=e[t]),r),{}),s=(e,r,t,n)=>{var i=n?l(e[r]):e[r];return(r=Object.keys(i).reduce((e,r)=>!a(t,r)||e&&!o(e,r)?e:r,0))&&i[r]},f=(e,r,t)=>{var n=t?l(e[r]):e[r];return Object.keys(n).reduce((e,r)=>!e||!n[e].loaded&&o(e,r)?r:e,0)},d=(e,r,t,o)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+n(o)+")",c=(e,r,t,o,a)=>{var i=e[t];return"No satisfying version ("+n(o)+")"+(a?" for eager consumption":"")+" of shared module "+t+" found in shared scope "+r+".\nAvailable versions: "+Object.keys(i).map(e=>e+" from "+i[e].from).join(", ")},p=e=>{throw new Error(e)},h=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},g=(e,r,t)=>t?t():((e,r)=>p("Shared module "+r+" doesn't exist in shared scope "+e))(e,r),m=(v=e=>function(r,t,o,n,a){var i=P.I(r);return i&&i.then&&!o?i.then(e.bind(e,r,P.S[r],t,!1,n,a)):e(r,P.S[r],t,o,n,a)})((e,r,t,o,n,a)=>{if(!i(r,t))return g(e,t,a);var l=s(r,t,n,o);return l?u(l):a?a():void p(c(r,e,t,n,o))}),b=v((e,r,t,o,n,l)=>{if(!i(r,t))return g(e,t,l);var s=f(r,t,o);return a(n,s)||h(d(r,t,s,n)),u(r[t][s])}),y={},w={285:()=>b("default","@jupyterlab/apputils",!1,[1,4,6,3]),505:()=>m("default","@codemirror/autocomplete",!1,[1,6,0,1],()=>Promise.all([P.e(747),P.e(949)]).then(()=>()=>P(747))),769:()=>b("default","@jupyterlab/translation",!1,[1,4,5,3]),790:()=>b("default","@jupyterlab/codemirror",!1,[1,4,5,3]),931:()=>b("default","@jupyterlab/notebook",!1,[1,4,5,3]),24:()=>b("default","@codemirror/view",!1,[1,6,9,6]),84:()=>b("default","@codemirror/language",!1,[1,6,0,0]),195:()=>b("default","@codemirror/state",!1,[1,6,2,0])},k={509:[285,505,769,790,931],949:[24,84,195]},S={},P.f.consumes=(e,r)=>{P.o(k,e)&&k[e].forEach(e=>{if(P.o(y,e))return r.push(y[e]);if(!S[e]){var t=r=>{y[e]=0,P.m[e]=t=>{delete P.c[e],t.exports=r()}};S[e]=!0;var o=r=>{delete y[e],P.m[e]=t=>{throw delete P.c[e],r}};try{var n=w[e]();n.then?r.push(y[e]=n.then(t).catch(o)):t(n)}catch(e){o(e)}}})},(()=>{var e={204:0};P.f.j=(r,t)=>{var o=P.o(e,r)?e[r]:void 0;if(0!==o)if(o)t.push(o[2]);else if(949!=r){var n=new Promise((t,n)=>o=e[r]=[t,n]);t.push(o[2]=n);var a=P.p+P.u(r),i=new Error;P.l(a,t=>{if(P.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var n=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+n+": "+a+")",i.name="ChunkLoadError",i.type=n,i.request=a,o[1](i)}},"chunk-"+r,r)}else e[r]=0};var r=(r,t)=>{var o,n,[a,i,u]=t,l=0;if(a.some(r=>0!==e[r])){for(o in i)P.o(i,o)&&(P.m[o]=i[o]);u&&u(P)}for(r&&r(t);l<a.length;l++)n=a[l],P.o(e,n)&&e[n]&&e[n][0](),e[n]=0},t=self.webpackChunkgennaker_tools=self.webpackChunkgennaker_tools||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),P.nc=void 0;var T=P(842);(_JUPYTERLAB=void 0===_JUPYTERLAB?{}:_JUPYTERLAB)["gennaker-tools"]=T})();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gennaker-tools
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: A JupyterLab extension to provide a restart-and-run-to-selected command variant that clears non-executed cell outputs.
|
|
5
5
|
Project-URL: Homepage, https://github.com/agoose77/gennaker-tools
|
|
6
6
|
Project-URL: Bug Tracker, https://github.com/agoose77/gennaker-tools/issues
|
|
@@ -50,8 +50,9 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
50
50
|
Classifier: Programming Language :: Python :: 3.11
|
|
51
51
|
Classifier: Programming Language :: Python :: 3.12
|
|
52
52
|
Classifier: Programming Language :: Python :: 3.13
|
|
53
|
-
Requires-Python: >=3.
|
|
53
|
+
Requires-Python: >=3.10
|
|
54
54
|
Requires-Dist: aiofiles
|
|
55
|
+
Requires-Dist: json5
|
|
55
56
|
Requires-Dist: tomli
|
|
56
57
|
Requires-Dist: tomli-w
|
|
57
58
|
Requires-Dist: watchfiles
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
gennaker_tools/__init__.py,sha256=nFYEbiT8K0wt8yEQz8HEf_Qe6LNSkCYqRkIsDNazxcQ,906
|
|
2
|
+
gennaker_tools/_version.py,sha256=73xmj_rtt0boRuIZ0h5wqHItFsCNZHTC-Wa0tSeAxyY,171
|
|
3
|
+
gennaker_tools/settings_sync_extension.py,sha256=8mCd2gZOF9anXnILJRrnEfp9g8U9ygNQ2JgImayZAj0,7079
|
|
4
|
+
gennaker_tools-0.2.0.data/data/etc/jupyter/jupyter_server_config.d/gennaker_tools.json,sha256=wdPROHQZmjYZls69VFa0u4SSeZ5hSsLrtZat3amwhT4,89
|
|
5
|
+
gennaker_tools-0.2.0.data/data/share/jupyter/labextensions/gennaker-tools/package.json,sha256=nzxNh64GHixl_11mk98ehC65MB_9rCTIrnvjH6Lva00,5842
|
|
6
|
+
gennaker_tools-0.2.0.data/data/share/jupyter/labextensions/gennaker-tools/schemas/gennaker-tools/package.json.orig,sha256=d699sT0HX6GbPFuf1NdoPSlblYWK8yVHoiN3ESPFc9I,6586
|
|
7
|
+
gennaker_tools-0.2.0.data/data/share/jupyter/labextensions/gennaker-tools/schemas/gennaker-tools/stateless-run.json,sha256=dahWeptJHIRehIbhG3JfYovF_PYNNhf7nDAytXit1nQ,371
|
|
8
|
+
gennaker_tools-0.2.0.data/data/share/jupyter/labextensions/gennaker-tools/static/509.031cb77fbf5c28a28cdf.js,sha256=Axy3f79cKKKM360amHXO03kUwJaGEdoG1GjCZC_LtIs,2907
|
|
9
|
+
gennaker_tools-0.2.0.data/data/share/jupyter/labextensions/gennaker-tools/static/728.c3ac4b62173ea8b3c44b.js,sha256=w6xLYhc-qLPES-XlMKoqrev4S_jv2BCO3lpeEw9KvPg,3997
|
|
10
|
+
gennaker_tools-0.2.0.data/data/share/jupyter/labextensions/gennaker-tools/static/747.28975bdde163d0eaf6e0.js,sha256=KJdb3eFj0Or24KLM3CZhUWaPlSuX_2MNsFLzvv2Qwec,38424
|
|
11
|
+
gennaker_tools-0.2.0.data/data/share/jupyter/labextensions/gennaker-tools/static/remoteEntry.e63ec10f554c0558443e.js,sha256=5j7BD1VMBVhEPlHTRhS--0JzIe7dMpJ8nZ_lbDHS2Mc,7695
|
|
12
|
+
gennaker_tools-0.2.0.data/data/share/jupyter/labextensions/gennaker-tools/static/style.js,sha256=tlmhP_8sbqsVTTTDWvepKWLoxcSEhbnBWO90BLsF0bg,157
|
|
13
|
+
gennaker_tools-0.2.0.data/data/share/jupyter/labextensions/gennaker-tools/static/third-party-licenses.json,sha256=CDXgijqFVBM8NMtDSylWGVU9B0MXXmBVI9RilPj2vIQ,3734
|
|
14
|
+
gennaker_tools-0.2.0.data/data/share/jupyter/labextensions/gennaker-tools/install.json,sha256=tXRyzqi6iukm4CRTQuuyytG8F3cwc4ITtzS2RccmfmI,189
|
|
15
|
+
gennaker_tools-0.2.0.dist-info/METADATA,sha256=QBjuudajuME3LTYrYjjlJ7eUoVUP6eikFmJuuVtrFik,6941
|
|
16
|
+
gennaker_tools-0.2.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
17
|
+
gennaker_tools-0.2.0.dist-info/licenses/LICENSE,sha256=e5YjFxBDNzcxgCAlUWfTdsNI2TSeCBkY6r9gdMAjQVI,1513
|
|
18
|
+
gennaker_tools-0.2.0.dist-info/RECORD,,
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
gennaker_tools/__init__.py,sha256=nFYEbiT8K0wt8yEQz8HEf_Qe6LNSkCYqRkIsDNazxcQ,906
|
|
2
|
-
gennaker_tools/_version.py,sha256=rT_m-tZAf0KIGqEcmsoISBVPQOZD0GnEi4vbMpYUeto,171
|
|
3
|
-
gennaker_tools/settings_sync_extension.py,sha256=MQ29Qa_4nRD5MvfziRTC6rjfavAI-SPuOWIdY42Trv0,4533
|
|
4
|
-
gennaker_tools-0.1.5.data/data/etc/jupyter/jupyter_server_config.d/gennaker_tools.json,sha256=wdPROHQZmjYZls69VFa0u4SSeZ5hSsLrtZat3amwhT4,89
|
|
5
|
-
gennaker_tools-0.1.5.data/data/share/jupyter/labextensions/gennaker-tools/package.json,sha256=X_cgKfTlEuG7bbBQJXFuORZuSgCijQCA99ys3cStMok,5842
|
|
6
|
-
gennaker_tools-0.1.5.data/data/share/jupyter/labextensions/gennaker-tools/schemas/gennaker-tools/package.json.orig,sha256=kO77Tx3GGisfsOJbc9ANu3_BrOXG4AdvESG9JDY6WIg,6586
|
|
7
|
-
gennaker_tools-0.1.5.data/data/share/jupyter/labextensions/gennaker-tools/schemas/gennaker-tools/stateless-run.json,sha256=dahWeptJHIRehIbhG3JfYovF_PYNNhf7nDAytXit1nQ,371
|
|
8
|
-
gennaker_tools-0.1.5.data/data/share/jupyter/labextensions/gennaker-tools/static/509.4ba7e0c1be6d39a3ec07.js,sha256=S6fgwb5tOaPsBwx8-pkTqD5zcrd-MB22ezERnPl-aJg,2907
|
|
9
|
-
gennaker_tools-0.1.5.data/data/share/jupyter/labextensions/gennaker-tools/static/728.c3ac4b62173ea8b3c44b.js,sha256=w6xLYhc-qLPES-XlMKoqrev4S_jv2BCO3lpeEw9KvPg,3997
|
|
10
|
-
gennaker_tools-0.1.5.data/data/share/jupyter/labextensions/gennaker-tools/static/747.28975bdde163d0eaf6e0.js,sha256=KJdb3eFj0Or24KLM3CZhUWaPlSuX_2MNsFLzvv2Qwec,38424
|
|
11
|
-
gennaker_tools-0.1.5.data/data/share/jupyter/labextensions/gennaker-tools/static/remoteEntry.7cf8ef915feb12b1787a.js,sha256=fPjvkV_rErF4enQZKynTf8_mLNq81YzU4nbX4dfQlig,7695
|
|
12
|
-
gennaker_tools-0.1.5.data/data/share/jupyter/labextensions/gennaker-tools/static/style.js,sha256=tlmhP_8sbqsVTTTDWvepKWLoxcSEhbnBWO90BLsF0bg,157
|
|
13
|
-
gennaker_tools-0.1.5.data/data/share/jupyter/labextensions/gennaker-tools/static/third-party-licenses.json,sha256=CDXgijqFVBM8NMtDSylWGVU9B0MXXmBVI9RilPj2vIQ,3734
|
|
14
|
-
gennaker_tools-0.1.5.data/data/share/jupyter/labextensions/gennaker-tools/install.json,sha256=tXRyzqi6iukm4CRTQuuyytG8F3cwc4ITtzS2RccmfmI,189
|
|
15
|
-
gennaker_tools-0.1.5.dist-info/METADATA,sha256=puUA6nbqJRqGyJeYsV1UOSvr7vMvv4wrH85NKNsekYc,6919
|
|
16
|
-
gennaker_tools-0.1.5.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
17
|
-
gennaker_tools-0.1.5.dist-info/licenses/LICENSE,sha256=e5YjFxBDNzcxgCAlUWfTdsNI2TSeCBkY6r9gdMAjQVI,1513
|
|
18
|
-
gennaker_tools-0.1.5.dist-info/RECORD,,
|
|
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
|