Skip to content

Commit

Permalink
Merge branch 'main' into event-target-checked-does-not-exist-for-chec…
Browse files Browse the repository at this point in the history
…kbox-inputs
  • Loading branch information
Archmonger authored Apr 25, 2024
2 parents db0f1aa + f6f13f0 commit 9983d95
Show file tree
Hide file tree
Showing 46 changed files with 970 additions and 776 deletions.
18 changes: 9 additions & 9 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<sub>By submitting this pull request you agree that all contributions to this project are made under the MIT license.</sub>
## Description

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

<!-- Describe or link the issues this change resolves -->

## Solution
## Checklist

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

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

- [ ] Tests have been included for all bug fixes or added functionality.
- [ ] The `changelog.rst` has been updated with any significant changes.
<sub>By submitting this pull request I agree that all contributions comply with this project's open source license(s).</sub>
108 changes: 54 additions & 54 deletions .github/workflows/.hatch-run.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,59 @@
name: hatch-run

on:
workflow_call:
inputs:
job-name:
required: true
type: string
hatch-run:
required: true
type: string
runs-on-array:
required: false
type: string
default: '["ubuntu-latest"]'
python-version-array:
required: false
type: string
default: '["3.x"]'
node-registry-url:
required: false
type: string
default: ""
secrets:
node-auth-token:
required: false
pypi-username:
required: false
pypi-password:
required: false
workflow_call:
inputs:
job-name:
required: true
type: string
hatch-run:
required: true
type: string
runs-on-array:
required: false
type: string
default: '["ubuntu-latest"]'
python-version-array:
required: false
type: string
default: '["3.x"]'
node-registry-url:
required: false
type: string
default: ""
secrets:
node-auth-token:
required: false
pypi-username:
required: false
pypi-password:
required: false

jobs:
hatch:
name: ${{ format(inputs.job-name, matrix.python-version, matrix.runs-on) }}
strategy:
matrix:
python-version: ${{ fromJson(inputs.python-version-array) }}
runs-on: ${{ fromJson(inputs.runs-on-array) }}
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "14.x"
registry-url: ${{ inputs.node-registry-url }}
- name: Pin NPM Version
run: npm install -g [email protected]
- name: Use Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Python Dependencies
run: pip install hatch poetry
- name: Run Scripts
env:
NODE_AUTH_TOKEN: ${{ secrets.node-auth-token }}
PYPI_USERNAME: ${{ secrets.pypi-username }}
PYPI_PASSWORD: ${{ secrets.pypi-password }}
run: hatch run ${{ inputs.hatch-run }}
hatch:
name: ${{ format(inputs.job-name, matrix.python-version, matrix.runs-on) }}
strategy:
matrix:
python-version: ${{ fromJson(inputs.python-version-array) }}
runs-on: ${{ fromJson(inputs.runs-on-array) }}
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "14.x"
registry-url: ${{ inputs.node-registry-url }}
- name: Pin NPM Version
run: npm install -g [email protected]
- name: Use Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Python Dependencies
run: pip install hatch poetry
- name: Run Scripts
env:
NODE_AUTH_TOKEN: ${{ secrets.node-auth-token }}
PYPI_USERNAME: ${{ secrets.pypi-username }}
PYPI_PASSWORD: ${{ secrets.pypi-password }}
run: hatch run ${{ inputs.hatch-run }}
83 changes: 43 additions & 40 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,48 @@
name: check

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

jobs:
test-py-cov:
uses: ./.github/workflows/.hatch-run.yml
with:
job-name: "python-{0}"
hatch-run: "test-py"
lint-py:
uses: ./.github/workflows/.hatch-run.yml
with:
job-name: "python-{0}"
hatch-run: "lint-py"
test-py-matrix:
uses: ./.github/workflows/.hatch-run.yml
with:
job-name: "python-{0} {1}"
hatch-run: "test-py --no-cov"
runs-on-array: '["ubuntu-latest", "macos-latest", "windows-latest"]'
python-version-array: '["3.9", "3.10", "3.11"]'
test-docs:
uses: ./.github/workflows/.hatch-run.yml
with:
job-name: "python-{0}"
hatch-run: "test-docs"
test-js:
uses: ./.github/workflows/.hatch-run.yml
with:
job-name: "{1}"
hatch-run: "test-js"
lint-js:
uses: ./.github/workflows/.hatch-run.yml
with:
job-name: "{1}"
hatch-run: "lint-js"
test-py-cov:
uses: ./.github/workflows/.hatch-run.yml
with:
job-name: "python-{0}"
hatch-run: "test-py"
lint-py:
uses: ./.github/workflows/.hatch-run.yml
with:
job-name: "python-{0}"
hatch-run: "lint-py"
test-py-matrix:
uses: ./.github/workflows/.hatch-run.yml
with:
job-name: "python-{0} {1}"
hatch-run: "test-py --no-cov"
runs-on-array: '["ubuntu-latest", "macos-latest", "windows-latest"]'
python-version-array: '["3.9", "3.10", "3.11"]'
test-docs:
uses: ./.github/workflows/.hatch-run.yml
with:
job-name: "python-{0}"
hatch-run: "test-docs"
# as of Dec 2023 lxml does have wheels for 3.12
# https://bugs.launchpad.net/lxml/+bug/2040440
python-version-array: '["3.11"]'
test-js:
uses: ./.github/workflows/.hatch-run.yml
with:
job-name: "{1}"
hatch-run: "test-js"
lint-js:
uses: ./.github/workflows/.hatch-run.yml
with:
job-name: "{1}"
hatch-run: "lint-js"
12 changes: 12 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"recommendations": [
"wholroyd.jinja",
"esbenp.prettier-vscode",
"ms-python.vscode-pylance",
"ms-python.python",
"charliermarsh.ruff",
"dbaeumer.vscode-eslint",
"ms-python.black-formatter",
"ms-python.mypy-type-checker"
]
}
10 changes: 6 additions & 4 deletions docs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
FROM python:3.9

WORKDIR /app/

RUN apt-get update

# Install NodeJS
# --------------
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
RUN apt-get install -y build-essential nodejs npm
RUN npm install -g [email protected]
RUN curl -SLO https://deb.nodesource.com/nsolid_setup_deb.sh
RUN chmod 500 nsolid_setup_deb.sh
RUN ./nsolid_setup_deb.sh 20
RUN apt-get install nodejs -y

# Install Poetry
# --------------
Expand Down
38 changes: 29 additions & 9 deletions docs/source/about/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,10 @@ Changelog

.. note::

The ReactPy team manages their short and long term plans with `GitHub Projects
<https://github.com/orgs/reactive-python/projects/1>`__. If you have questions about what
the team are working on, or have feedback on how issues should be prioritized, feel
free to :discussion-type:`open up a discussion <question>`.

All notable changes to this project will be recorded in this document. The style of
which is based on `Keep a Changelog <https://keepachangelog.com/>`__. The versioning
scheme for the project adheres to `Semantic Versioning <https://semver.org/>`__. For
more info, see the :ref:`Contributor Guide <Creating a Changelog Entry>`.
All notable changes to this project will be recorded in this document. The style of
which is based on `Keep a Changelog <https://keepachangelog.com/>`__. The versioning
scheme for the project adheres to `Semantic Versioning <https://semver.org/>`__. For
more info, see the :ref:`Contributor Guide <Creating a Changelog Entry>`.


.. INSTRUCTIONS FOR CHANGELOG CONTRIBUTORS
Expand All @@ -26,6 +21,31 @@ Unreleased
**Fixed**

- :pull:`1118` - `module_from_template` is broken with a recent release of `requests`
- :pull:`1131` - `module_from_template` did not work when using Flask backend
- :pull:`1200` - Fixed `UnicodeDecodeError` when using `reactpy.web.export`

**Added**

- :pull:`1165` - Allow concurrently rendering discrete component trees - enable this
experimental feature by setting `REACTPY_ASYNC_RENDERING=true`. This improves
the overall responsiveness of your app in situations where larger renders would
otherwise block smaller renders from executing.

**Changed**

- :pull:`1171` - Previously ``None``, when present in an HTML element, would render as
the string ``"None"``. Now ``None`` will not render at all. This is consistent with
how ``None`` is handled when returned from components. It also makes it easier to
conditionally render elements. For example, previously you would have needed to use a
fragment to conditionally render an element by writing
``something if condition else html._()``. Now you can simply write
``something if condition else None``.

**Deprecated**

- :pull:`1171` - The ``Stop`` exception. Recent releases of ``anyio`` have made this
exception difficult to use since it now raises an ``ExceptionGroup``. This exception
was primarily used for internal testing purposes and so is now deprecated.


v1.0.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ def handle_click(event):
"style": {
"height": "30px",
"width": "30px",
"background_color": "black"
if index in selected_indices
else "white",
"background_color": (
"black" if index in selected_indices else "white"
),
"outline": "1px solid grey",
"cursor": "pointer",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ def handle_click(event):
"style": {
"height": "30px",
"width": "30px",
"background_color": "black"
if index in selected_indices
else "white",
"background_color": (
"black" if index in selected_indices else "white"
),
"outline": "1px solid grey",
"cursor": "pointer",
},
Expand Down
Loading

0 comments on commit 9983d95

Please sign in to comment.