- Install
uv. - Use the same Python version as the currently used Pyodide runtime.
make initRun the shared spell checker from the repo root:
yarn cspellAdd project-specific terms to cspell.json when you need to silence false positives.
The following command starts the file watcher and the hot reloader that are recommended to keep active during the development of other packages depending on the kernel.
cd packages/kernel
yarn startcd packages/browser
yarn startLaunch the app sharing service.
cd packages/sharing
yarn startIn another shell, launch the editor service.
cd packages/sharing-editor
yarn startAt the root directory,
makeGo to the streamlit directory.
cd streamlitFetch the commits from the Streamlit repository.
For the first time, you need to add the upstream remote repository.
git remote add upstream https://github.com/streamlit/streamlit.gitThen, every time you want to update the Streamlit repository, fetch the commits from the upstream repository.
git fetch upstreamCreate a new branch for the new version based on the latest version branch.
NEW_STLITE_BRANCH=stlite-1.45.1
CURRENT_STLITE_BRANCH=stlite-1.44.1
git checkout -b $NEW_STLITE_BRANCH $CURRENT_STLITE_BRANCHRebase the new branch onto the latest Streamlit version tag.
NEW_BASE_STREAMLIT_VERSION_TAG=1.45.1
CURRENT_BASE_STREAMLIT_VERSION_TAG=1.44.1
git rebase --onto $NEW_BASE_STREAMLIT_VERSION_TAG $CURRENT_BASE_STREAMLIT_VERSION_TAG $NEW_STLITE_BRANCH- Clone or pull the latest
streamlit/docsrepository. - Run the following command to copy the sample apps to the
stlite/packages/sharing-editor/data/streamlit_docsdirectory.
sh ./packages/sharing-editor/bin/copy-samples.sh path/to/streamlit/docs
- (If needed) Modify the copied sample apps to be compatible with Stlite, and save the changes as patches.
Then update
diff /path/to/streamlit/docs/original_file packages/sharing-editor/public/samples/modified_file > packages/sharing-editor/bin/sample-diffs/modified_filecopy-samples.shto apply the patches to the copied sample apps.
You can select the next version in an interactive shell with the following command. Then it will automatically create a new commit, tag it, and push the commit to the remote repository which triggers the release process on GitHub Actions.
yarn new-version--force-publish is useful if you need to create a new version without changes to the code.
yarn new-version --force-publishUse WSL. You'll need to install the following to initialize your development environment. Afterwards, follow the normal build steps.
curl -LsSf https://astral.sh/uv/install.sh | sh
sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install nodejs
sudo apt-get install protobuf-compiler