Skip to content

Commit db0f1aa

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

36 files changed

+581
-238
lines changed

.github/pull_request_template.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
## Issues
44

5-
<!-- Link the issues this change resolves, or describe them -->
5+
<!-- Describe or link the issues this change resolves -->
66

7-
## Summary
7+
## Solution
88

99
<!-- Describe how these changes resolve the aforementioned issues -->
1010

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
.jupyter
1212

1313
# --- Python ---
14+
.hatch
1415
.venv
1516
venv
1617
MANIFEST

.pre-commit-config.yaml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,32 @@ repos:
33
hooks:
44
- id: lint-py-fix
55
name: Fix Python Lint
6-
entry: hatch run lint-py --fix
7-
language: system
8-
pass_filenames: false
9-
- repo: local
10-
hooks:
11-
- id: lint-py-check
12-
name: Check Python Lint
136
entry: hatch run lint-py
147
language: system
8+
args: [--fix]
159
pass_filenames: false
10+
files: \.py$
1611
- repo: local
1712
hooks:
1813
- id: lint-js-fix
1914
name: Fix JS Lint
2015
entry: hatch run lint-js --fix
2116
language: system
2217
pass_filenames: false
18+
files: \.(js|jsx|ts|tsx)$
19+
- repo: local
20+
hooks:
21+
- id: lint-py-check
22+
name: Check Python Lint
23+
entry: hatch run lint-py
24+
language: system
25+
pass_filenames: false
26+
files: \.py$
2327
- repo: local
2428
hooks:
2529
- id: lint-js-check
2630
name: Check JS Lint
2731
entry: hatch run lint-py
2832
language: system
2933
pass_filenames: false
34+
files: \.(js|jsx|ts|tsx)$

docs/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tool.poetry]
2-
name = "docs"
2+
name = "docs_app"
33
version = "0.0.0"
44
description = "docs"
55
authors = ["rmorshea <[email protected]>"]

docs/source/_exts/reactpy_example.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import re
44
from pathlib import Path
5-
from typing import Any
5+
from typing import Any, ClassVar
66

77
from docs_app.examples import (
88
SOURCE_DIR,
@@ -21,7 +21,7 @@ class WidgetExample(SphinxDirective):
2121
required_arguments = 1
2222
_next_id = 0
2323

24-
option_spec = {
24+
option_spec: ClassVar[dict[str, Any]] = {
2525
"result-is-default-tab": directives.flag,
2626
"activate-button": directives.flag,
2727
}

docs/source/_exts/reactpy_view.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import os
2-
import sys
3-
4-
print(sys.path)
2+
from typing import Any, ClassVar
53

64
from docs_app.examples import get_normalized_example_name
75
from docutils.nodes import raw
@@ -20,7 +18,7 @@ class IteractiveWidget(SphinxDirective):
2018
required_arguments = 1
2119
_next_id = 0
2220

23-
option_spec = {
21+
option_spec: ClassVar[dict[str, Any]] = {
2422
"activate-button": directives.flag,
2523
"margin": float,
2624
}

docs/source/about/changelog.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,34 @@ more info, see the :ref:`Contributor Guide <Creating a Changelog Entry>`.
2323
Unreleased
2424
----------
2525

26+
**Fixed**
27+
28+
- :pull:`1118` - `module_from_template` is broken with a recent release of `requests`
29+
30+
31+
v1.0.2
32+
------
33+
34+
**Fixed**
35+
36+
- :issue:`1086` - fix rendering bug when children change positions (via :pull:`1085`)
37+
38+
39+
v1.0.1
40+
------
41+
2642
**Changed**
2743

2844
- :pull:`1050` - Warn and attempt to fix missing mime types, which can result in ``reactpy.run`` not working as expected.
45+
- :pull:`1051` - Rename ``reactpy.backend.BackendImplementation`` to ``reactpy.backend.BackendType``
46+
- :pull:`1051` - Allow ``reactpy.run`` to fail in more predictable ways
2947

3048
**Fixed**
3149

3250
- :issue:`930` - better traceback for JSON serialization errors (via :pull:`1008`)
3351
- :issue:`437` - explain that JS component attributes must be JSON (via :pull:`1008`)
52+
- :pull:`1051` - Fix ``reactpy.run`` port assignment sometimes attaching to in-use ports on Windows
53+
- :pull:`1051` - Fix ``reactpy.run`` not recognizing ``fastapi``
3454

3555

3656
v1.0.0

docs/source/about/contributor-guide.rst

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,26 @@ Then, you should be able to activate your development environment with:
118118
119119
hatch shell
120120
121+
From within the shell, to install the projects in this repository, you should then run:
122+
123+
.. code-block:: bash
124+
125+
invoke env
126+
127+
Project Structure
128+
-----------------
129+
130+
This repository is set up to be able to manage many applications and libraries written
131+
in a variety of languages. All projects can be found under the ``src`` directory:
132+
133+
- ``src/py/{project}`` - Python packages
134+
- ``src/js/app`` - ReactPy's built-in JS client
135+
- ``src/js/packages/{project}`` - JS packages
136+
137+
At the root of the repository is a ``pyproject.toml`` file that contains scripts and
138+
their respective dependencies for managing all other projects. Most of these global
139+
scripts can be run via ``hatch run ...`` however, for more complex scripting tasks, we
140+
rely on Invoke_. Scripts implements with Invoke can be found in ``tasks.py``.
121141

122142
Running The Tests
123143
-----------------
@@ -302,12 +322,14 @@ you should refer to their respective documentation in the links below:
302322
Jupyter
303323
- `reactpy-dash <https://github.com/reactive-python/reactpy-dash>`__ - ReactPy integration for Plotly
304324
Dash
305-
- `django-reactpy <https://github.com/reactive-python/django-reactpy>`__ - ReactPy integration for
325+
- `reactpy-django <https://github.com/reactive-python/reactpy-django>`__ - ReactPy integration for
306326
Django
307327

308328
.. Links
309329
.. =====
310330
331+
.. _Hatch: https://hatch.pypa.io/
332+
.. _Invoke: https://www.pyinvoke.org/
311333
.. _Google Chrome: https://www.google.com/chrome/
312334
.. _Docker: https://docs.docker.com/get-docker/
313335
.. _Git: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git

pyproject.toml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,14 @@ dependencies = [
1313
"invoke",
1414
# lint
1515
"black",
16-
"ruff",
16+
"ruff==0.0.278", # Ruff is moving really fast, so pinning for now.
1717
"toml",
1818
"flake8",
1919
"flake8-pyproject",
2020
"reactpy-flake8 >=0.7",
21+
# types
22+
"mypy",
23+
"types-toml",
2124
# publish
2225
"semver >=2, <3",
2326
"twine",
@@ -42,7 +45,15 @@ test-docs = "invoke test-docs"
4245
target-version = ["py39"]
4346
line-length = 88
4447

45-
# --- Flake8 ----------------------------------------------------------------------------
48+
# --- MyPy -----------------------------------------------------------------------------
49+
50+
[tool.mypy]
51+
ignore_missing_imports = true
52+
warn_unused_configs = true
53+
warn_redundant_casts = true
54+
warn_unused_ignores = true
55+
56+
# --- Flake8 ---------------------------------------------------------------------------
4657

4758
[tool.flake8]
4859
select = ["RPY"] # only need to check with reactpy-flake8

requirements.txt

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)