framework-py 0.1.0.dev29__py3-none-any.whl → 0.1.0.dev30__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/create.py +16 -0
- framework/skill_sync.py +13 -2
- {framework_py-0.1.0.dev29.dist-info → framework_py-0.1.0.dev30.dist-info}/METADATA +1 -1
- {framework_py-0.1.0.dev29.dist-info → framework_py-0.1.0.dev30.dist-info}/RECORD +6 -6
- {framework_py-0.1.0.dev29.dist-info → framework_py-0.1.0.dev30.dist-info}/WHEEL +0 -0
- {framework_py-0.1.0.dev29.dist-info → framework_py-0.1.0.dev30.dist-info}/licenses/LICENSE +0 -0
framework/create.py
CHANGED
|
@@ -116,6 +116,21 @@ def _create_directories(root: Path, spec: Mapping[str, Any]) -> None:
|
|
|
116
116
|
(root / path).mkdir(parents=True, exist_ok=True)
|
|
117
117
|
|
|
118
118
|
|
|
119
|
+
_KEEP_SKIP = {".git", "renv", ".quarto", "_freeze", "node_modules", ".venv"}
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
def _keep_folders(root: Path) -> None:
|
|
123
|
+
"""Put a ``.gitkeep`` in every empty folder, as R's ``.spec_keep_folders()`` does,
|
|
124
|
+
so the folders creation made survive git, GitHub, and its Download ZIP. Folders a
|
|
125
|
+
project's ``.gitignore`` excludes (private ones) stay out of git anyway, and
|
|
126
|
+
``scaffold()`` makes them again."""
|
|
127
|
+
for folder in sorted(root.rglob("*")):
|
|
128
|
+
if not folder.is_dir() or _KEEP_SKIP & set(folder.relative_to(root).parts):
|
|
129
|
+
continue
|
|
130
|
+
if not any(folder.iterdir()):
|
|
131
|
+
(folder / ".gitkeep").touch()
|
|
132
|
+
|
|
133
|
+
|
|
119
134
|
def _sections(spec: Mapping[str, Any]) -> dict[str, Any]:
|
|
120
135
|
"""The settings sections a Python project writes, in the shared format."""
|
|
121
136
|
scaffold = spec.get("scaffold") or {}
|
|
@@ -528,6 +543,7 @@ def project_create(
|
|
|
528
543
|
)
|
|
529
544
|
if not bare:
|
|
530
545
|
db.ensure_db(root)
|
|
546
|
+
_keep_folders(root)
|
|
531
547
|
_record(root, spec)
|
|
532
548
|
|
|
533
549
|
if not headless:
|
framework/skill_sync.py
CHANGED
|
@@ -191,7 +191,8 @@ def on_disk(root: Path, relative: str) -> str:
|
|
|
191
191
|
with os.scandir(here) as entries:
|
|
192
192
|
for entry in entries:
|
|
193
193
|
if entry.name.casefold() == part.casefold():
|
|
194
|
-
|
|
194
|
+
# Not entry.stat(): on Windows its st_ino and st_dev are always 0
|
|
195
|
+
mine = os.lstat(entry.path)
|
|
195
196
|
if (mine.st_dev, mine.st_ino) == (found.st_dev, found.st_ino):
|
|
196
197
|
real = entry.name
|
|
197
198
|
break
|
|
@@ -208,7 +209,17 @@ def lstat(path: Path) -> os.stat_result | None:
|
|
|
208
209
|
where a folder should be) raise, so a lookup error is never taken for absence."""
|
|
209
210
|
try:
|
|
210
211
|
return path.lstat()
|
|
211
|
-
except FileNotFoundError:
|
|
212
|
+
except FileNotFoundError as e:
|
|
213
|
+
# Windows says "path not found" (not NotADirectoryError) below a file
|
|
214
|
+
if getattr(e, "winerror", None) == 3:
|
|
215
|
+
for parent in path.parents:
|
|
216
|
+
try:
|
|
217
|
+
mode = parent.lstat().st_mode
|
|
218
|
+
except FileNotFoundError:
|
|
219
|
+
continue
|
|
220
|
+
if not stat.S_ISDIR(mode) and not stat.S_ISLNK(mode):
|
|
221
|
+
raise NotADirectoryError(str(path)) from None
|
|
222
|
+
break
|
|
212
223
|
return None
|
|
213
224
|
|
|
214
225
|
|
|
@@ -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.dev30
|
|
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
|
|
@@ -30,7 +30,7 @@ framework/cloud.py,sha256=y4w5euumzkNXOfC9q8v7FVW5yHEO7QORXC3D2BlirMI,67843
|
|
|
30
30
|
framework/config_home.py,sha256=iSb0VuENgNOSnsZ_v53xFqjRiGgrB7OzZbHbyDOqKzs,8265
|
|
31
31
|
framework/connections.py,sha256=99JqrNAi2zBpNYyxLV6SYj-NAJjh56pYh9jaMSYOHCU,32742
|
|
32
32
|
framework/console.py,sha256=zQ0LuFDcxe1W1kuc5E1bJ03h8d3cvwFoqDT8dAJQyN0,1267
|
|
33
|
-
framework/create.py,sha256=
|
|
33
|
+
framework/create.py,sha256=dkq5PsGNoqit0eYhvNO1-O3t0DUi9SFiawbVWdkZpIc,53696
|
|
34
34
|
framework/data.py,sha256=HpiRl5qTk1o9G-XXNDgsWhNOgXlyYegv8-8KDz-HyPA,40853
|
|
35
35
|
framework/data_registry.py,sha256=2hbXsoY9IF5Zj6lkiTE2RO2c5j2Z2vXKm2iTN7FdsQk,22499
|
|
36
36
|
framework/db.py,sha256=UYEUCvk4vGytBkmdNTUxRpYPtoFSDHwTpgpfWFw31aE,8522
|
|
@@ -53,7 +53,7 @@ framework/scratch.py,sha256=idxthUR5BIMX7FIGS7KzIuhOrO3-HKLbBsV8It3EEE4,3890
|
|
|
53
53
|
framework/security.py,sha256=-x66bSIIE_xOzkTf5Ojt7xIECKuAIpKVJZ5TtIGrwys,51147
|
|
54
54
|
framework/settings.py,sha256=Sb2YyE53aYLWPj423P-pQVCvRpLsiHydgZh2K0luTQQ,23893
|
|
55
55
|
framework/skill_pull.py,sha256=FNvJ-dvcj5XFYvhgluN22x04kcApidcgET4BTQ0LeQE,69226
|
|
56
|
-
framework/skill_sync.py,sha256=
|
|
56
|
+
framework/skill_sync.py,sha256=eEwv2rHU85IQLXBKi81x9Y-Xt_TSBXai1vAl2SnWrWM,40750
|
|
57
57
|
framework/snippets.py,sha256=J8j36YqHgG-HhWlhJ9RmJK-qwVGOOSOOd1pNakJyuVE,26481
|
|
58
58
|
framework/storage.py,sha256=Haz8CBXrz2CCqGHOVgHKC3mUUwobnod2SanU759lK7c,56115
|
|
59
59
|
framework/sync_all.py,sha256=yMR52PZrBegSSCbAOxGnt5QUcooLEfWSoxXskRjW7do,36155
|
|
@@ -141,7 +141,7 @@ framework/templates/stubs/notebook-default.qmd,sha256=8Js1S2BcHYeQWmJS-kt31gBvIj
|
|
|
141
141
|
framework/templates/stubs/notebook-minimal.qmd,sha256=2U2k8judffhrh_6m6r6OAbQBCYEtViAjeKRBqBYCJTM,178
|
|
142
142
|
framework/templates/stubs/notebook-revealjs.qmd,sha256=_ztT_gHoudpB5DIjlbvtB5zQ8163DeV8xbWcT-HgJrI,409
|
|
143
143
|
framework/templates/stubs/script-default.py,sha256=vbWqgW0_rHot17mQC3tYb92g_9L-cbTOeL3y99BRrSk,216
|
|
144
|
-
framework_py-0.1.0.
|
|
145
|
-
framework_py-0.1.0.
|
|
146
|
-
framework_py-0.1.0.
|
|
147
|
-
framework_py-0.1.0.
|
|
144
|
+
framework_py-0.1.0.dev30.dist-info/METADATA,sha256=2CA_ZRBo9MDMuWGsnX3BoP8hSPZASt9KKBRv7OCYMYE,4906
|
|
145
|
+
framework_py-0.1.0.dev30.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
146
|
+
framework_py-0.1.0.dev30.dist-info/licenses/LICENSE,sha256=giOOgSwALkZimC7uhLZQK8Untez641bLW1-2-Cjvmq0,1072
|
|
147
|
+
framework_py-0.1.0.dev30.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|