flowyml-notebook 2.0.6__tar.gz → 2.1.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.
- flowyml_notebook-2.1.0/.github/recovery/last_release_version.txt +1 -0
- flowyml_notebook-2.1.0/.github/workflows/PRECOMMITS.yml +48 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/.github/workflows/RELEASE.yml +9 -7
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/.github/workflows/UTESTS.yml +31 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/.gitignore +2 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/.pre-commit-config.yaml +3 -1
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/PKG-INFO +13 -5
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/README.md +9 -1
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/__init__.py +1 -1
- flowyml_notebook-2.1.0/flowyml_notebook/cell_deps.py +175 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/core.py +59 -110
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/deployer.py +1 -1
- flowyml_notebook-2.1.0/flowyml_notebook/frontend/dist/assets/NotebookEditor-BJm_ZUUl.js +914 -0
- flowyml_notebook-2.1.0/flowyml_notebook/frontend/dist/assets/NotebookEditor-CPvxan_g.css +1 -0
- flowyml_notebook-2.1.0/flowyml_notebook/frontend/dist/assets/codicon-ngg6Pgfi.ttf +0 -0
- flowyml_notebook-2.1.0/flowyml_notebook/frontend/dist/assets/editor.worker-CKy7Pnvo.js +26 -0
- flowyml_notebook-2.1.0/flowyml_notebook/frontend/dist/assets/index-BHDqiEkQ.js +3587 -0
- flowyml_notebook-2.1.0/flowyml_notebook/frontend/dist/assets/markdown-BFxVWTOG.js +1 -0
- flowyml_notebook-2.1.0/flowyml_notebook/frontend/dist/assets/python-mopj86p8.js +1 -0
- flowyml_notebook-2.1.0/flowyml_notebook/frontend/dist/assets/sql-ClhHkBeG.js +1 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/dist/index.html +1 -1
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/package-lock.json +38 -30
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/package.json +7 -1
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/src/App.jsx +40 -39
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/src/components/CellEditor.jsx +47 -44
- flowyml_notebook-2.1.0/flowyml_notebook/frontend/src/components/NotebookEditor.jsx +12 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/src/components/PipelineDAG.jsx +2 -19
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/src/components/StatusBar.jsx +7 -2
- flowyml_notebook-2.1.0/flowyml_notebook/frontend/src/hooks/cellEdits.js +37 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/src/hooks/useNotebook.js +88 -175
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/ipynb_converter.py +23 -14
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/kernel.py +38 -7
- flowyml_notebook-2.1.0/flowyml_notebook/reactive.py +482 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/reporting.py +2 -2
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/server.py +79 -88
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/poetry.lock +250 -231
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/pyproject.toml +3 -3
- flowyml_notebook-2.1.0/tests/browser/smoke.py +106 -0
- flowyml_notebook-2.1.0/tests/frontend/cellEdits.test.mjs +41 -0
- flowyml_notebook-2.1.0/tests/test_notebook_lineage.py +177 -0
- flowyml_notebook-2.1.0/tuto.md +241 -0
- flowyml_notebook-2.0.6/.github/recovery/last_release_version.txt +0 -1
- flowyml_notebook-2.0.6/.github/workflows/PRECOMMITS.yml +0 -47
- flowyml_notebook-2.0.6/flowyml_notebook/cell_deps.py +0 -503
- flowyml_notebook-2.0.6/flowyml_notebook/frontend/dist/assets/index-B_AXPdfi.js +0 -3596
- flowyml_notebook-2.0.6/flowyml_notebook/reactive.py +0 -544
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/.github/workflows/MANUAL_DOCS_PUBLISH.yml +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/.github/workflows/MANUAL_PYPI_PUBLISH.yml +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/.github/workflows/PR_PREVIEW.yml +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/CHANGELOG.md +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/CODE_OF_CONDUCT.md +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/CONTRIBUTING.md +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/FlowyML E2E Demo.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/FlowyML E2E Demo_report.html +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/LICENSE +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/Makefile +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/SECURITY.md +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/assets/linkedin_announcement.png +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/assets/linkedin_post.md +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/assets/logo.png +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/assets/screenshot_dag.png +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/assets/screenshot_editor.png +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/assets/screenshot_landing.png +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/docs/api.md +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/docs/architecture.md +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/docs/assets/hero.png +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/docs/assets/logo.png +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/docs/collaboration.md +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/docs/ecosystem.md +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/docs/exploration.md +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/docs/features.md +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/docs/getting-started.md +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/docs/index.md +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/docs/integration.md +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/docs/killer-features.md +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/docs/macros.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/docs/recipes.md +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/docs/screenshots/apps.png +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/docs/screenshots/assets.png +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/docs/screenshots/comments.png +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/docs/screenshots/dag.png +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/docs/screenshots/deploy.png +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/docs/screenshots/flowy-connection.png +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/docs/screenshots/github.png +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/docs/screenshots/notebook.png +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/docs/screenshots/pandas-display.png +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/docs/screenshots/pandas-display2.png +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/docs/screenshots/pangas-display3.png +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/docs/screenshots/pipelines.png +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/docs/screenshots/recipies.png +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/docs/screenshots/recommendations.png +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/docs/screenshots/reports.png +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/docs/screenshots/snapshots.png +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/docs/stylesheets/extra.css +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/ai/__init__.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/ai/assistant.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/benchmark.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/cells.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/cli.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/code_analyzer.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/config.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/connection.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/data_validator.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/dev_server.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/diff.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/environment.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/execution_history.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/dist/assets/index-IxemCmoR.css +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/index.html +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/postcss.config.js +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/src/components/AIPanel.jsx +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/src/components/AnalysisPatternsPanel.jsx +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/src/components/AppPublisher.jsx +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/src/components/CellList.jsx +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/src/components/CellOutput.jsx +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/src/components/CellRecipes.jsx +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/src/components/ChartRenderer.jsx +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/src/components/CommandPalette.jsx +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/src/components/CommentsPanel.jsx +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/src/components/ConnectionConfig.jsx +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/src/components/DataFrameExplorer.jsx +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/src/components/FileUploader.jsx +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/src/components/FilesExplorer.jsx +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/src/components/FlowyMLPanel.jsx +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/src/components/InputWidgets.jsx +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/src/components/MarkdownRenderer.jsx +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/src/components/NotebookHeader.jsx +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/src/components/NotebookManager.jsx +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/src/components/OpenFileDialog.jsx +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/src/components/PipelineDAGViewer.jsx +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/src/components/PipelineWizard.jsx +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/src/components/ReportGenerator.jsx +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/src/components/SaveAsDialog.jsx +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/src/components/Sidebar.jsx +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/src/components/ToolsPanel.jsx +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/src/components/VersionHistory.jsx +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/src/data/flowymlSnippets.js +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/src/hooks/useFlowyMLAvailability.js +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/src/index.css +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/src/main.jsx +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/tailwind.config.js +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/frontend/vite.config.js +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/github_sync.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/integrations/__init__.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/integrations/builtin_recipes.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/integrations/ecosystem.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/integrations/kdp_adapter.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/integrations/kerasfactory_adapter.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/integrations/mlpotion_adapter.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/lineage.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/magics.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/notebook_manager.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/package_installer.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/profiler.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/py.typed +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/recipes_store.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/scheduler_bridge.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/search.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/snippets.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/sql/__init__.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/sql/engine.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/ui/__init__.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/ui/app_mode.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/flowyml_notebook/ui/ml_widgets.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/fmln/__init__.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/mkdocs.yml +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/tests/__init__.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/tests/run_tests.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/tests/test_cells.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/tests/test_core.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/tests/test_github_sync.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/tests/test_integrations.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/tests/test_ipynb_converter.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/tests/test_killer_features.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/tests/test_new_killer_features.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/tests/test_reactive.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/tests/test_reactive_edge_cases.py +0 -0
- {flowyml_notebook-2.0.6 → flowyml_notebook-2.1.0}/tests/test_server_features.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.1.0
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
name: Pre-commit checks
|
|
2
|
+
on:
|
|
3
|
+
pull_request:
|
|
4
|
+
branches:
|
|
5
|
+
- dev
|
|
6
|
+
- main
|
|
7
|
+
types:
|
|
8
|
+
- opened
|
|
9
|
+
- edited
|
|
10
|
+
- synchronize
|
|
11
|
+
workflow_dispatch:
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
|
|
15
|
+
cancel-in-progress: true
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
pre-commit-checks:
|
|
19
|
+
runs-on: ["ubuntu-latest"]
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v4
|
|
22
|
+
with:
|
|
23
|
+
fetch-depth: 0
|
|
24
|
+
- name: Set up Python
|
|
25
|
+
uses: actions/setup-python@v5
|
|
26
|
+
with:
|
|
27
|
+
python-version: "3.11"
|
|
28
|
+
- name: Check pull request title
|
|
29
|
+
if: github.event_name == 'pull_request'
|
|
30
|
+
env:
|
|
31
|
+
TITLE: ${{ github.event.pull_request.title }}
|
|
32
|
+
run: |
|
|
33
|
+
python - <<'PYTHON'
|
|
34
|
+
import os, re
|
|
35
|
+
if not re.fullmatch(r"(break|build|ci|docs|feat|fix|perf|refactor|style|test|ops|hotfix|release|maint|init|enh|revert|reformat)(\([\w.,\-()/]+\))?!?:\s.+", os.environ["TITLE"]):
|
|
36
|
+
raise SystemExit("Use a conventional commit title for the pull request.")
|
|
37
|
+
PYTHON
|
|
38
|
+
- name: Run pre-commit
|
|
39
|
+
env:
|
|
40
|
+
BASE: ${{ github.event.pull_request.base.sha }}
|
|
41
|
+
HEAD: ${{ github.event.pull_request.head.sha }}
|
|
42
|
+
run: |
|
|
43
|
+
python -m pip install pre-commit
|
|
44
|
+
if [[ -n "$BASE" ]]; then
|
|
45
|
+
pre-commit run --from-ref "$BASE" --to-ref "$HEAD"
|
|
46
|
+
else
|
|
47
|
+
pre-commit run --all-files
|
|
48
|
+
fi
|
|
@@ -45,7 +45,7 @@ jobs:
|
|
|
45
45
|
- name: Install dependencies
|
|
46
46
|
run: |
|
|
47
47
|
python -m pip install --upgrade pip
|
|
48
|
-
pip install python-semantic-release
|
|
48
|
+
pip install python-semantic-release "gitpython<3.1.60" build
|
|
49
49
|
|
|
50
50
|
- name: Semantic Release
|
|
51
51
|
id: semantic-release
|
|
@@ -55,11 +55,13 @@ jobs:
|
|
|
55
55
|
semantic-release version --print
|
|
56
56
|
echo "new_release_published=false" >> $GITHUB_OUTPUT
|
|
57
57
|
else
|
|
58
|
+
before=$(mktemp)
|
|
59
|
+
git tag --list 'v[0-9]*' | LC_ALL=C sort > "$before"
|
|
58
60
|
semantic-release version
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
echo "new_release_published=true" >> $GITHUB_OUTPUT
|
|
62
|
-
echo "new_release_version=$
|
|
61
|
+
tag=$(LC_ALL=C comm -13 "$before" <(git tag --points-at HEAD --list 'v[0-9]*' | LC_ALL=C sort))
|
|
62
|
+
if [[ -n "$tag" ]]; then
|
|
63
|
+
echo "new_release_published=true" >> "$GITHUB_OUTPUT"
|
|
64
|
+
echo "new_release_version=${tag#v}" >> "$GITHUB_OUTPUT"
|
|
63
65
|
else
|
|
64
66
|
echo "new_release_published=false" >> $GITHUB_OUTPUT
|
|
65
67
|
fi
|
|
@@ -131,12 +133,12 @@ jobs:
|
|
|
131
133
|
- name: Set up Node.js
|
|
132
134
|
uses: actions/setup-node@v4
|
|
133
135
|
with:
|
|
134
|
-
node-version: "
|
|
136
|
+
node-version: "22"
|
|
135
137
|
|
|
136
138
|
- name: Build frontend
|
|
137
139
|
run: |
|
|
138
140
|
cd flowyml_notebook/frontend
|
|
139
|
-
npm
|
|
141
|
+
npm ci
|
|
140
142
|
npm run build
|
|
141
143
|
|
|
142
144
|
- name: Set version for publishing
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
name: "Unit-tests"
|
|
2
2
|
|
|
3
|
+
permissions:
|
|
4
|
+
contents: read
|
|
5
|
+
|
|
3
6
|
on:
|
|
4
7
|
push:
|
|
5
8
|
branches:
|
|
@@ -10,6 +13,8 @@ on:
|
|
|
10
13
|
- "pyproject.toml"
|
|
11
14
|
- "poetry.lock"
|
|
12
15
|
- "tests/**"
|
|
16
|
+
- "flowyml_notebook/frontend/**"
|
|
17
|
+
- ".github/workflows/UTESTS.yml"
|
|
13
18
|
pull_request:
|
|
14
19
|
branches:
|
|
15
20
|
- dev
|
|
@@ -23,6 +28,8 @@ on:
|
|
|
23
28
|
- "pyproject.toml"
|
|
24
29
|
- "poetry.lock"
|
|
25
30
|
- "tests/**"
|
|
31
|
+
- "flowyml_notebook/frontend/**"
|
|
32
|
+
- ".github/workflows/UTESTS.yml"
|
|
26
33
|
workflow_dispatch:
|
|
27
34
|
inputs:
|
|
28
35
|
PYTHON_VERSION:
|
|
@@ -34,6 +41,30 @@ concurrency:
|
|
|
34
41
|
cancel-in-progress: true
|
|
35
42
|
|
|
36
43
|
jobs:
|
|
44
|
+
notebook-browser:
|
|
45
|
+
runs-on: ubuntu-latest
|
|
46
|
+
steps:
|
|
47
|
+
- uses: actions/checkout@v4
|
|
48
|
+
- uses: actions/setup-node@v4
|
|
49
|
+
with:
|
|
50
|
+
node-version: "22"
|
|
51
|
+
cache: npm
|
|
52
|
+
cache-dependency-path: flowyml_notebook/frontend/package-lock.json
|
|
53
|
+
- uses: actions/setup-python@v5
|
|
54
|
+
with:
|
|
55
|
+
python-version: "3.11"
|
|
56
|
+
- name: Build and test the frontend
|
|
57
|
+
working-directory: flowyml_notebook/frontend
|
|
58
|
+
run: |
|
|
59
|
+
npm ci
|
|
60
|
+
npm test
|
|
61
|
+
npm run build
|
|
62
|
+
- name: Exercise the built notebook in Chromium
|
|
63
|
+
run: |
|
|
64
|
+
python -m pip install '.[sql]' pytest playwright
|
|
65
|
+
python -m playwright install --with-deps chromium
|
|
66
|
+
python -I -m pytest -q --import-mode=importlib tests/browser/smoke.py
|
|
67
|
+
|
|
37
68
|
# Fast smoke test job for quick feedback
|
|
38
69
|
smoke-test:
|
|
39
70
|
runs-on: ubuntu-latest
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
# npm writes the lockfile and Vite generates the bundled editor.
|
|
2
|
+
exclude: ^flowyml_notebook/frontend/(dist/|package-lock\.json$)
|
|
1
3
|
default_language_version:
|
|
2
|
-
python: python3
|
|
4
|
+
python: python3
|
|
3
5
|
|
|
4
6
|
default_stages: [pre-commit]
|
|
5
7
|
default_install_hook_types: [pre-commit, commit-msg]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: flowyml-notebook
|
|
3
|
-
Version: 2.0
|
|
3
|
+
Version: 2.1.0
|
|
4
4
|
Summary: Production-grade reactive notebook — the Jupyter replacement for ML pipelines. Works standalone or with FlowyML.
|
|
5
5
|
Project-URL: Homepage, https://github.com/UnicoLab/flowyml-notebook
|
|
6
6
|
Project-URL: Repository, https://github.com/UnicoLab/flowyml-notebook
|
|
@@ -37,7 +37,7 @@ Requires-Dist: google-generativeai>=0.3; extra == 'ai'
|
|
|
37
37
|
Requires-Dist: openai>=1.0; extra == 'ai'
|
|
38
38
|
Provides-Extra: all
|
|
39
39
|
Requires-Dist: duckdb>=0.9; extra == 'all'
|
|
40
|
-
Requires-Dist: flowyml>=1.8.0; extra == 'all'
|
|
40
|
+
Requires-Dist: flowyml[basic]>=1.8.0; extra == 'all'
|
|
41
41
|
Requires-Dist: google-generativeai>=0.3; extra == 'all'
|
|
42
42
|
Requires-Dist: kdp>=1.0; extra == 'all'
|
|
43
43
|
Requires-Dist: kerasfactory>=0.1; extra == 'all'
|
|
@@ -63,7 +63,7 @@ Provides-Extra: exploration
|
|
|
63
63
|
Requires-Dist: scikit-learn>=1.3; extra == 'exploration'
|
|
64
64
|
Requires-Dist: scipy>=1.11; extra == 'exploration'
|
|
65
65
|
Provides-Extra: flowyml
|
|
66
|
-
Requires-Dist: flowyml>=1.8.0; extra == 'flowyml'
|
|
66
|
+
Requires-Dist: flowyml[basic]>=1.8.0; extra == 'flowyml'
|
|
67
67
|
Provides-Extra: keras
|
|
68
68
|
Requires-Dist: kdp>=1.0; extra == 'keras'
|
|
69
69
|
Requires-Dist: kerasfactory>=0.1; extra == 'keras'
|
|
@@ -152,6 +152,10 @@ The browser opens automatically. You're ready to build.
|
|
|
152
152
|
|
|
153
153
|
---
|
|
154
154
|
|
|
155
|
+
## Open a notebook in VS Code
|
|
156
|
+
|
|
157
|
+
Install **FlowyML Studio** from an SDK release that includes the extension, then right-click a percent-format `.py` notebook and choose **Open as FlowyML Notebook**. Select the Python environment that contains `flowyml-notebook`. You can edit Python, Markdown and SQL cells, run a cell and its dependents, and inspect the notebook DAG. Both editors use the same Python source file. [VS Code extension and installation guide](https://github.com/UnicoLab/FlowyML/tree/main/extensions/vscode)
|
|
158
|
+
|
|
155
159
|
## 🌟 Features
|
|
156
160
|
|
|
157
161
|
### 📊 Rich Data Exploration
|
|
@@ -184,9 +188,13 @@ Every DataFrame gets **automatic profiling** — statistics, distributions, corr
|
|
|
184
188
|
|
|
185
189
|
---
|
|
186
190
|
|
|
191
|
+
The file picker opens notebooks in the directory where you started the server, or alongside the notebook you opened at startup. Set `FMLN_WORKSPACE_DIR` to choose another workspace.
|
|
192
|
+
|
|
187
193
|
### 🔄 Reactive DAG Engine
|
|
188
194
|
|
|
189
|
-
|
|
195
|
+
The DAG labels each Python connection with the variable that flows between its cells. If one cell loads `rows`, another updates `rows`, and a third counts them, the count depends on the update. Moving a cell changes which value its readers see.
|
|
196
|
+
|
|
197
|
+
**Run All** executes each cell once, including SQL cells. Editing Python marks the cell and its affected readers as stale. Use the stale-cell button to recompute them together. When an edit needs a value that was overwritten in the kernel, the notebook reruns its producer first. The notebook bundles the Python, SQL, and Markdown editors so you can edit and run locally while offline.
|
|
190
198
|
|
|
191
199
|
<p align="center">
|
|
192
200
|
<img src="docs/screenshots/dag.png" alt="Pipeline DAG View" width="60%"/>
|
|
@@ -77,6 +77,10 @@ The browser opens automatically. You're ready to build.
|
|
|
77
77
|
|
|
78
78
|
---
|
|
79
79
|
|
|
80
|
+
## Open a notebook in VS Code
|
|
81
|
+
|
|
82
|
+
Install **FlowyML Studio** from an SDK release that includes the extension, then right-click a percent-format `.py` notebook and choose **Open as FlowyML Notebook**. Select the Python environment that contains `flowyml-notebook`. You can edit Python, Markdown and SQL cells, run a cell and its dependents, and inspect the notebook DAG. Both editors use the same Python source file. [VS Code extension and installation guide](https://github.com/UnicoLab/FlowyML/tree/main/extensions/vscode)
|
|
83
|
+
|
|
80
84
|
## 🌟 Features
|
|
81
85
|
|
|
82
86
|
### 📊 Rich Data Exploration
|
|
@@ -109,9 +113,13 @@ Every DataFrame gets **automatic profiling** — statistics, distributions, corr
|
|
|
109
113
|
|
|
110
114
|
---
|
|
111
115
|
|
|
116
|
+
The file picker opens notebooks in the directory where you started the server, or alongside the notebook you opened at startup. Set `FMLN_WORKSPACE_DIR` to choose another workspace.
|
|
117
|
+
|
|
112
118
|
### 🔄 Reactive DAG Engine
|
|
113
119
|
|
|
114
|
-
|
|
120
|
+
The DAG labels each Python connection with the variable that flows between its cells. If one cell loads `rows`, another updates `rows`, and a third counts them, the count depends on the update. Moving a cell changes which value its readers see.
|
|
121
|
+
|
|
122
|
+
**Run All** executes each cell once, including SQL cells. Editing Python marks the cell and its affected readers as stale. Use the stale-cell button to recompute them together. When an edit needs a value that was overwritten in the kernel, the notebook reruns its producer first. The notebook bundles the Python, SQL, and Markdown editors so you can edit and run locally while offline.
|
|
115
123
|
|
|
116
124
|
<p align="center">
|
|
117
125
|
<img src="docs/screenshots/dag.png" alt="Pipeline DAG View" width="60%"/>
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
"""Smart Cell Dependencies — automatic variable dependency analysis.
|
|
2
|
+
|
|
3
|
+
Parses Python cells with `ast` to detect which variables each cell defines
|
|
4
|
+
and which it consumes, then builds a full dependency graph with topological
|
|
5
|
+
ordering and stale-cell propagation.
|
|
6
|
+
|
|
7
|
+
This powers the "dependency map" view in the FlowyML Notebook GUI, letting
|
|
8
|
+
users see at a glance how cells relate and which cells need re-execution
|
|
9
|
+
after an upstream edit.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
from __future__ import annotations
|
|
13
|
+
|
|
14
|
+
from dataclasses import dataclass, field
|
|
15
|
+
|
|
16
|
+
from flowyml_notebook.cells import CellOutput
|
|
17
|
+
from flowyml_notebook.reactive import CellDependency as RuntimeCell
|
|
18
|
+
from flowyml_notebook.reactive import ReactiveGraph, analyze_cell
|
|
19
|
+
|
|
20
|
+
# ---------------------------------------------------------------------------
|
|
21
|
+
# Data models
|
|
22
|
+
# ---------------------------------------------------------------------------
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
@dataclass
|
|
26
|
+
class CellDependency:
|
|
27
|
+
"""Analysis result for a single cell."""
|
|
28
|
+
|
|
29
|
+
cell_id: str
|
|
30
|
+
defines: list[str] = field(default_factory=list)
|
|
31
|
+
uses: list[str] = field(default_factory=list)
|
|
32
|
+
imports: list[str] = field(default_factory=list)
|
|
33
|
+
functions_defined: list[str] = field(default_factory=list)
|
|
34
|
+
classes_defined: list[str] = field(default_factory=list)
|
|
35
|
+
|
|
36
|
+
def to_dict(self) -> dict:
|
|
37
|
+
return {
|
|
38
|
+
"cell_id": self.cell_id,
|
|
39
|
+
"defines": self.defines,
|
|
40
|
+
"uses": self.uses,
|
|
41
|
+
"imports": self.imports,
|
|
42
|
+
"functions_defined": self.functions_defined,
|
|
43
|
+
"classes_defined": self.classes_defined,
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
@dataclass
|
|
48
|
+
class DependencyGraph:
|
|
49
|
+
"""Full notebook dependency graph."""
|
|
50
|
+
|
|
51
|
+
cells: list[CellDependency] = field(default_factory=list)
|
|
52
|
+
edges: list[dict[str, str]] = field(default_factory=list)
|
|
53
|
+
execution_order: list[str] = field(default_factory=list)
|
|
54
|
+
stale_cells: list[str] = field(default_factory=list)
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> dict:
|
|
57
|
+
return {
|
|
58
|
+
"cells": [c.to_dict() for c in self.cells],
|
|
59
|
+
"edges": self.edges,
|
|
60
|
+
"execution_order": self.execution_order,
|
|
61
|
+
"stale_cells": self.stale_cells,
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
# ---------------------------------------------------------------------------
|
|
66
|
+
# Public inspection API
|
|
67
|
+
# ---------------------------------------------------------------------------
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def _describe(cell: RuntimeCell) -> CellDependency:
|
|
71
|
+
return CellDependency(
|
|
72
|
+
cell_id=cell.cell_id,
|
|
73
|
+
defines=sorted(cell.writes),
|
|
74
|
+
uses=sorted(cell.reads),
|
|
75
|
+
imports=cell.imports,
|
|
76
|
+
functions_defined=cell.functions_defined,
|
|
77
|
+
classes_defined=cell.classes_defined,
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
class CellDependencyAnalyzer:
|
|
82
|
+
"""Expose the same variable bindings and execution order used by the notebook kernel."""
|
|
83
|
+
|
|
84
|
+
def analyze_cell(self, cell_id: str, source: str) -> CellDependency:
|
|
85
|
+
return _describe(analyze_cell(cell_id, source))
|
|
86
|
+
|
|
87
|
+
def build_graph(self, cells: list[tuple[str, str]]) -> DependencyGraph:
|
|
88
|
+
graph = ReactiveGraph.from_cells(cells)
|
|
89
|
+
nodes = graph.cells.values()
|
|
90
|
+
return DependencyGraph(
|
|
91
|
+
cells=[_describe(node) for node in nodes],
|
|
92
|
+
edges=[
|
|
93
|
+
{"from_cell": parent, "to_cell": node.cell_id, "via_variable": variable}
|
|
94
|
+
for node in nodes
|
|
95
|
+
for variable, parent in sorted(node.input_producers.items())
|
|
96
|
+
],
|
|
97
|
+
execution_order=graph.get_execution_order(),
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
def get_execution_order(self, cells: list[tuple[str, str]]) -> list[str]:
|
|
101
|
+
return ReactiveGraph.from_cells(cells).get_execution_order()
|
|
102
|
+
|
|
103
|
+
def find_stale_cells(self, modified_cell_id: str, cells: list[tuple[str, str]]) -> list[str]:
|
|
104
|
+
graph = ReactiveGraph.from_cells(cells)
|
|
105
|
+
return graph.get_execution_order(graph.mark_downstream_stale(modified_cell_id))
|
|
106
|
+
|
|
107
|
+
suggest_cell_order = get_execution_order
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
# ---------------------------------------------------------------------------
|
|
111
|
+
# Rich output formatter
|
|
112
|
+
# ---------------------------------------------------------------------------
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
def format_dependency_output(graph: DependencyGraph) -> CellOutput:
|
|
116
|
+
"""Render a text-based dependency tree as rich HTML."""
|
|
117
|
+
lines: list[str] = []
|
|
118
|
+
|
|
119
|
+
# Header
|
|
120
|
+
lines.append("╔══════════════════════════════════════╗")
|
|
121
|
+
lines.append("║ 📊 Cell Dependency Graph ║")
|
|
122
|
+
lines.append("╚══════════════════════════════════════╝")
|
|
123
|
+
lines.append("")
|
|
124
|
+
|
|
125
|
+
# Per-cell summary
|
|
126
|
+
for dep in graph.cells:
|
|
127
|
+
label = f"[{dep.cell_id}]"
|
|
128
|
+
lines.append(f"┌─ {label}")
|
|
129
|
+
if dep.defines:
|
|
130
|
+
lines.append(f"│ defines : {', '.join(dep.defines)}")
|
|
131
|
+
if dep.uses:
|
|
132
|
+
lines.append(f"│ uses : {', '.join(dep.uses)}")
|
|
133
|
+
if dep.imports:
|
|
134
|
+
lines.append(f"│ imports : {', '.join(dep.imports)}")
|
|
135
|
+
if dep.functions_defined:
|
|
136
|
+
lines.append(f"│ funcs : {', '.join(dep.functions_defined)}")
|
|
137
|
+
if dep.classes_defined:
|
|
138
|
+
lines.append(f"│ classes : {', '.join(dep.classes_defined)}")
|
|
139
|
+
lines.append("└──────────")
|
|
140
|
+
|
|
141
|
+
# Edges
|
|
142
|
+
if graph.edges:
|
|
143
|
+
lines.append("")
|
|
144
|
+
lines.append("Edges:")
|
|
145
|
+
for edge in graph.edges:
|
|
146
|
+
lines.append(f" {edge['from_cell']} ──({edge['via_variable']})──▶ {edge['to_cell']}")
|
|
147
|
+
|
|
148
|
+
# Execution order
|
|
149
|
+
lines.append("")
|
|
150
|
+
lines.append(f"Execution order: {' → '.join(graph.execution_order)}")
|
|
151
|
+
|
|
152
|
+
# Stale cells
|
|
153
|
+
if graph.stale_cells:
|
|
154
|
+
lines.append(f"⚠ Stale cells: {', '.join(graph.stale_cells)}")
|
|
155
|
+
|
|
156
|
+
text = "\n".join(lines)
|
|
157
|
+
|
|
158
|
+
html = (
|
|
159
|
+
"<div style=\"font-family:'JetBrains Mono',monospace;font-size:0.78rem;"
|
|
160
|
+
"padding:14px;background:#0f172a;border-radius:8px;"
|
|
161
|
+
"border:1px solid rgba(255,255,255,0.06);white-space:pre;overflow-x:auto;"
|
|
162
|
+
f'color:#e2e8f0">{_html_escape(text)}</div>'
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
return CellOutput(
|
|
166
|
+
output_type="html",
|
|
167
|
+
data=html,
|
|
168
|
+
metadata={"dependency_graph": graph.to_dict()},
|
|
169
|
+
)
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
def _html_escape(text: str) -> str:
|
|
173
|
+
return (
|
|
174
|
+
text.replace("&", "&").replace("<", "<").replace(">", ">").replace('"', """)
|
|
175
|
+
)
|
|
@@ -469,7 +469,9 @@ class NotebookSession:
|
|
|
469
469
|
pass
|
|
470
470
|
|
|
471
471
|
# Check for FlowyML asset types
|
|
472
|
-
if getattr(result.__class__, "__module__", None) and result.__class__.__module__.startswith(
|
|
472
|
+
if getattr(result.__class__, "__module__", None) and result.__class__.__module__.startswith(
|
|
473
|
+
"flowyml"
|
|
474
|
+
):
|
|
473
475
|
return CellOutput(
|
|
474
476
|
output_type="asset",
|
|
475
477
|
data=repr(result),
|
|
@@ -572,7 +574,9 @@ class Notebook:
|
|
|
572
574
|
self.notebook = NotebookFile(metadata=NotebookMetadata(name=name, server=server or ""))
|
|
573
575
|
self.session = NotebookSession()
|
|
574
576
|
self.graph = ReactiveGraph()
|
|
577
|
+
self._live_writers: dict[str, str] = {}
|
|
575
578
|
self.file_path = file_path
|
|
579
|
+
self.workspace = Path(file_path).resolve().parent if file_path else Path.cwd()
|
|
576
580
|
self._connection = None
|
|
577
581
|
|
|
578
582
|
# Load from file if provided
|
|
@@ -606,6 +610,11 @@ class Notebook:
|
|
|
606
610
|
|
|
607
611
|
return new_cell
|
|
608
612
|
|
|
613
|
+
def move_cell(self, cell_id: str, index: int) -> set[str]:
|
|
614
|
+
if not self.notebook.move_cell(cell_id, index):
|
|
615
|
+
raise ValueError(f"Cell {cell_id} not found")
|
|
616
|
+
return self.graph.reorder(cell.id for cell in self.cells if cell.cell_type == CellType.CODE)
|
|
617
|
+
|
|
609
618
|
def update_cell(self, cell_id: str, source: str) -> set[str]:
|
|
610
619
|
"""Update a cell's source and get IDs of cells that need re-execution.
|
|
611
620
|
|
|
@@ -646,8 +655,11 @@ class Notebook:
|
|
|
646
655
|
|
|
647
656
|
if result.success:
|
|
648
657
|
self.graph.set_cell_state(cell_id, CellState.SUCCESS)
|
|
658
|
+
self._live_writers.update(dict.fromkeys(self.graph.get_writes(cell_id), cell_id))
|
|
649
659
|
else:
|
|
650
660
|
self.graph.set_cell_state(cell_id, CellState.ERROR)
|
|
661
|
+
for name in self.graph.get_writes(cell_id):
|
|
662
|
+
self._live_writers.pop(name, None)
|
|
651
663
|
|
|
652
664
|
return result
|
|
653
665
|
|
|
@@ -665,87 +677,44 @@ class Notebook:
|
|
|
665
677
|
Returns:
|
|
666
678
|
List of ExecutionResults for all executed cells.
|
|
667
679
|
"""
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
# Find and execute ALL transitively downstream cells
|
|
680
|
-
stale = self.graph.update_cell(cell_id, self.notebook.get_cell(cell_id).source)
|
|
681
|
-
if stale:
|
|
682
|
-
execution_order = self.graph.get_execution_order(stale)
|
|
683
|
-
for downstream_id in execution_order:
|
|
684
|
-
# Skip already-executed cells (deduplication for diamond deps)
|
|
685
|
-
if downstream_id in executed:
|
|
686
|
-
continue
|
|
687
|
-
downstream_result = self.execute_cell(downstream_id)
|
|
688
|
-
results.append(downstream_result)
|
|
689
|
-
executed.add(downstream_id)
|
|
690
|
-
|
|
691
|
-
# Update graph for this cell too (it may have changed)
|
|
692
|
-
downstream_cell = self.notebook.get_cell(downstream_id)
|
|
693
|
-
if downstream_cell and downstream_cell.cell_type == CellType.CODE:
|
|
694
|
-
self.graph.update_cell(downstream_id, downstream_cell.source)
|
|
695
|
-
|
|
696
|
-
if not downstream_result.success:
|
|
697
|
-
# Mark remaining downstream as stale instead of executing
|
|
698
|
-
for remaining_id in execution_order:
|
|
699
|
-
if remaining_id not in executed:
|
|
700
|
-
self.graph.set_cell_state(remaining_id, CellState.STALE)
|
|
701
|
-
break
|
|
702
|
-
|
|
703
|
-
# Clear stale state for all successfully executed cells
|
|
704
|
-
for rid in executed:
|
|
705
|
-
if self.graph.get_cell_state(rid) != CellState.ERROR:
|
|
706
|
-
self.graph.set_cell_state(rid, CellState.SUCCESS)
|
|
707
|
-
|
|
708
|
-
return results
|
|
680
|
+
cell = self.notebook.get_cell(cell_id)
|
|
681
|
+
if cell is None or cell.cell_type != CellType.CODE:
|
|
682
|
+
return [self.execute_cell(cell_id)]
|
|
683
|
+
targets = {cell_id} | self.graph.mark_downstream_stale(cell_id)
|
|
684
|
+
return self._execute_order(self.graph.get_reactive_order(targets, self._live_writers))
|
|
685
|
+
|
|
686
|
+
def run_stale(self) -> list[ExecutionResult]:
|
|
687
|
+
"""Run edited cells and their affected consumers once in dependency order."""
|
|
688
|
+
return self._execute_order(
|
|
689
|
+
self.graph.get_reactive_order(self.graph.get_stale_cells(), self._live_writers)
|
|
690
|
+
)
|
|
709
691
|
|
|
710
692
|
def run(self) -> list[ExecutionResult]:
|
|
711
|
-
"""
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
all_cell_ids = {cell.id for cell in self.notebook.cells if cell.cell_type == CellType.CODE}
|
|
717
|
-
execution_order = self.graph.get_execution_order(all_cell_ids)
|
|
718
|
-
|
|
719
|
-
# Include non-code cells in order (markdown, SQL)
|
|
720
|
-
ordered_ids = []
|
|
721
|
-
code_idx = 0
|
|
722
|
-
for cell in self.notebook.cells:
|
|
723
|
-
if cell.cell_type == CellType.CODE and cell.id in all_cell_ids:
|
|
724
|
-
# Insert in topological order
|
|
725
|
-
while code_idx < len(execution_order):
|
|
726
|
-
ordered_ids.append(execution_order[code_idx])
|
|
727
|
-
code_idx += 1
|
|
728
|
-
if execution_order[code_idx - 1] == cell.id:
|
|
729
|
-
break
|
|
730
|
-
else:
|
|
731
|
-
ordered_ids.append(cell.id)
|
|
732
|
-
|
|
733
|
-
# Add any remaining code cells
|
|
734
|
-
while code_idx < len(execution_order):
|
|
735
|
-
if execution_order[code_idx] not in ordered_ids:
|
|
736
|
-
ordered_ids.append(execution_order[code_idx])
|
|
737
|
-
code_idx += 1
|
|
693
|
+
"""Run each cell once, leaving Markdown and SQL in their document slots."""
|
|
694
|
+
code_order = iter(self.graph.get_execution_order())
|
|
695
|
+
return self._execute_order(
|
|
696
|
+
next(code_order) if cell.cell_type == CellType.CODE else cell.id for cell in self.cells
|
|
697
|
+
)
|
|
738
698
|
|
|
699
|
+
def _execute_order(self, cell_ids) -> list[ExecutionResult]:
|
|
739
700
|
results = []
|
|
740
|
-
for
|
|
741
|
-
result = self.execute_cell(
|
|
701
|
+
for cid in cell_ids:
|
|
702
|
+
result = self.execute_cell(cid)
|
|
742
703
|
results.append(result)
|
|
743
|
-
if not result.success
|
|
744
|
-
logger.warning(
|
|
704
|
+
if not result.success:
|
|
705
|
+
logger.warning("Cell %s failed, stopping execution", cid)
|
|
745
706
|
break
|
|
746
|
-
|
|
747
707
|
return results
|
|
748
708
|
|
|
709
|
+
def reset_kernel(self) -> None:
|
|
710
|
+
self.session.reset()
|
|
711
|
+
self._live_writers.clear()
|
|
712
|
+
for cell in self.cells:
|
|
713
|
+
self.graph.set_cell_state(cell.id, CellState.IDLE)
|
|
714
|
+
cell.execution_count = 0
|
|
715
|
+
cell.last_executed = None
|
|
716
|
+
cell.outputs = []
|
|
717
|
+
|
|
749
718
|
def save(self, path: str | None = None) -> str:
|
|
750
719
|
"""Save notebook to .py file.
|
|
751
720
|
|
|
@@ -817,45 +786,25 @@ class Notebook:
|
|
|
817
786
|
if path.endswith(".ipynb"):
|
|
818
787
|
from flowyml_notebook.ipynb_converter import from_ipynb
|
|
819
788
|
|
|
820
|
-
|
|
789
|
+
document = from_ipynb(path)
|
|
821
790
|
else:
|
|
822
|
-
|
|
823
|
-
|
|
791
|
+
document = parse_notebook(Path(path).read_text(encoding="utf-8"))
|
|
792
|
+
self.load_document(document, path)
|
|
793
|
+
logger.info("Notebook loaded from %s (%d cells)", path, len(self.cells))
|
|
794
|
+
|
|
795
|
+
def load_document(self, document: NotebookFile, path: str | None = None) -> None:
|
|
796
|
+
"""Replace the current document and rebuild its bindings in one pass."""
|
|
797
|
+
graph = ReactiveGraph.from_cells(
|
|
798
|
+
(cell.id, cell.source) for cell in document.cells if cell.cell_type == CellType.CODE
|
|
799
|
+
)
|
|
800
|
+
self.notebook = document
|
|
801
|
+
self.graph = graph
|
|
802
|
+
self._live_writers.clear()
|
|
824
803
|
self.file_path = path
|
|
825
804
|
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
self.graph.update_cell(cell.id, cell.source)
|
|
830
|
-
|
|
831
|
-
logger.info(f"Notebook loaded from {path} ({len(self.notebook.cells)} cells)")
|
|
832
|
-
|
|
833
|
-
def load_from_dict(self, data: dict) -> None:
|
|
834
|
-
"""Load notebook from a dictionary (JSON data).
|
|
835
|
-
|
|
836
|
-
Args:
|
|
837
|
-
data: Notebook data dict with 'metadata' and 'cells' keys.
|
|
838
|
-
"""
|
|
839
|
-
meta = data.get("metadata", {})
|
|
840
|
-
self.notebook.metadata.name = meta.get("name", "untitled")
|
|
841
|
-
self.notebook.metadata.description = meta.get("description", "")
|
|
842
|
-
self.notebook.metadata.server = meta.get("server", "")
|
|
843
|
-
|
|
844
|
-
# Clear and rebuild cells
|
|
845
|
-
self.notebook.cells.clear()
|
|
846
|
-
self.graph = ReactiveGraph()
|
|
847
|
-
|
|
848
|
-
for cell_data in data.get("cells", []):
|
|
849
|
-
cell_type = CellType(cell_data.get("cell_type", "code"))
|
|
850
|
-
new_cell = self.notebook.add_cell(
|
|
851
|
-
source=cell_data.get("source", ""),
|
|
852
|
-
cell_type=cell_type,
|
|
853
|
-
name=cell_data.get("name", ""),
|
|
854
|
-
)
|
|
855
|
-
if cell_type == CellType.CODE:
|
|
856
|
-
self.graph.update_cell(new_cell.id, new_cell.source)
|
|
857
|
-
|
|
858
|
-
logger.info(f"Notebook loaded from dict ({len(self.notebook.cells)} cells)")
|
|
805
|
+
def load_from_dict(self, data: dict, *, path: str | None = None) -> None:
|
|
806
|
+
"""Restore cells, identifiers and saved results from a serialized notebook."""
|
|
807
|
+
self.load_document(NotebookFile.from_dict(data), path)
|
|
859
808
|
|
|
860
809
|
def connect(self, server: str | None = None) -> None:
|
|
861
810
|
"""Connect to a centralized FlowyML server.
|
|
@@ -190,7 +190,7 @@ CMD ["python", "{Path(pipeline_path).name}"]
|
|
|
190
190
|
try:
|
|
191
191
|
import flowyml
|
|
192
192
|
|
|
193
|
-
reqs.insert(0, f"flowyml>={flowyml.__version__}")
|
|
193
|
+
reqs.insert(0, f"flowyml[basic]>={flowyml.__version__}")
|
|
194
194
|
except ImportError:
|
|
195
195
|
pass
|
|
196
196
|
Path("requirements.txt").write_text("\n".join(reqs) + "\n", encoding="utf-8")
|