Skip to content

Commit

Permalink
Replace @stlite/stlite-kernel usage wiht @stlite/kernel
Browse files Browse the repository at this point in the history
  • Loading branch information
whitphx committed Oct 1, 2022
1 parent d1b9323 commit bd11c4d
Show file tree
Hide file tree
Showing 18 changed files with 32 additions and 34 deletions.
30 changes: 15 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ mountable := packages/mountable/build/*
sharing := packages/sharing/build/*
sharing-common := packages/sharing-common/dist/*
sharing-editor := packages/sharing-editor/build/*
stlite_kernel := packages/stlite-kernel/dist/*
pyarrow_wheel := packages/stlite-kernel/py/stlite-pyarrow/dist/stlite_pyarrow-0.1.0-py3-none-any.whl
tornado_wheel := packages/stlite-kernel/py/tornado/dist/tornado-6.2-py3-none-any.whl
kernel := packages/kernel/dist/*
pyarrow_wheel := packages/kernel/py/stlite-pyarrow/dist/stlite_pyarrow-0.1.0-py3-none-any.whl
tornado_wheel := packages/kernel/py/tornado/dist/tornado-6.2-py3-none-any.whl
streamlit_proto := streamlit/frontend/src/autogen
streamlit_wheel := packages/stlite-kernel/py/streamlit/lib/dist/streamlit-1.12.0-py2.py3-none-any.whl
streamlit_wheel := packages/kernel/py/streamlit/lib/dist/streamlit-1.12.0-py2.py3-none-any.whl

.PHONY: all
all: init mountable playground sharing sharing-editor
Expand Down Expand Up @@ -45,14 +45,14 @@ $(GIT_SUBMODULES): %/.git: .gitmodules

.PHONY: mountable
mountable: $(mountable)
$(mountable): packages/mountable/src/*.ts packages/mountable/src/*.tsx $(stlite_kernel) $(streamlit_wheel)
$(mountable): packages/mountable/src/*.ts packages/mountable/src/*.tsx $(kernel) $(streamlit_wheel)
cd packages/mountable; \
yarn build
@touch $@

.PHONY: sharing
sharing: $(sharing)
$(sharing): packages/sharing/src/*.ts packages/sharing/src/*.tsx $(stlite_kernel) $(streamlit_wheel) $(sharing-common) yarn_install
$(sharing): packages/sharing/src/*.ts packages/sharing/src/*.tsx $(kernel) $(streamlit_wheel) $(sharing-common) yarn_install
cd packages/sharing; \
yarn build
@touch $@
Expand All @@ -71,26 +71,26 @@ $(sharing-editor): packages/sharing-editor/src/*.ts packages/sharing-editor/src/

.PHONY: playground
playground: $(playground)
$(playground): packages/playground/src/*.ts packages/playground/src/*.tsx packages/playground/public/* $(stlite_kernel) $(streamlit_wheel)
$(playground): packages/playground/src/*.ts packages/playground/src/*.tsx packages/playground/public/* $(kernel) $(streamlit_wheel)
cd packages/playground; \
yarn build
@touch $@

.PHONY: stlite-kernel
stlite-kernel: $(stlite_kernel)
$(stlite_kernel): packages/stlite-kernel/src/*.ts $(pyarrow_wheel) $(tornado_wheel) $(streamlit_wheel) $(streamlit_proto)
cd packages/stlite-kernel; \
.PHONY: kernel
kernel: $(kernel)
$(kernel): packages/kernel/src/*.ts $(pyarrow_wheel) $(tornado_wheel) $(streamlit_wheel) $(streamlit_proto)
cd packages/kernel; \
yarn build
@touch $@

$(pyarrow_wheel): $(VENV) packages/stlite-kernel/py/stlite-pyarrow/pyarrow/*.py
$(pyarrow_wheel): $(VENV) packages/kernel/py/stlite-pyarrow/pyarrow/*.py
. $(VENV)/bin/activate && \
cd packages/stlite-kernel/py/stlite-pyarrow && \
cd packages/kernel/py/stlite-pyarrow && \
poetry build

$(tornado_wheel): $(VENV) packages/stlite-kernel/py/tornado/tornado/*.py
$(tornado_wheel): $(VENV) packages/kernel/py/tornado/tornado/*.py
. $(VENV)/bin/activate && \
cd packages/stlite-kernel/py/tornado && \
cd packages/kernel/py/tornado && \
TORNADO_EXTENSION=0 python -m build --wheel
@touch $@

Expand Down
4 changes: 1 addition & 3 deletions packages/desktop/bin/dump_snapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,7 @@ yargs(hideBin(process.argv))
})
.parseAsync()
.then(async (args) => {
const stliteKernelDir = path.dirname(
require.resolve("@stlite/stlite-kernel")
); // -> /path/to/stlite-kernel/dist
const stliteKernelDir = path.dirname(require.resolve("@stlite/kernel")); // -> /path/to/stlite-kernel/dist
const stliteKernelPyDir = path.resolve(stliteKernelDir, "../py"); // -> /path/to/stlite-kernel/py
await createSitePackagesSnapshot({
localWheelPaths: {
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
},
"devDependencies": {
"@craco/craco": "^6.1.2",
"@stlite/stlite-kernel": "^0.8.0",
"@stlite/kernel": "^0.8.0",
"@testing-library/react": "^11.2.7",
"@testing-library/user-event": "^13.1.9",
"@types/jest": "^26.0.19",
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState, useEffect } from "react";
import { StliteKernel, StliteKernelOptions } from "@stlite/stlite-kernel";
import { StliteKernel, StliteKernelOptions } from "@stlite/kernel";
import StreamlitApp from "./StreamlitApp";

let pyodideEntrypointUrl: string | undefined;
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop/src/StreamlitApp.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";

import { StliteKernel, StliteKernelProvider } from "@stlite/stlite-kernel";
import { StliteKernel, StliteKernelProvider } from "@stlite/kernel";

import ThemedApp from "streamlit-browser/src/ThemedApp";
import { Client as Styletron } from "styletron-engine-atomic";
Expand Down
2 changes: 1 addition & 1 deletion packages/kernel/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@stlite/stlite-kernel",
"name": "@stlite/kernel",
"description": "",
"version": "0.8.0",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/mountable/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"devDependencies": {
"@babel/core": "7.12.3",
"@pmmmwh/react-refresh-webpack-plugin": "0.4.3",
"@stlite/stlite-kernel": "^0.8.0",
"@stlite/kernel": "^0.8.0",
"@svgr/webpack": "5.5.0",
"@testing-library/react": "^11.2.7",
"@testing-library/user-event": "^13.1.9",
Expand Down
2 changes: 1 addition & 1 deletion packages/mountable/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";

import { StliteKernel, StliteKernelProvider } from "@stlite/stlite-kernel";
import { StliteKernel, StliteKernelProvider } from "@stlite/kernel";

import ThemedApp from "streamlit-browser/src/ThemedApp";
import { Client as Styletron } from "styletron-engine-atomic";
Expand Down
2 changes: 1 addition & 1 deletion packages/mountable/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import ReactDOM from "react-dom";
import App from "./App";
import { StliteKernel } from "@stlite/stlite-kernel";
import { StliteKernel } from "@stlite/kernel";
import { getParentUrl } from "./url";
import { canonicalizeMountOptions, MountOptions } from "./options";

Expand Down
2 changes: 1 addition & 1 deletion packages/mountable/src/options.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { StliteKernelOptions } from "@stlite/stlite-kernel";
import { StliteKernelOptions } from "@stlite/kernel";

type SimplifiedFiles = Record<string, string | ArrayBufferView>;
export interface SimplifiedStliteKernelOptions {
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dependencies": {
"@craco/craco": "^6.1.2",
"@monaco-editor/react": "^4.4.5",
"@stlite/stlite-kernel": "^0.8.0",
"@stlite/kernel": "^0.8.0",
"@testing-library/react": "^11.2.7",
"@testing-library/user-event": "^13.1.9",
"@types/jest": "^26.0.19",
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
StliteKernel,
StliteKernelOptions,
StliteKernelProvider,
} from "@stlite/stlite-kernel";
} from "@stlite/kernel";

import { Id as ToastId, Slide, toast } from "react-toastify";

Expand Down
2 changes: 1 addition & 1 deletion packages/sharing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dependencies": {
"@craco/craco": "^6.1.2",
"@stlite/sharing-common": "^0.8.0",
"@stlite/stlite-kernel": "^0.8.0",
"@stlite/kernel": "^0.8.0",
"@testing-library/react": "^11.2.7",
"@testing-library/user-event": "^13.1.9",
"@types/jest": "^26.0.19",
Expand Down
2 changes: 1 addition & 1 deletion packages/sharing/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState, useEffect } from "react";
import { StliteKernel, StliteKernelOptions } from "@stlite/stlite-kernel";
import { StliteKernel, StliteKernelOptions } from "@stlite/kernel";
import {
AppData,
extractAppDataFromUrl,
Expand Down
2 changes: 1 addition & 1 deletion packages/sharing/src/StreamlitApp.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";

import { StliteKernel, StliteKernelProvider } from "@stlite/stlite-kernel";
import { StliteKernel, StliteKernelProvider } from "@stlite/kernel";

import ThemedApp from "streamlit-browser/src/ThemedApp";
import { Client as Styletron } from "styletron-engine-atomic";
Expand Down
2 changes: 1 addition & 1 deletion packages/toy-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.8.0",
"private": true,
"dependencies": {
"@stlite/stlite-kernel": "^0.8.0",
"@stlite/kernel": "^0.8.0",
"@testing-library/react": "^11.2.7",
"@testing-library/user-event": "^13.1.9",
"@types/jest": "^26.0.19",
Expand Down
2 changes: 1 addition & 1 deletion packages/toy-app/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
StliteKernel,
ConnectionManager,
ConnectionState,
} from "@stlite/stlite-kernel";
} from "@stlite/kernel";
import { BackMsg } from "streamlit-browser/src/autogen/proto";

function App() {
Expand Down

0 comments on commit bd11c4d

Please sign in to comment.