Skip to content

Commit 9983d95

Browse files
authored
Merge branch 'main' into event-target-checked-does-not-exist-for-checkbox-inputs
2 parents db0f1aa + f6f13f0 commit 9983d95

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+970
-776
lines changed

.github/pull_request_template.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
<sub>By submitting this pull request you agree that all contributions to this project are made under the MIT license.</sub>
1+
## Description
22

3-
## Issues
3+
<!-- A summary of the changes. -->
44

5-
<!-- Describe or link the issues this change resolves -->
6-
7-
## Solution
5+
## Checklist
86

9-
<!-- Describe how these changes resolve the aforementioned issues -->
7+
Please update this checklist as you complete each item:
108

11-
## Checklist
9+
- [ ] Tests have been developed for bug fixes or new functionality.
10+
- [ ] The changelog has been updated, if necessary.
11+
- [ ] Documentation has been updated, if necessary.
12+
- [ ] GitHub Issues closed by this PR have been linked.
1213

13-
- [ ] Tests have been included for all bug fixes or added functionality.
14-
- [ ] The `changelog.rst` has been updated with any significant changes.
14+
<sub>By submitting this pull request I agree that all contributions comply with this project's open source license(s).</sub>

.github/workflows/.hatch-run.yml

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,59 @@
11
name: hatch-run
22

33
on:
4-
workflow_call:
5-
inputs:
6-
job-name:
7-
required: true
8-
type: string
9-
hatch-run:
10-
required: true
11-
type: string
12-
runs-on-array:
13-
required: false
14-
type: string
15-
default: '["ubuntu-latest"]'
16-
python-version-array:
17-
required: false
18-
type: string
19-
default: '["3.x"]'
20-
node-registry-url:
21-
required: false
22-
type: string
23-
default: ""
24-
secrets:
25-
node-auth-token:
26-
required: false
27-
pypi-username:
28-
required: false
29-
pypi-password:
30-
required: false
4+
workflow_call:
5+
inputs:
6+
job-name:
7+
required: true
8+
type: string
9+
hatch-run:
10+
required: true
11+
type: string
12+
runs-on-array:
13+
required: false
14+
type: string
15+
default: '["ubuntu-latest"]'
16+
python-version-array:
17+
required: false
18+
type: string
19+
default: '["3.x"]'
20+
node-registry-url:
21+
required: false
22+
type: string
23+
default: ""
24+
secrets:
25+
node-auth-token:
26+
required: false
27+
pypi-username:
28+
required: false
29+
pypi-password:
30+
required: false
3131

3232
jobs:
33-
hatch:
34-
name: ${{ format(inputs.job-name, matrix.python-version, matrix.runs-on) }}
35-
strategy:
36-
matrix:
37-
python-version: ${{ fromJson(inputs.python-version-array) }}
38-
runs-on: ${{ fromJson(inputs.runs-on-array) }}
39-
runs-on: ${{ matrix.runs-on }}
40-
steps:
41-
- uses: actions/checkout@v2
42-
- uses: actions/setup-node@v2
43-
with:
44-
node-version: "14.x"
45-
registry-url: ${{ inputs.node-registry-url }}
46-
- name: Pin NPM Version
47-
run: npm install -g [email protected]
48-
- name: Use Python ${{ matrix.python-version }}
49-
uses: actions/setup-python@v2
50-
with:
51-
python-version: ${{ matrix.python-version }}
52-
- name: Install Python Dependencies
53-
run: pip install hatch poetry
54-
- name: Run Scripts
55-
env:
56-
NODE_AUTH_TOKEN: ${{ secrets.node-auth-token }}
57-
PYPI_USERNAME: ${{ secrets.pypi-username }}
58-
PYPI_PASSWORD: ${{ secrets.pypi-password }}
59-
run: hatch run ${{ inputs.hatch-run }}
33+
hatch:
34+
name: ${{ format(inputs.job-name, matrix.python-version, matrix.runs-on) }}
35+
strategy:
36+
matrix:
37+
python-version: ${{ fromJson(inputs.python-version-array) }}
38+
runs-on: ${{ fromJson(inputs.runs-on-array) }}
39+
runs-on: ${{ matrix.runs-on }}
40+
steps:
41+
- uses: actions/checkout@v2
42+
- uses: actions/setup-node@v2
43+
with:
44+
node-version: "14.x"
45+
registry-url: ${{ inputs.node-registry-url }}
46+
- name: Pin NPM Version
47+
run: npm install -g [email protected]
48+
- name: Use Python ${{ matrix.python-version }}
49+
uses: actions/setup-python@v2
50+
with:
51+
python-version: ${{ matrix.python-version }}
52+
- name: Install Python Dependencies
53+
run: pip install hatch poetry
54+
- name: Run Scripts
55+
env:
56+
NODE_AUTH_TOKEN: ${{ secrets.node-auth-token }}
57+
PYPI_USERNAME: ${{ secrets.pypi-username }}
58+
PYPI_PASSWORD: ${{ secrets.pypi-password }}
59+
run: hatch run ${{ inputs.hatch-run }}

.github/workflows/check.yml

Lines changed: 43 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,48 @@
11
name: check
22

33
on:
4-
push:
5-
branches:
6-
- main
7-
pull_request:
8-
branches:
9-
- main
10-
schedule:
11-
- cron: "0 0 * * 0"
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
schedule:
11+
- cron: "0 0 * * 0"
1212

1313
jobs:
14-
test-py-cov:
15-
uses: ./.github/workflows/.hatch-run.yml
16-
with:
17-
job-name: "python-{0}"
18-
hatch-run: "test-py"
19-
lint-py:
20-
uses: ./.github/workflows/.hatch-run.yml
21-
with:
22-
job-name: "python-{0}"
23-
hatch-run: "lint-py"
24-
test-py-matrix:
25-
uses: ./.github/workflows/.hatch-run.yml
26-
with:
27-
job-name: "python-{0} {1}"
28-
hatch-run: "test-py --no-cov"
29-
runs-on-array: '["ubuntu-latest", "macos-latest", "windows-latest"]'
30-
python-version-array: '["3.9", "3.10", "3.11"]'
31-
test-docs:
32-
uses: ./.github/workflows/.hatch-run.yml
33-
with:
34-
job-name: "python-{0}"
35-
hatch-run: "test-docs"
36-
test-js:
37-
uses: ./.github/workflows/.hatch-run.yml
38-
with:
39-
job-name: "{1}"
40-
hatch-run: "test-js"
41-
lint-js:
42-
uses: ./.github/workflows/.hatch-run.yml
43-
with:
44-
job-name: "{1}"
45-
hatch-run: "lint-js"
14+
test-py-cov:
15+
uses: ./.github/workflows/.hatch-run.yml
16+
with:
17+
job-name: "python-{0}"
18+
hatch-run: "test-py"
19+
lint-py:
20+
uses: ./.github/workflows/.hatch-run.yml
21+
with:
22+
job-name: "python-{0}"
23+
hatch-run: "lint-py"
24+
test-py-matrix:
25+
uses: ./.github/workflows/.hatch-run.yml
26+
with:
27+
job-name: "python-{0} {1}"
28+
hatch-run: "test-py --no-cov"
29+
runs-on-array: '["ubuntu-latest", "macos-latest", "windows-latest"]'
30+
python-version-array: '["3.9", "3.10", "3.11"]'
31+
test-docs:
32+
uses: ./.github/workflows/.hatch-run.yml
33+
with:
34+
job-name: "python-{0}"
35+
hatch-run: "test-docs"
36+
# as of Dec 2023 lxml does have wheels for 3.12
37+
# https://bugs.launchpad.net/lxml/+bug/2040440
38+
python-version-array: '["3.11"]'
39+
test-js:
40+
uses: ./.github/workflows/.hatch-run.yml
41+
with:
42+
job-name: "{1}"
43+
hatch-run: "test-js"
44+
lint-js:
45+
uses: ./.github/workflows/.hatch-run.yml
46+
with:
47+
job-name: "{1}"
48+
hatch-run: "lint-js"

.vscode/extensions.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"recommendations": [
3+
"wholroyd.jinja",
4+
"esbenp.prettier-vscode",
5+
"ms-python.vscode-pylance",
6+
"ms-python.python",
7+
"charliermarsh.ruff",
8+
"dbaeumer.vscode-eslint",
9+
"ms-python.black-formatter",
10+
"ms-python.mypy-type-checker"
11+
]
12+
}

docs/Dockerfile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
FROM python:3.9
2-
32
WORKDIR /app/
43

4+
RUN apt-get update
5+
56
# Install NodeJS
67
# --------------
7-
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
8-
RUN apt-get install -y build-essential nodejs npm
9-
RUN npm install -g [email protected]
8+
RUN curl -SLO https://deb.nodesource.com/nsolid_setup_deb.sh
9+
RUN chmod 500 nsolid_setup_deb.sh
10+
RUN ./nsolid_setup_deb.sh 20
11+
RUN apt-get install nodejs -y
1012

1113
# Install Poetry
1214
# --------------

docs/source/about/changelog.rst

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,10 @@ Changelog
33

44
.. note::
55

6-
The ReactPy team manages their short and long term plans with `GitHub Projects
7-
<https://github.com/orgs/reactive-python/projects/1>`__. If you have questions about what
8-
the team are working on, or have feedback on how issues should be prioritized, feel
9-
free to :discussion-type:`open up a discussion <question>`.
10-
11-
All notable changes to this project will be recorded in this document. The style of
12-
which is based on `Keep a Changelog <https://keepachangelog.com/>`__. The versioning
13-
scheme for the project adheres to `Semantic Versioning <https://semver.org/>`__. For
14-
more info, see the :ref:`Contributor Guide <Creating a Changelog Entry>`.
6+
All notable changes to this project will be recorded in this document. The style of
7+
which is based on `Keep a Changelog <https://keepachangelog.com/>`__. The versioning
8+
scheme for the project adheres to `Semantic Versioning <https://semver.org/>`__. For
9+
more info, see the :ref:`Contributor Guide <Creating a Changelog Entry>`.
1510

1611

1712
.. INSTRUCTIONS FOR CHANGELOG CONTRIBUTORS
@@ -26,6 +21,31 @@ Unreleased
2621
**Fixed**
2722

2823
- :pull:`1118` - `module_from_template` is broken with a recent release of `requests`
24+
- :pull:`1131` - `module_from_template` did not work when using Flask backend
25+
- :pull:`1200` - Fixed `UnicodeDecodeError` when using `reactpy.web.export`
26+
27+
**Added**
28+
29+
- :pull:`1165` - Allow concurrently rendering discrete component trees - enable this
30+
experimental feature by setting `REACTPY_ASYNC_RENDERING=true`. This improves
31+
the overall responsiveness of your app in situations where larger renders would
32+
otherwise block smaller renders from executing.
33+
34+
**Changed**
35+
36+
- :pull:`1171` - Previously ``None``, when present in an HTML element, would render as
37+
the string ``"None"``. Now ``None`` will not render at all. This is consistent with
38+
how ``None`` is handled when returned from components. It also makes it easier to
39+
conditionally render elements. For example, previously you would have needed to use a
40+
fragment to conditionally render an element by writing
41+
``something if condition else html._()``. Now you can simply write
42+
``something if condition else None``.
43+
44+
**Deprecated**
45+
46+
- :pull:`1171` - The ``Stop`` exception. Recent releases of ``anyio`` have made this
47+
exception difficult to use since it now raises an ``ExceptionGroup``. This exception
48+
was primarily used for internal testing purposes and so is now deprecated.
2949

3050

3151
v1.0.2

docs/source/guides/adding-interactivity/dangers-of-mutability/_examples/set_remove.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ def handle_click(event):
2424
"style": {
2525
"height": "30px",
2626
"width": "30px",
27-
"background_color": "black"
28-
if index in selected_indices
29-
else "white",
27+
"background_color": (
28+
"black" if index in selected_indices else "white"
29+
),
3030
"outline": "1px solid grey",
3131
"cursor": "pointer",
3232
},

docs/source/guides/adding-interactivity/dangers-of-mutability/_examples/set_update.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ def handle_click(event):
2121
"style": {
2222
"height": "30px",
2323
"width": "30px",
24-
"background_color": "black"
25-
if index in selected_indices
26-
else "white",
24+
"background_color": (
25+
"black" if index in selected_indices else "white"
26+
),
2727
"outline": "1px solid grey",
2828
"cursor": "pointer",
2929
},

0 commit comments

Comments
 (0)