indah 0.0.1__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.
- indah-0.0.1/.githooks/pre-push +10 -0
- indah-0.0.1/.github/workflows/ci.yml +63 -0
- indah-0.0.1/.github/workflows/publish.yml +36 -0
- indah-0.0.1/.gitignore +29 -0
- indah-0.0.1/AGENTS.md +43 -0
- indah-0.0.1/CLAUDE.md +1 -0
- indah-0.0.1/LICENSE +201 -0
- indah-0.0.1/Makefile +40 -0
- indah-0.0.1/PKG-INFO +108 -0
- indah-0.0.1/README.md +79 -0
- indah-0.0.1/docs/PLAN.md +181 -0
- indah-0.0.1/docs/QUESTIONS.md +56 -0
- indah-0.0.1/docs/RELEASING.md +38 -0
- indah-0.0.1/docs/SLICES.md +160 -0
- indah-0.0.1/docs/adr/0001-single-port-asgi-app.md +38 -0
- indah-0.0.1/docs/adr/0002-sse-plus-post-transport.md +42 -0
- indah-0.0.1/docs/adr/0003-reactive-signals-model.md +40 -0
- indah-0.0.1/docs/adr/0004-svelte-prebuilt-shell.md +42 -0
- indah-0.0.1/docs/adr/0005-json-protocol-public-contract.md +40 -0
- indah-0.0.1/docs/adr/0006-project-name-indah.md +39 -0
- indah-0.0.1/docs/adr/0007-docs-with-zensical.md +46 -0
- indah-0.0.1/docs/initial-planning-chat.md +259 -0
- indah-0.0.1/pyproject.toml +59 -0
- indah-0.0.1/src/indah/__init__.py +9 -0
- indah-0.0.1/tests/__init__.py +0 -0
- indah-0.0.1/tests/e2e/README.md +8 -0
- indah-0.0.1/tests/e2e/__init__.py +0 -0
- indah-0.0.1/tests/integration/__init__.py +0 -0
- indah-0.0.1/tests/unit/__init__.py +0 -0
- indah-0.0.1/tests/unit/test_version.py +9 -0
- indah-0.0.1/uv.lock +209 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Fast pre-push gate: mirrors the cheap CI jobs (lint + fast tests).
|
|
3
|
+
# Bypass once with: git push --no-verify
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
echo "pre-push: ruff check + format check + fast tests"
|
|
7
|
+
uv run ruff check .
|
|
8
|
+
uv run ruff format --check .
|
|
9
|
+
uv run pytest -m "unit or integration" -q
|
|
10
|
+
echo "pre-push: ok"
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
# Cancel superseded runs on the same ref (principle 7).
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ci-${{ github.ref }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
lint:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
- uses: astral-sh/setup-uv@v6
|
|
19
|
+
with:
|
|
20
|
+
enable-cache: true
|
|
21
|
+
- run: uv sync --frozen --extra dev
|
|
22
|
+
- name: Ruff lint
|
|
23
|
+
run: uv run ruff check .
|
|
24
|
+
- name: Ruff format check
|
|
25
|
+
run: uv run ruff format --check .
|
|
26
|
+
|
|
27
|
+
# Fast layer: unit + integration. No external infra, so it runs everywhere
|
|
28
|
+
# and mirrors the pre-push hook (principles 1, 6).
|
|
29
|
+
fast-tests:
|
|
30
|
+
runs-on: ubuntu-latest
|
|
31
|
+
strategy:
|
|
32
|
+
fail-fast: false
|
|
33
|
+
matrix:
|
|
34
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
35
|
+
steps:
|
|
36
|
+
- uses: actions/checkout@v4
|
|
37
|
+
- uses: astral-sh/setup-uv@v6
|
|
38
|
+
with:
|
|
39
|
+
enable-cache: true
|
|
40
|
+
python-version: ${{ matrix.python-version }}
|
|
41
|
+
- run: uv sync --frozen --extra dev
|
|
42
|
+
- name: Unit + integration tests
|
|
43
|
+
run: uv run pytest -m "unit or integration" -q
|
|
44
|
+
|
|
45
|
+
build:
|
|
46
|
+
runs-on: ubuntu-latest
|
|
47
|
+
steps:
|
|
48
|
+
- uses: actions/checkout@v4
|
|
49
|
+
- uses: astral-sh/setup-uv@v6
|
|
50
|
+
with:
|
|
51
|
+
enable-cache: true
|
|
52
|
+
- name: Build wheel and sdist
|
|
53
|
+
run: uv build
|
|
54
|
+
- name: Verify metadata
|
|
55
|
+
run: uvx twine check dist/*
|
|
56
|
+
- uses: actions/upload-artifact@v4
|
|
57
|
+
with:
|
|
58
|
+
name: dist
|
|
59
|
+
path: dist/
|
|
60
|
+
|
|
61
|
+
# Heavy layer (browser / real launched app) is added with Slice 1, when
|
|
62
|
+
# there is a stack to boot. Tracked in SLICES.md V1. Placeholder job keeps
|
|
63
|
+
# the required-check name stable once branch protection is on.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
# Publishes on a GitHub Release. Uses PyPI Trusted Publishing (OIDC), so no
|
|
4
|
+
# API token is stored in the repo. One-time setup is documented in
|
|
5
|
+
# docs/RELEASING.md.
|
|
6
|
+
on:
|
|
7
|
+
release:
|
|
8
|
+
types: [published]
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
- uses: astral-sh/setup-uv@v6
|
|
16
|
+
with:
|
|
17
|
+
enable-cache: true
|
|
18
|
+
- run: uv build
|
|
19
|
+
- run: uvx twine check dist/*
|
|
20
|
+
- uses: actions/upload-artifact@v4
|
|
21
|
+
with:
|
|
22
|
+
name: dist
|
|
23
|
+
path: dist/
|
|
24
|
+
|
|
25
|
+
publish:
|
|
26
|
+
needs: build
|
|
27
|
+
runs-on: ubuntu-latest
|
|
28
|
+
environment: pypi
|
|
29
|
+
permissions:
|
|
30
|
+
id-token: write # required for trusted publishing
|
|
31
|
+
steps:
|
|
32
|
+
- uses: actions/download-artifact@v4
|
|
33
|
+
with:
|
|
34
|
+
name: dist
|
|
35
|
+
path: dist/
|
|
36
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
indah-0.0.1/.gitignore
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
.eggs/
|
|
6
|
+
build/
|
|
7
|
+
dist/
|
|
8
|
+
.venv/
|
|
9
|
+
venv/
|
|
10
|
+
|
|
11
|
+
# Tooling
|
|
12
|
+
.pytest_cache/
|
|
13
|
+
.ruff_cache/
|
|
14
|
+
.mypy_cache/
|
|
15
|
+
.coverage
|
|
16
|
+
htmlcov/
|
|
17
|
+
|
|
18
|
+
# Env / secrets
|
|
19
|
+
.env
|
|
20
|
+
.pypirc
|
|
21
|
+
|
|
22
|
+
# OS / editor
|
|
23
|
+
.DS_Store
|
|
24
|
+
*.swp
|
|
25
|
+
.idea/
|
|
26
|
+
.vscode/
|
|
27
|
+
|
|
28
|
+
# Frontend build (node is build-time only; keep it out of the repo root)
|
|
29
|
+
node_modules/
|
indah-0.0.1/AGENTS.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
## What
|
|
4
|
+
|
|
5
|
+
indah is a Python UI framework for ephemeral cloud notebooks (Colab, Runpod):
|
|
6
|
+
reactive, single-port, no Node required at install or runtime.
|
|
7
|
+
|
|
8
|
+
Status: early planning. `0.0.1` is a name-reservation placeholder; there is no
|
|
9
|
+
working framework code yet. Trust the code over any doc where they disagree, and
|
|
10
|
+
fix the doc.
|
|
11
|
+
|
|
12
|
+
Layout:
|
|
13
|
+
|
|
14
|
+
- `src/indah/` package (src layout, hatchling build)
|
|
15
|
+
- `tests/unit`, `tests/integration` (fast layer, no infra), `tests/e2e` (heavy)
|
|
16
|
+
- `docs/` PLAN, SLICES, QUESTIONS, RELEASING, and `docs/adr/` for decisions
|
|
17
|
+
(the user-facing docs site will be Zensical, FastAPI-style; see ADR-0007)
|
|
18
|
+
- `.github/workflows/` CI and PyPI publish
|
|
19
|
+
|
|
20
|
+
## Why
|
|
21
|
+
|
|
22
|
+
Streamlit reruns the whole script per interaction; Gradio is layout-rigid; Reflex
|
|
23
|
+
needs a Node build step that fails inside transient cloud containers. indah fills
|
|
24
|
+
that gap. The load-bearing decisions are in `docs/adr/` (read 0002 on transport
|
|
25
|
+
and 0003 on the reactive model before touching those areas).
|
|
26
|
+
|
|
27
|
+
## How
|
|
28
|
+
|
|
29
|
+
Toolchain is `uv` (not plain pip/venv). Common commands (see `make help`):
|
|
30
|
+
|
|
31
|
+
- Setup: `uv sync --extra dev`
|
|
32
|
+
- Fast gate (run before pushing): `make check` (ruff + `pytest -m "unit or integration"`)
|
|
33
|
+
- Full tests: `uv run pytest`
|
|
34
|
+
- Build: `uv build`
|
|
35
|
+
- Install the pre-push hook once: `make hooks`
|
|
36
|
+
|
|
37
|
+
Conventions:
|
|
38
|
+
|
|
39
|
+
- Branch per slice off fresh `main`; land via PR with green CI; no direct pushes to `main`.
|
|
40
|
+
- Every bug or flake gets a failing test first, then the fix.
|
|
41
|
+
- Tests are marked `unit` / `integration` / `e2e`; keep infra-free tests out of the `e2e` mark.
|
|
42
|
+
- Never commit secrets or a PyPI token. Releasing is documented in `docs/RELEASING.md`.
|
|
43
|
+
- User-facing text (README, package description, release notes) uses hyphens, not em-dashes.
|
indah-0.0.1/CLAUDE.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@AGENTS.md
|
indah-0.0.1/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 Jian Lee
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
indah-0.0.1/Makefile
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
.DEFAULT_GOAL := help
|
|
2
|
+
|
|
3
|
+
.PHONY: help setup hooks fmt lint test test-fast test-e2e build check clean
|
|
4
|
+
|
|
5
|
+
help: ## Show this help
|
|
6
|
+
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
|
|
7
|
+
awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-12s\033[0m %s\n", $$1, $$2}'
|
|
8
|
+
|
|
9
|
+
setup: ## Install dev dependencies into a local venv
|
|
10
|
+
uv sync --extra dev
|
|
11
|
+
|
|
12
|
+
hooks: ## Install the git pre-push hook
|
|
13
|
+
git config core.hooksPath .githooks
|
|
14
|
+
@echo "pre-push hook installed (bypass once with: git push --no-verify)"
|
|
15
|
+
|
|
16
|
+
fmt: ## Auto-format the code
|
|
17
|
+
uv run ruff format .
|
|
18
|
+
uv run ruff check --fix .
|
|
19
|
+
|
|
20
|
+
lint: ## Lint and format-check (no changes)
|
|
21
|
+
uv run ruff check .
|
|
22
|
+
uv run ruff format --check .
|
|
23
|
+
|
|
24
|
+
test-fast: ## Run the fast layer (unit + integration, no infra)
|
|
25
|
+
uv run pytest -m "unit or integration" -q
|
|
26
|
+
|
|
27
|
+
test-e2e: ## Run the heavy layer (browser / real launched app)
|
|
28
|
+
uv run pytest -m e2e -q
|
|
29
|
+
|
|
30
|
+
test: ## Run the full test suite
|
|
31
|
+
uv run pytest -q
|
|
32
|
+
|
|
33
|
+
build: ## Build the wheel and sdist
|
|
34
|
+
uv build
|
|
35
|
+
|
|
36
|
+
check: lint test-fast ## The pre-push gate: lint + fast tests
|
|
37
|
+
|
|
38
|
+
clean: ## Remove build and cache artifacts
|
|
39
|
+
rm -rf dist build .pytest_cache .ruff_cache
|
|
40
|
+
find . -type d -name __pycache__ -prune -exec rm -rf {} +
|
indah-0.0.1/PKG-INFO
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: indah
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: A Python UI framework for ephemeral cloud notebooks (Colab, Runpod). Reactive, single-port, no Node required.
|
|
5
|
+
Project-URL: Homepage, https://github.com/leejianrong/indah
|
|
6
|
+
Project-URL: Repository, https://github.com/leejianrong/indah
|
|
7
|
+
Project-URL: Issues, https://github.com/leejianrong/indah/issues
|
|
8
|
+
Author-email: Jian Lee <leejianrong2@gmail.com>
|
|
9
|
+
License-Expression: Apache-2.0
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: colab,framework,gradio,notebook,reactive,runpod,streamlit,ui
|
|
12
|
+
Classifier: Development Status :: 1 - Planning
|
|
13
|
+
Classifier: Framework :: AsyncIO
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Topic :: Software Development :: User Interfaces
|
|
23
|
+
Requires-Python: >=3.10
|
|
24
|
+
Provides-Extra: dev
|
|
25
|
+
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
|
|
26
|
+
Requires-Dist: pytest>=8; extra == 'dev'
|
|
27
|
+
Requires-Dist: ruff>=0.6; extra == 'dev'
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
|
|
30
|
+
# indah
|
|
31
|
+
|
|
32
|
+
**A Python UI framework for ephemeral cloud notebooks (Colab, Runpod). Reactive,
|
|
33
|
+
single-port, no Node required.**
|
|
34
|
+
|
|
35
|
+
Build an interactive UI from a single Python file and launch it straight from a
|
|
36
|
+
Colab or Runpod cell. It keeps Streamlit's zero-config, single-port startup, adds
|
|
37
|
+
the async performance of a real full-stack app, and ships its frontend pre-built
|
|
38
|
+
so there is no Node, npm, or bun anywhere at install or runtime.
|
|
39
|
+
|
|
40
|
+
> **Status: early planning.** `indah` is not usable yet. This repository currently
|
|
41
|
+
> holds the plan and a `0.0.x` placeholder that reserves the name on PyPI. If you
|
|
42
|
+
> want to follow along, start with [`docs/PLAN.md`](docs/PLAN.md).
|
|
43
|
+
|
|
44
|
+
## Why another one
|
|
45
|
+
|
|
46
|
+
| Pain | indah's answer |
|
|
47
|
+
|------|----------------|
|
|
48
|
+
| Streamlit reruns the whole script on every interaction | Reactive signals: only the affected components update ([ADR-0003](docs/adr/0003-reactive-signals-model.md)) |
|
|
49
|
+
| Gradio's layout and state model get awkward past a demo | Plain Python components bound to state, custom layouts |
|
|
50
|
+
| Reflex needs a Node build step that breaks in transient containers | Frontend ships pre-built in the wheel; zero runtime Node ([ADR-0004](docs/adr/0004-svelte-prebuilt-shell.md)) |
|
|
51
|
+
| Colab's proxy does not support WebSockets | SSE + HTTP POST transport that passes the proxy ([ADR-0002](docs/adr/0002-sse-plus-post-transport.md)) |
|
|
52
|
+
|
|
53
|
+
## How it will work
|
|
54
|
+
|
|
55
|
+
```mermaid
|
|
56
|
+
flowchart LR
|
|
57
|
+
subgraph Cell["Colab / Runpod cell"]
|
|
58
|
+
PY["Your Python app<br/>(reactive signals)"]
|
|
59
|
+
end
|
|
60
|
+
subgraph ASGI["Single ASGI app, one port"]
|
|
61
|
+
CORE["Reactive core<br/>signals to JSON patches"]
|
|
62
|
+
API["/api: SSE + POST"]
|
|
63
|
+
STATIC["Pre-built Svelte shell<br/>(static assets in the wheel)"]
|
|
64
|
+
end
|
|
65
|
+
Browser["Browser via platform proxy"]
|
|
66
|
+
|
|
67
|
+
PY --> CORE --> API
|
|
68
|
+
STATIC -- served over HTTP --> Browser
|
|
69
|
+
API -- SSE patches --> Browser
|
|
70
|
+
Browser -- POST events --> API
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
One port, standard HTTP plus Server-Sent Events, so it works through the network
|
|
74
|
+
proxies of Colab and Runpod without a tunnel or a local JavaScript toolchain.
|
|
75
|
+
|
|
76
|
+
## Try the placeholder
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
pip install indah # reserves the name; no framework yet
|
|
80
|
+
python -c "import indah; print(indah.__version__)"
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
There is no public API yet. The first working slice ("a live pixel through the
|
|
84
|
+
proxy") is described in [`docs/SLICES.md`](docs/SLICES.md).
|
|
85
|
+
|
|
86
|
+
## Planning and design
|
|
87
|
+
|
|
88
|
+
| Doc | What |
|
|
89
|
+
|-----|------|
|
|
90
|
+
| [`docs/PLAN.md`](docs/PLAN.md) | Problem, solution, scope, requirements, architecture |
|
|
91
|
+
| [`docs/SLICES.md`](docs/SLICES.md) | Vertical build increments with test plans |
|
|
92
|
+
| [`docs/QUESTIONS.md`](docs/QUESTIONS.md) | Decision register |
|
|
93
|
+
| [`docs/adr/`](docs/adr/) | Architecture Decision Records |
|
|
94
|
+
|
|
95
|
+
## Development
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
uv sync --extra dev
|
|
99
|
+
make check # lint + fast tests (the pre-push gate)
|
|
100
|
+
make help # list all targets
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
See [`AGENTS.md`](AGENTS.md) for repo conventions and [`docs/RELEASING.md`](docs/RELEASING.md)
|
|
104
|
+
for the release process.
|
|
105
|
+
|
|
106
|
+
## License
|
|
107
|
+
|
|
108
|
+
[Apache License 2.0](LICENSE).
|
indah-0.0.1/README.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# indah
|
|
2
|
+
|
|
3
|
+
**A Python UI framework for ephemeral cloud notebooks (Colab, Runpod). Reactive,
|
|
4
|
+
single-port, no Node required.**
|
|
5
|
+
|
|
6
|
+
Build an interactive UI from a single Python file and launch it straight from a
|
|
7
|
+
Colab or Runpod cell. It keeps Streamlit's zero-config, single-port startup, adds
|
|
8
|
+
the async performance of a real full-stack app, and ships its frontend pre-built
|
|
9
|
+
so there is no Node, npm, or bun anywhere at install or runtime.
|
|
10
|
+
|
|
11
|
+
> **Status: early planning.** `indah` is not usable yet. This repository currently
|
|
12
|
+
> holds the plan and a `0.0.x` placeholder that reserves the name on PyPI. If you
|
|
13
|
+
> want to follow along, start with [`docs/PLAN.md`](docs/PLAN.md).
|
|
14
|
+
|
|
15
|
+
## Why another one
|
|
16
|
+
|
|
17
|
+
| Pain | indah's answer |
|
|
18
|
+
|------|----------------|
|
|
19
|
+
| Streamlit reruns the whole script on every interaction | Reactive signals: only the affected components update ([ADR-0003](docs/adr/0003-reactive-signals-model.md)) |
|
|
20
|
+
| Gradio's layout and state model get awkward past a demo | Plain Python components bound to state, custom layouts |
|
|
21
|
+
| Reflex needs a Node build step that breaks in transient containers | Frontend ships pre-built in the wheel; zero runtime Node ([ADR-0004](docs/adr/0004-svelte-prebuilt-shell.md)) |
|
|
22
|
+
| Colab's proxy does not support WebSockets | SSE + HTTP POST transport that passes the proxy ([ADR-0002](docs/adr/0002-sse-plus-post-transport.md)) |
|
|
23
|
+
|
|
24
|
+
## How it will work
|
|
25
|
+
|
|
26
|
+
```mermaid
|
|
27
|
+
flowchart LR
|
|
28
|
+
subgraph Cell["Colab / Runpod cell"]
|
|
29
|
+
PY["Your Python app<br/>(reactive signals)"]
|
|
30
|
+
end
|
|
31
|
+
subgraph ASGI["Single ASGI app, one port"]
|
|
32
|
+
CORE["Reactive core<br/>signals to JSON patches"]
|
|
33
|
+
API["/api: SSE + POST"]
|
|
34
|
+
STATIC["Pre-built Svelte shell<br/>(static assets in the wheel)"]
|
|
35
|
+
end
|
|
36
|
+
Browser["Browser via platform proxy"]
|
|
37
|
+
|
|
38
|
+
PY --> CORE --> API
|
|
39
|
+
STATIC -- served over HTTP --> Browser
|
|
40
|
+
API -- SSE patches --> Browser
|
|
41
|
+
Browser -- POST events --> API
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
One port, standard HTTP plus Server-Sent Events, so it works through the network
|
|
45
|
+
proxies of Colab and Runpod without a tunnel or a local JavaScript toolchain.
|
|
46
|
+
|
|
47
|
+
## Try the placeholder
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
pip install indah # reserves the name; no framework yet
|
|
51
|
+
python -c "import indah; print(indah.__version__)"
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
There is no public API yet. The first working slice ("a live pixel through the
|
|
55
|
+
proxy") is described in [`docs/SLICES.md`](docs/SLICES.md).
|
|
56
|
+
|
|
57
|
+
## Planning and design
|
|
58
|
+
|
|
59
|
+
| Doc | What |
|
|
60
|
+
|-----|------|
|
|
61
|
+
| [`docs/PLAN.md`](docs/PLAN.md) | Problem, solution, scope, requirements, architecture |
|
|
62
|
+
| [`docs/SLICES.md`](docs/SLICES.md) | Vertical build increments with test plans |
|
|
63
|
+
| [`docs/QUESTIONS.md`](docs/QUESTIONS.md) | Decision register |
|
|
64
|
+
| [`docs/adr/`](docs/adr/) | Architecture Decision Records |
|
|
65
|
+
|
|
66
|
+
## Development
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
uv sync --extra dev
|
|
70
|
+
make check # lint + fast tests (the pre-push gate)
|
|
71
|
+
make help # list all targets
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
See [`AGENTS.md`](AGENTS.md) for repo conventions and [`docs/RELEASING.md`](docs/RELEASING.md)
|
|
75
|
+
for the release process.
|
|
76
|
+
|
|
77
|
+
## License
|
|
78
|
+
|
|
79
|
+
[Apache License 2.0](LICENSE).
|