marimo-dev 0.3.5__tar.gz → 0.3.6__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: marimo-dev
3
- Version: 0.3.5
3
+ Version: 0.3.6
4
4
  Summary: Build and publish python packages from marimo notebooks
5
5
  Author: Deufel
6
6
  Author-email: Deufel <MDeufel13@gmail.com>
@@ -4,7 +4,7 @@ build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "marimo-dev"
7
- version = "0.3.5"
7
+ version = "0.3.6"
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.3.5'
2
+ __version__ = '0.3.6'
3
3
  __author__ = 'Deufel'
4
4
  from .core import Config, read_config, Kind, Param, Node
5
5
  from .read import inline_doc, parse_params, parse_hash_pipe, parse_class_params, parse_class_methods, parse_ret, src_with_decs, is_export, parse_import, parse_const, parse_export, parse_node, parse_file, read_meta, nb_name, scan
@@ -7,6 +7,7 @@ from .pkg import clean, write, write_mod, rename, apply_renames, rewrite_imports
7
7
  from .docs import sanitize_for_js, render_node_with_search, render_module_page_datastar, nb_path, render_index_page, html_preview, build_docs, export_wasm, write_nojekyll, Icon, write_highlighter
8
8
  from .build import build, tidy, nuke, get_pypi_name, extract_import_names, pep723_header, write_llms, bundle, bundle_notebook
9
9
  from .publish import check_credentials, check_pypi_auth, publish
10
+ from .cli import main
10
11
  __all__ = [
11
12
  "Config",
12
13
  "Icon",
@@ -27,6 +28,7 @@ __all__ = [
27
28
  "html_preview",
28
29
  "inline_doc",
29
30
  "is_export",
31
+ "main",
30
32
  "nb_name",
31
33
  "nb_path",
32
34
  "nuke",
@@ -0,0 +1,27 @@
1
+ from .build import build, tidy, nuke, bundle
2
+ from .publish import publish
3
+ from .docs import build_docs, write_highlighter
4
+ import sys, subprocess
5
+ from pathlib import Path
6
+
7
+ def main():
8
+ if len(sys.argv) < 2: print("Usage: md [build|publish|docs|tidy|nuke]"); sys.exit(1)
9
+ cmd = sys.argv[1]
10
+ if cmd == 'build':
11
+ print(f"Built package at: {build()}")
12
+ print(build_docs())
13
+ elif cmd == 'publish':
14
+ test = '--test' in sys.argv or '-t' in sys.argv
15
+ target = "TestPyPI" if test else "PyPI"
16
+ if input(f"Publish to {target}? [y/N] ").lower() != 'y': print("Aborted"); sys.exit(0)
17
+ publish(test=test)
18
+ elif cmd == 'docs':
19
+ write_highlighter()
20
+ build_docs()
21
+ elif cmd == 'tidy': tidy()
22
+ elif cmd == 'nuke': nuke()
23
+ elif cmd == 'bundle':
24
+ name = sys.argv[2] if len(sys.argv) > 2 else None
25
+ print(bundle(name=name))
26
+
27
+ else: print(f"Unknown command: {cmd}"); sys.exit(1)
File without changes