gennaker-tools 0.2.0__tar.gz → 0.3.0__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.
Files changed (36) hide show
  1. {gennaker_tools-0.2.0 → gennaker_tools-0.3.0}/CHANGELOG.md +19 -2
  2. {gennaker_tools-0.2.0 → gennaker_tools-0.3.0}/PKG-INFO +1 -1
  3. {gennaker_tools-0.2.0 → gennaker_tools-0.3.0}/gennaker_tools/_version.py +1 -1
  4. {gennaker_tools-0.2.0 → gennaker_tools-0.3.0}/gennaker_tools/labextension/package.json +2 -2
  5. {gennaker_tools-0.2.0 → gennaker_tools-0.3.0}/gennaker_tools/labextension/schemas/gennaker-tools/package.json.orig +1 -1
  6. gennaker_tools-0.2.0/gennaker_tools/labextension/static/remoteEntry.e63ec10f554c0558443e.js → gennaker_tools-0.3.0/gennaker_tools/labextension/static/remoteEntry.4687ec7be43395abbe0d.js +1 -1
  7. {gennaker_tools-0.2.0 → gennaker_tools-0.3.0}/gennaker_tools/settings_sync_extension.py +26 -14
  8. {gennaker_tools-0.2.0 → gennaker_tools-0.3.0}/package.json +1 -1
  9. {gennaker_tools-0.2.0 → gennaker_tools-0.3.0}/.copier-answers.yml +0 -0
  10. {gennaker_tools-0.2.0 → gennaker_tools-0.3.0}/.gitignore +0 -0
  11. {gennaker_tools-0.2.0 → gennaker_tools-0.3.0}/.prettierignore +0 -0
  12. {gennaker_tools-0.2.0 → gennaker_tools-0.3.0}/.yarnrc.yml +0 -0
  13. {gennaker_tools-0.2.0 → gennaker_tools-0.3.0}/LICENSE +0 -0
  14. {gennaker_tools-0.2.0 → gennaker_tools-0.3.0}/README.md +0 -0
  15. {gennaker_tools-0.2.0 → gennaker_tools-0.3.0}/RELEASE.md +0 -0
  16. {gennaker_tools-0.2.0 → gennaker_tools-0.3.0}/flake.lock +0 -0
  17. {gennaker_tools-0.2.0 → gennaker_tools-0.3.0}/flake.nix +0 -0
  18. {gennaker_tools-0.2.0 → gennaker_tools-0.3.0}/gennaker_tools/__init__.py +0 -0
  19. {gennaker_tools-0.2.0 → gennaker_tools-0.3.0}/gennaker_tools/labextension/schemas/gennaker-tools/stateless-run.json +0 -0
  20. {gennaker_tools-0.2.0 → gennaker_tools-0.3.0}/gennaker_tools/labextension/static/509.031cb77fbf5c28a28cdf.js +0 -0
  21. {gennaker_tools-0.2.0 → gennaker_tools-0.3.0}/gennaker_tools/labextension/static/728.c3ac4b62173ea8b3c44b.js +0 -0
  22. {gennaker_tools-0.2.0 → gennaker_tools-0.3.0}/gennaker_tools/labextension/static/747.28975bdde163d0eaf6e0.js +0 -0
  23. {gennaker_tools-0.2.0 → gennaker_tools-0.3.0}/gennaker_tools/labextension/static/style.js +0 -0
  24. {gennaker_tools-0.2.0 → gennaker_tools-0.3.0}/gennaker_tools/labextension/static/third-party-licenses.json +0 -0
  25. {gennaker_tools-0.2.0 → gennaker_tools-0.3.0}/install.json +0 -0
  26. {gennaker_tools-0.2.0 → gennaker_tools-0.3.0}/jupyter-config/jupyter_server_config.d/gennaker_tools.json +0 -0
  27. {gennaker_tools-0.2.0 → gennaker_tools-0.3.0}/pyproject.toml +0 -0
  28. {gennaker_tools-0.2.0 → gennaker_tools-0.3.0}/renovate.json5 +0 -0
  29. {gennaker_tools-0.2.0 → gennaker_tools-0.3.0}/schema/stateless-run.json +0 -0
  30. {gennaker_tools-0.2.0 → gennaker_tools-0.3.0}/setup.py +0 -0
  31. {gennaker_tools-0.2.0 → gennaker_tools-0.3.0}/src/index.ts +0 -0
  32. {gennaker_tools-0.2.0 → gennaker_tools-0.3.0}/style/base.css +0 -0
  33. {gennaker_tools-0.2.0 → gennaker_tools-0.3.0}/style/index.css +0 -0
  34. {gennaker_tools-0.2.0 → gennaker_tools-0.3.0}/style/index.js +0 -0
  35. {gennaker_tools-0.2.0 → gennaker_tools-0.3.0}/tsconfig.json +0 -0
  36. {gennaker_tools-0.2.0 → gennaker_tools-0.3.0}/yarn.lock +0 -0
@@ -2,6 +2,25 @@
2
2
 
3
3
  <!-- <START NEW CHANGELOG ENTRY> -->
4
4
 
5
+ ## 0.3.0
6
+
7
+ ([Full Changelog](https://github.com/agoose77/gennaker-tools/compare/v0.2.0...280bc6329c0b7443b7d8af98337013250642ba8d))
8
+
9
+ ### Merged PRs
10
+
11
+ - fix: ignore checkpoints _and_ only reconcile newer files [#23](https://github.com/agoose77/gennaker-tools/pull/23) ([@agoose77](https://github.com/agoose77))
12
+
13
+ ### Contributors to this release
14
+
15
+ The following people contributed discussions, new ideas, code and documentation contributions, and review.
16
+ See [our definition of contributors](https://github-activity.readthedocs.io/en/latest/use/#how-does-this-tool-define-contributions-in-the-reports).
17
+
18
+ ([GitHub contributors page for this release](https://github.com/agoose77/gennaker-tools/graphs/contributors?from=2026-01-28&to=2026-02-04&type=c))
19
+
20
+ @agoose77 ([activity](https://github.com/search?q=repo%3Aagoose77%2Fgennaker-tools+involves%3Aagoose77+updated%3A2026-01-28..2026-02-04&type=Issues))
21
+
22
+ <!-- <END NEW CHANGELOG ENTRY> -->
23
+
5
24
  ## 0.2.0
6
25
 
7
26
  ([Full Changelog](https://github.com/agoose77/gennaker-tools/compare/v0.1.6...aa7f7967572d33167af8aacbcc3f6079e8b3a1fa))
@@ -26,8 +45,6 @@ See [our definition of contributors](https://github-activity.readthedocs.io/en/l
26
45
 
27
46
  @agoose77 ([activity](https://github.com/search?q=repo%3Aagoose77%2Fgennaker-tools+involves%3Aagoose77+updated%3A2026-01-11..2026-01-28&type=Issues))
28
47
 
29
- <!-- <END NEW CHANGELOG ENTRY> -->
30
-
31
48
  ## 0.1.6
32
49
 
33
50
  ([Full Changelog](https://github.com/agoose77/gennaker-tools/compare/v0.1.5...0403a7b883afedf5634d7446c88a8bc1b3a9d842))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gennaker-tools
3
- Version: 0.2.0
3
+ Version: 0.3.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
@@ -1,4 +1,4 @@
1
1
  # This file is auto-generated by Hatchling. As such, do not:
2
2
  # - modify
3
3
  # - track in version control e.g. be sure to add to .gitignore
4
- __version__ = VERSION = '0.2.0'
4
+ __version__ = VERSION = '0.3.0'
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gennaker-tools",
3
- "version": "0.2.0",
3
+ "version": "0.3.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.e63ec10f554c0558443e.js",
102
+ "load": "static/remoteEntry.4687ec7be43395abbe0d.js",
103
103
  "extension": "./extension",
104
104
  "style": "./style"
105
105
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gennaker-tools",
3
- "version": "0.2.0",
3
+ "version": "0.3.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",
@@ -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,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
+ 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.3.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,8 +1,9 @@
1
1
  from jupyter_server.extension.application import ExtensionApp
2
2
  import jupyterlab.commands
3
3
 
4
- from traitlets import Instance, default, validate, TraitError, Unicode
4
+ from traitlets import Instance, default, validate, TraitError, Unicode, List
5
5
  import pathlib
6
+ import fnmatch
6
7
  import watchfiles
7
8
  import jupyter_server.serverapp
8
9
  import asyncio
@@ -19,6 +20,7 @@ class SettingsSyncApp(ExtensionApp):
19
20
  load_other_extensions = True
20
21
  settings_path = Instance(pathlib.Path)
21
22
  null_sentinel = Unicode("__NULL__")
23
+ ignore_patterns = List(Unicode(), [".ipynb_checkpoints", ".~*"])
22
24
 
23
25
  _task = Instance(asyncio.Task, allow_none=True)
24
26
  _event = Instance(asyncio.Event, allow_none=True)
@@ -67,6 +69,14 @@ class SettingsSyncApp(ExtensionApp):
67
69
  def _is_toml_path(self, path: pathlib.Path) -> bool:
68
70
  return path.suffix == ".toml"
69
71
 
72
+ def _change_is_observed(self, change: watchfiles.Change, path: str) -> bool:
73
+ _path = pathlib.Path(path)
74
+ return not any(
75
+ fnmatch.fnmatch(part, pat)
76
+ for part in _path.relative_to(self.settings_path).parts
77
+ for pat in self.ignore_patterns
78
+ )
79
+
70
80
  async def _watched_files_need_sync(
71
81
  self, path: pathlib.Path, other_path: pathlib.Path
72
82
  ) -> bool:
@@ -106,11 +116,15 @@ class SettingsSyncApp(ExtensionApp):
106
116
  """
107
117
  Reconcile existing files. No files will be deleted.
108
118
  """
109
- tasks = []
110
119
 
111
- async def reconcile(path):
112
- for entry in await aiofiles.os.scandir(path):
120
+ async def reconcile(dir_path):
121
+ for entry in await aiofiles.os.scandir(dir_path):
113
122
  entry_path = pathlib.Path(entry.path)
123
+ # Ignored directories/files should be skipped
124
+ if any(
125
+ fnmatch.fnmatch(entry_path.name, p) for p in self.ignore_patterns
126
+ ):
127
+ continue
114
128
 
115
129
  if entry.is_dir():
116
130
  await reconcile(entry_path)
@@ -125,26 +139,24 @@ class SettingsSyncApp(ExtensionApp):
125
139
  # Reconcile onto the "other" file if it doesn't exist, or it's older than us
126
140
  if (
127
141
  not other_path.exists()
128
- or other_path.stat().st_mtime <= entry.stat().st_mtime
142
+ or other_path.stat().st_mtime < entry.stat().st_mtime
129
143
  ):
130
- tasks.append(self._sync_watched_files(entry_path, other_path))
144
+ await self._sync_watched_files(entry_path, other_path)
131
145
 
132
146
  await reconcile(root_path)
133
- await asyncio.gather(*tasks)
134
147
 
135
148
  async def _event_loop(self):
136
149
  await self._reconcile_initial(self.settings_path)
137
150
  async for changes in watchfiles.awatch(
138
- self.settings_path, stop_event=self._event
151
+ self.settings_path,
152
+ stop_event=self._event,
153
+ watch_filter=self._change_is_observed,
139
154
  ):
140
- for change, _path in changes:
141
- await self._reconcile_change(change, pathlib.Path(_path))
155
+ for change, _change_path in changes:
156
+ change_path = pathlib.Path(_change_path)
157
+ await self._reconcile_change(change, change_path)
142
158
 
143
159
  async def _reconcile_change(self, change, path):
144
- # Ignore .~ files
145
- if path.name.startswith(".~"):
146
- return
147
-
148
160
  # Only process settings files
149
161
  path_is_toml = self._is_toml_path(path)
150
162
  if not (path_is_toml or self._is_settings_path(path)):
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gennaker-tools",
3
- "version": "0.2.0",
3
+ "version": "0.3.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",
File without changes
File without changes
File without changes
File without changes
File without changes