Skip to content

Commit

Permalink
self review
Browse files Browse the repository at this point in the history
  • Loading branch information
Archmonger committed Jan 31, 2025
1 parent 71520cd commit 122c00b
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 11 deletions.
4 changes: 2 additions & 2 deletions docs/source/about/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ Unreleased
**Added**
- :pull:`1113` - Added ``reactpy.ReactPy`` that can be used to run ReactPy in standalone mode.
- :pull:`1113` - Added ``reactpy.ReactPyMiddleware`` that can be used to run ReactPy with any ASGI compatible framework.
- :pull:`1113` - Added ``reactpy.ReactPyMiddleware`` that can be used to run ReactPy with any ASGI compatible framework.
- :pull:`1113` - Added ``uvicorn`` and ``jinja`` installation extras (for example ``pip install reactpy[uvicorn,jinja]``).
- :pull:`1113` - Added ``reactpy.jinja.Component`` that can be used alongside ``ReactPyMiddleware`` to embed several ReactPy components into your existing application.
- :pull:`1113` - Added ``standard``, ``uvicorn``, ``jinja`` installation extras (for example ``pip install reactpy[standard]``).
- :pull:`1113` - Added support for Python 3.12 and 3.13.

**Changed**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ loaded with :func:`~reactpy.web.module.export`.
.. note::

When :data:`reactpy.config.REACTPY_DEBUG_MODE` is active, named exports will be validated.
When :data:`reactpy.config.REACTPY_DEBUG` is active, named exports will be validated.

The remaining files that we need to create are concerned with creating a Python package.
We won't cover all the details here, so refer to the Setuptools_ documentation for
Expand Down
8 changes: 4 additions & 4 deletions docs/source/guides/getting-started/running-reactpy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,29 +103,29 @@ Running ReactPy in Debug Mode
-----------------------------

ReactPy provides a debug mode that is turned off by default. This can be enabled when you
run your application by setting the ``REACTPY_DEBUG_MODE`` environment variable.
run your application by setting the ``REACTPY_DEBUG`` environment variable.

.. tab-set::

.. tab-item:: Unix Shell

.. code-block::
export REACTPY_DEBUG_MODE=1
export REACTPY_DEBUG=1
python my_reactpy_app.py
.. tab-item:: Command Prompt

.. code-block:: text
set REACTPY_DEBUG_MODE=1
set REACTPY_DEBUG=1
python my_reactpy_app.py
.. tab-item:: PowerShell

.. code-block:: powershell
$env:REACTPY_DEBUG_MODE = "1"
$env:REACTPY_DEBUG = "1"
python my_reactpy_app.py
.. danger::
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ artifacts = []

[project.optional-dependencies]
all = ["reactpy[jinja,uvicorn,testing]"]
standard = ["reactpy[jinja,uvicorn]"]
jinja = ["jinja2-simple-tags", "jinja2 >=3"]
uvicorn = ["uvicorn[standard]"]
testing = ["playwright"]
Expand Down
2 changes: 2 additions & 0 deletions src/js/packages/@reactpy/client/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ export * from "./mount";
export * from "./types";
export * from "./vdom";
export * from "./websocket";
export { default as React } from "preact/compat";
export { default as ReactDOM } from "preact/compat";
2 changes: 1 addition & 1 deletion src/reactpy/jinja.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from reactpy.utils import render_mount_template


class ReactPyTemplateTag(StandaloneTag): # type: ignore
class Component(StandaloneTag): # type: ignore
"""This allows enables a `component` tag to be used in any Jinja2 rendering context,
as long as this template tag is registered as a Jinja2 extension."""

Expand Down
5 changes: 2 additions & 3 deletions tests/test_asgi/test_middleware.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# ruff: noqa: S701
import asyncio
import os
from pathlib import Path

import pytest
Expand All @@ -20,7 +19,7 @@ async def display(page):
templates = Jinja2Templates(
env=JinjaEnvironment(
loader=JinjaFileSystemLoader("tests/templates"),
extensions=["reactpy.jinja.ReactPyTemplateTag"],
extensions=["reactpy.jinja.Component"],
)
)

Expand Down Expand Up @@ -60,7 +59,7 @@ async def test_unregistered_root_component():
templates = Jinja2Templates(
env=JinjaEnvironment(
loader=JinjaFileSystemLoader("tests/templates"),
extensions=["reactpy.jinja.ReactPyTemplateTag"],
extensions=["reactpy.jinja.Component"],
)
)

Expand Down

0 comments on commit 122c00b

Please sign in to comment.