framework-py 0.1.0.dev5__py3-none-any.whl → 0.1.0.dev6__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.
- framework/skill_sync.py +20 -1
- {framework_py-0.1.0.dev5.dist-info → framework_py-0.1.0.dev6.dist-info}/METADATA +1 -1
- {framework_py-0.1.0.dev5.dist-info → framework_py-0.1.0.dev6.dist-info}/RECORD +5 -5
- {framework_py-0.1.0.dev5.dist-info → framework_py-0.1.0.dev6.dist-info}/WHEEL +0 -0
- {framework_py-0.1.0.dev5.dist-info → framework_py-0.1.0.dev6.dist-info}/licenses/LICENSE +0 -0
framework/skill_sync.py
CHANGED
|
@@ -91,6 +91,12 @@ def scan(path: Path) -> list[dict[str, Any]]:
|
|
|
91
91
|
if path.is_symlink():
|
|
92
92
|
raise ValueError("Skill symlinks are unsupported")
|
|
93
93
|
files = []
|
|
94
|
+
mode_file = path / ".framework-skill.json"
|
|
95
|
+
executable_paths = (
|
|
96
|
+
set(json.loads(mode_file.read_text(encoding="utf-8")).get("executable_paths", []))
|
|
97
|
+
if os.name == "nt" and mode_file.is_file()
|
|
98
|
+
else set()
|
|
99
|
+
)
|
|
94
100
|
for directory, dirs, names in os.walk(path, followlinks=False):
|
|
95
101
|
for name in dirs + names:
|
|
96
102
|
if (Path(directory) / name).is_symlink():
|
|
@@ -108,7 +114,11 @@ def scan(path: Path) -> list[dict[str, Any]]:
|
|
|
108
114
|
{
|
|
109
115
|
"path": file.relative_to(path).as_posix(),
|
|
110
116
|
"content": base64.b64encode(file.read_bytes()).decode("ascii"),
|
|
111
|
-
"executable":
|
|
117
|
+
"executable": (
|
|
118
|
+
file.relative_to(path).as_posix() in executable_paths
|
|
119
|
+
if os.name == "nt"
|
|
120
|
+
else bool(file.stat().st_mode & 0o111)
|
|
121
|
+
),
|
|
112
122
|
}
|
|
113
123
|
)
|
|
114
124
|
return validate(files)
|
|
@@ -199,6 +209,15 @@ def _install(
|
|
|
199
209
|
dest.parent.mkdir(parents=True, exist_ok=True)
|
|
200
210
|
dest.write_bytes(base64.b64decode(file["content"]))
|
|
201
211
|
dest.chmod(0o755 if file["executable"] else 0o644)
|
|
212
|
+
if os.name == "nt":
|
|
213
|
+
mode_file = stage / ".framework-skill.json"
|
|
214
|
+
executable_paths = [file["path"] for file in files if file["executable"]]
|
|
215
|
+
if executable_paths:
|
|
216
|
+
mode_file.write_text(
|
|
217
|
+
json.dumps({"executable_paths": executable_paths}), encoding="utf-8"
|
|
218
|
+
)
|
|
219
|
+
elif mode_file.is_file():
|
|
220
|
+
mode_file.unlink()
|
|
202
221
|
if bundle_hash(scan(stage)) != bundle_hash(files):
|
|
203
222
|
raise ValueError("Staged skill verification failed")
|
|
204
223
|
for target, stage, backup, existed in swaps:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: framework-py
|
|
3
|
-
Version: 0.1.0.
|
|
3
|
+
Version: 0.1.0.dev6
|
|
4
4
|
Summary: Structured data science projects: a data catalog, integrity tracking, caching, outputs, and AI guardrails
|
|
5
5
|
Project-URL: Homepage, https://framework.pub
|
|
6
6
|
Project-URL: Source, https://github.com/frameworktools/framework-py
|
|
@@ -39,7 +39,7 @@ framework/scaffold.py,sha256=cpLrHY30pc-HssGyyUZakbbLMe4NOdstwn3EbuAA1SY,11987
|
|
|
39
39
|
framework/scratch.py,sha256=idxthUR5BIMX7FIGS7KzIuhOrO3-HKLbBsV8It3EEE4,3890
|
|
40
40
|
framework/security.py,sha256=lPhAU_f3Yiq_yRAOroN_cMqeYvjKUanK9uls1BKDavg,24770
|
|
41
41
|
framework/settings.py,sha256=c0FNmOKZf7_E_HhEWSS0hus2ZC7stOAzDVDHqgZWkzc,18290
|
|
42
|
-
framework/skill_sync.py,sha256=
|
|
42
|
+
framework/skill_sync.py,sha256=o2nJzrld5_OHhIhkPgDbGMvOi4Z65pt-sSeCM23gKuw,19412
|
|
43
43
|
framework/storage.py,sha256=X3L5PSzxQVbRU6ews8_OJQOmfpb3ac-iKL4d-QcA3FU,32242
|
|
44
44
|
framework/_assets/init.sql,sha256=-aIiuIcCmBniGKq-CHdRtUiV9e_CLXoqxxd05snmgOE,1156
|
|
45
45
|
framework/_assets/adopt/rules.json,sha256=au7YTeHzOiYotm-lT8ap3kb1t1WmOAeZeEgoumIb7_4,2868
|
|
@@ -85,7 +85,7 @@ framework/templates/stubs/notebook-default.qmd,sha256=8Js1S2BcHYeQWmJS-kt31gBvIj
|
|
|
85
85
|
framework/templates/stubs/notebook-minimal.qmd,sha256=2U2k8judffhrh_6m6r6OAbQBCYEtViAjeKRBqBYCJTM,178
|
|
86
86
|
framework/templates/stubs/notebook-revealjs.qmd,sha256=_ztT_gHoudpB5DIjlbvtB5zQ8163DeV8xbWcT-HgJrI,409
|
|
87
87
|
framework/templates/stubs/script-default.py,sha256=vbWqgW0_rHot17mQC3tYb92g_9L-cbTOeL3y99BRrSk,216
|
|
88
|
-
framework_py-0.1.0.
|
|
89
|
-
framework_py-0.1.0.
|
|
90
|
-
framework_py-0.1.0.
|
|
91
|
-
framework_py-0.1.0.
|
|
88
|
+
framework_py-0.1.0.dev6.dist-info/METADATA,sha256=NzuSrpKV2lVpk5sUTlef4NBNXG32F9xCt8efkcscXZw,4151
|
|
89
|
+
framework_py-0.1.0.dev6.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
90
|
+
framework_py-0.1.0.dev6.dist-info/licenses/LICENSE,sha256=giOOgSwALkZimC7uhLZQK8Untez641bLW1-2-Cjvmq0,1072
|
|
91
|
+
framework_py-0.1.0.dev6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|