marimo-dev 0.4.2__tar.gz → 0.4.4__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.
- {marimo_dev-0.4.2 → marimo_dev-0.4.4}/PKG-INFO +1 -1
- {marimo_dev-0.4.2 → marimo_dev-0.4.4}/pyproject.toml +2 -2
- {marimo_dev-0.4.2 → marimo_dev-0.4.4}/src/marimo_dev/__init__.py +1 -1
- {marimo_dev-0.4.2 → marimo_dev-0.4.4}/src/marimo_dev/build_pkg.py +6 -3
- {marimo_dev-0.4.2 → marimo_dev-0.4.4}/src/marimo_dev/parse.py +4 -4
- {marimo_dev-0.4.2 → marimo_dev-0.4.4}/src/marimo_dev/types.py +1 -1
- {marimo_dev-0.4.2 → marimo_dev-0.4.4}/README.md +0 -0
- {marimo_dev-0.4.2 → marimo_dev-0.4.4}/src/marimo_dev/build_docs.py +0 -0
- {marimo_dev-0.4.2 → marimo_dev-0.4.4}/src/marimo_dev/cli.py +0 -0
- {marimo_dev-0.4.2 → marimo_dev-0.4.4}/src/marimo_dev/publish.py +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
[build-system]
|
|
2
|
-
requires = ["uv_build>=0.11.2"]
|
|
2
|
+
requires = ["uv_build>=0.11.2,<0.12"]
|
|
3
3
|
build-backend = "uv_build"
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "marimo-dev"
|
|
7
|
-
version = "0.4.
|
|
7
|
+
version = "0.4.4"
|
|
8
8
|
description = "Build and publish python packages from marimo notebooks"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.12"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"""Build and publish python packages from marimo notebooks"""
|
|
2
|
-
__version__ = '0.4.
|
|
2
|
+
__version__ = '0.4.4'
|
|
3
3
|
__author__ = 'Deufel'
|
|
4
4
|
from .types import rename, Config, Param, Return, Method, Import, Const, Setup, ExportKind, Export, ParsedFile, Module, Meta, Project
|
|
5
5
|
from .parse import read_config, read_project
|
|
@@ -81,9 +81,12 @@ def _write_init(
|
|
|
81
81
|
if all_exports:
|
|
82
82
|
entries = '\n'.join(f' "{n}",' for n in sorted(all_exports))
|
|
83
83
|
lines.append(f'__all__ = [\n{entries}\n]')
|
|
84
|
-
|
|
85
|
-
if proj.init_extras:
|
|
86
|
-
lines.append('\n'.join(s.src for s in proj.init_extras))
|
|
84
|
+
|
|
85
|
+
if proj.init_extras.consts:
|
|
86
|
+
lines.append('\n'.join(s.src for s in proj.init_extras.consts))
|
|
87
|
+
|
|
88
|
+
if proj.init_extras.setup:
|
|
89
|
+
lines.append('\n'.join(s.src for s in proj.init_extras.setup))
|
|
87
90
|
|
|
88
91
|
_write(path, '\n'.join(lines))
|
|
89
92
|
|
|
@@ -231,11 +231,11 @@ def read_project(
|
|
|
231
231
|
cfg = read_config(root)
|
|
232
232
|
meta = _read_meta(root)
|
|
233
233
|
nbs = Path(root) / cfg.nbs
|
|
234
|
-
|
|
235
|
-
|
|
234
|
+
|
|
235
|
+
init_extras, modules = ParsedFile([], [], [], []), []
|
|
236
236
|
for f in sorted(nbs.glob('*.py')):
|
|
237
237
|
if f.name == cfg.init:
|
|
238
|
-
|
|
238
|
+
init_extras = _parse_file(f, cfg)
|
|
239
239
|
continue
|
|
240
240
|
name = _module_name(f, cfg)
|
|
241
241
|
if name is None: continue
|
|
@@ -249,4 +249,4 @@ def read_project(
|
|
|
249
249
|
exports = parsed.exports,
|
|
250
250
|
))
|
|
251
251
|
|
|
252
|
-
return Project(meta=meta, config=cfg, modules=modules)
|
|
252
|
+
return Project(meta=meta, config=cfg, init_extras=init_extras, modules=modules)
|
|
@@ -159,7 +159,7 @@ class Project:
|
|
|
159
159
|
"A complete parsed marimo-dev project."
|
|
160
160
|
meta: Meta
|
|
161
161
|
config: Config
|
|
162
|
-
init_extras:
|
|
162
|
+
init_extras: ParsedFile = field(default_factory=lambda: ParsedFile([], [], [], []))
|
|
163
163
|
modules: list[Module] = field(default_factory=list)
|
|
164
164
|
|
|
165
165
|
@property
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|