Skip to content
Merged
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
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
name: Test
name: Check

on:
push:
branches:
- main
pull_request:
branches:
- main
- "*"
schedule:
- cron: "0 0 * * *"
- cron: "0 0 * * 0"

jobs:
python-source:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
Expand Down Expand Up @@ -95,3 +95,38 @@ jobs:
run: pip install --upgrade pip hatch uv
- name: Run Python type checker
run: hatch run python:type_check

javascript:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install Python Dependencies
run: pip install --upgrade pip hatch uv
- name: Run Tests
run: hatch run javascript:check
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install Python Dependencies
run: pip install --upgrade pip hatch uv
- name: Check documentation links
run: hatch run docs:linkcheck
- name: Check docs build
run: hatch run docs:build
- name: Check docs examples
run: hatch fmt docs --check
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Publish Develop Docs
name: Publish Develop
on:
push:
branches:
- main
jobs:
publish-develop-docs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
29 changes: 0 additions & 29 deletions .github/workflows/publish-latest-docs.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/publish-python.yaml

This file was deleted.

49 changes: 49 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Publish Release
on:
release:
types: [published]

jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install dependencies
run: pip install --upgrade pip hatch uv
- name: Configure Git
run: |
git config user.name github-actions
git config user.email github-actions@github.com
- name: Publish ${{ github.event.release.name }} Docs
run: hatch run docs:deploy_latest ${{ github.ref_name }}
concurrency:
group: publish-docs

python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install dependencies
run: pip install --upgrade pip hatch uv
- name: Build Package
run: hatch build --clean
- name: Publish to PyPI
env:
HATCH_INDEX_USER: ${{ secrets.PYPI_USERNAME }}
HATCH_INDEX_AUTH: ${{ secrets.PYPI_PASSWORD }}
run: hatch publish --yes
33 changes: 0 additions & 33 deletions .github/workflows/test-docs.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/test-javascript.yml

This file was deleted.

4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ Don't forget to remove deprecated code on each major release!

## [Unreleased]

- Nothing (yet)!
### Changed

- Bump required ReactPy version to `2.x`

## [2.0.0] - 2025-06-14

Expand Down
4 changes: 2 additions & 2 deletions docs/examples/python/nested_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ def all_messages():

messages = []
for msg in last_messages.values():
_link = link(
msg_link = link(
{"to": f"/messages/with/{'-'.join(msg['with'])}"},
f"Conversation with: {', '.join(msg['with'])}",
)
msg_from = f"{'' if msg['from'] is None else '🔴'} {msg['message']}"
messages.append(html.li({"key": msg["id"]}, html.p(_link), msg_from))
messages.append(html.li({"key": msg["id"]}, html.p(msg_link), msg_from))

return html.div(
html.h1("All Messages 💬"),
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/python/use_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@component
def user():
params = use_params()
return html._(html.h1(f"User {params['id']} 👤"), html.p("Nothing (yet)."))
return html(html.h1(f"User {params['id']} 👤"), html.p("Nothing (yet)."))


@component
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/python/use_search_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@component
def search():
search_params = use_search_params()
return html._(html.h1(f"Search Results for {search_params['query'][0]} 🔍"), html.p("Nothing (yet)."))
return html(html.h1(f"Search Results for {search_params['query'][0]} 🔍"), html.p("Nothing (yet)."))


@component
Expand Down
2 changes: 1 addition & 1 deletion docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ plugins:
handlers:
python:
paths: ["../"]
import:
inventories:
- https://reactpy.dev/docs/objects.inv
- https://installer.readthedocs.io/en/stable/objects.inv
options:
Expand Down
2 changes: 1 addition & 1 deletion docs/src/learn/routers-routes-and-links.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The [`browser_router`][reactpy_router.browser_router] component is one possible
!!! abstract "Note"

The current location is determined based on the browser's current URL and can be found
by checking the [`use_location`][reactpy.backend.hooks.use_location] hook.
by checking the `reactpy.use_location` hook.

Here's a basic example showing how to use `#!python browser_router` with two routes.

Expand Down
Loading