Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-node-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

- name: Publish node packages
run: |
node build.js ${{ github.event.release.tag_name }}
node publish.js ${{ github.event.release.tag_name }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

3 changes: 3 additions & 0 deletions .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ on:

permissions:
contents: write
pull-requests: write

env:
VERSION: ${{ github.event.inputs.version }}
GH_TOKEN: ${{ github.token }}

jobs:
deploy:
Expand Down Expand Up @@ -45,6 +47,7 @@ jobs:
run: |
git config --local user.email "${{ github.actor }}@users.noreply.github.com"
git config --local user.name "${{ github.actor }}"
git checkout -b release/$VERSION
Copy link

Copilot AI Mar 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The branch name 'release/$VERSION' may be problematic if VERSION contains characters not allowed in git branch names. Consider sanitizing or validating the VERSION variable before using it.

Copilot uses AI. Check for mistakes.
git add .
git commit -m "Update version to $VERSION"
git push origin release/$VERSION
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
Expand All @@ -38,7 +38,7 @@ jobs:
working-directory: ${{ github.workspace }}
run: |
python -m unittest discover -s tests -p 'test_*.py' -t ${{ github.workspace }}

- name: Run build test
working-directory: ${{ github.workspace }}
run: |
Expand Down
4 changes: 3 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ sphinx:

python:
install:
- requirements: docs/requirements.txt
- requirements: docs/requirements.txt
- method: pip
path: .
10 changes: 6 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"cSpell.words": [
"Renderable"
]
}
"cSpell.words": ["pydom", "Renderable"],
"python.analysis.diagnosticSeverityOverrides": {
"reportWildcardImportFromLibrary": "none"
},
"python.analysis.extraPaths": ["../pydom"]
}
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,20 @@ class Person(Component):
```
To call a function on the server include this script in your file
```html
<script src="https://cdn.jsdelivr.net/npm/@python-seamless/[email protected]/umd/seamless.init.js"></script>
<script src="https://cdn.jsdelivr.net/npm/python-seamless/umd/seamless.init.js"></script>
```
Import the middleware and mount it to your app
```python
from fastapi import FastAPI
from seamless.middlewares import ASGIMiddleware as SeamlessMiddleware
from seamless.middlewares import SocketIOMiddleware

app = FastAPI()
app.add_middleware(SeamlessMiddleware)
app.add_middleware(SocketIOMiddleware)
```
You can pass the following config to the middleware to change the socket path of all seamless endpoints.
```python
app.add_middleware(
SeamlessMiddleware,
SocketIOMiddleware,
socket_path="/my/custom/path"
)
```
Expand Down
4 changes: 4 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.lh/
build/*
.venv/
seamless/
21 changes: 0 additions & 21 deletions docs/3-events/1-middleware.rst

This file was deleted.

26 changes: 0 additions & 26 deletions docs/99-api-reference/1-components/1-base.rst

This file was deleted.

10 changes: 0 additions & 10 deletions docs/99-api-reference/1-components/index.rst

This file was deleted.

34 changes: 0 additions & 34 deletions docs/99-api-reference/1-components/page.rst

This file was deleted.

11 changes: 0 additions & 11 deletions docs/99-api-reference/1-components/router/index.rst

This file was deleted.

20 changes: 0 additions & 20 deletions docs/99-api-reference/1-components/router/route.rst

This file was deleted.

20 changes: 0 additions & 20 deletions docs/99-api-reference/1-components/router/router-link.rst

This file was deleted.

22 changes: 0 additions & 22 deletions docs/99-api-reference/1-components/router/router.rst

This file was deleted.

11 changes: 0 additions & 11 deletions docs/99-api-reference/2-state/index.rst

This file was deleted.

12 changes: 0 additions & 12 deletions docs/99-api-reference/3-core/index.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/99-api-reference/3-core/rendering.rst

This file was deleted.

25 changes: 0 additions & 25 deletions docs/99-api-reference/99-misc/index.rst

This file was deleted.

13 changes: 0 additions & 13 deletions docs/99-api-reference/index.rst

This file was deleted.

20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Loading