Commit Graph

117 Commits

Author SHA1 Message Date
Khaleel Al-Adhami
8e579efe47
remove some benchmarks from CI (#4812) 2025-02-13 16:17:06 -08:00
Simon Young
289d10d30e
test actions in codeql (#4802) 2025-02-11 16:04:03 -08:00
Simon Young
e5e6c4e1d7
Create codeql.yml (#4799)
* Create codeql.yml

* add config

* fix that guy who's mad

---------

Co-authored-by: Khaleel Al-Adhami <khaleel.aladhami@gmail.com>
2025-02-11 15:49:06 -08:00
Thomas Brandého
d0199a326f
move benchmarks and add some more (#4758)
* move benchmarks and add some more

* change key and paths

* parametrize tests

* more specific ignore

* rename fixture

* remove previous file

* add tests for _compile_stateful_components
2025-02-05 13:19:45 -08:00
Khaleel Al-Adhami
6231f82248
add codspeed (#4707)
* add codspeed

* add codspeed to dev deps

* poetry.lock: relock deps, no update

* add poetry run

* only compile components

* at least have something

* fix hash

* dang it darglint

* uwu

* test sorting algorithms

* test sort

* sad

* revert that guy

* add test_evaluate

* it's ruff out there

* delete test_sort

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2025-01-31 11:39:19 -08:00
Khaleel Al-Adhami
9dba8cd494
use older version of python for windows simple benchmarks (#4680) 2025-01-23 15:29:31 +01:00
Khaleel Al-Adhami
3aaa26c82f
attempt to upgrade windows latest python version (#4679)
* attempt to upgrade windows latest python version

* remove that silly one
2025-01-22 17:56:41 -08:00
Khaleel Al-Adhami
1106aae76e
remove integration screenshots (#4677) 2025-01-22 15:18:35 -08:00
Masen Furer
109b272bc2
Bump frontend and backend deps (#4667)
* relock backend deps

* bump frontend library versions

* go back to react 18.3

* revert to react 18.3.1 (as it was before)

* reflex-web keep reflex from current revision, rather than main

* relock backend deps (again)

* don't check ag-grid version on main repo

* config_path is passed via `extra` to avoid pyright error when None

* bump next again

---------

Co-authored-by: Lendemor <thomas.brandeho@gmail.com>
2025-01-22 15:18:05 -08:00
Thomas Brandého
4c2b2ed1c6
removing deprecated features for 0.7.0 and removing py3.9 support (#4586)
* remove deprecated features and support for py3.9

* remove other deprecated stuff

* update lock file

* fix units tests

* relock poetry

* fix _replace for computed_var

* fix some merge typo

* fix typing of deploy args

* fix benchmarks.yml versions

* console.error instead of raising Exception

* fix tests

* ignore lambdas when resolving annotations

* simplify redirect logic in event.py

* more fixes

* fix unit tests again

* give back default annotations for lambdas

* fix signature check for on_submit

* remove useless stuff

* update pyi

* readd the getattr

* raise if log_level is wrong type

* silly goose, loglevel is a subclass of str

* i don't believe this code

* add guard

---------

Co-authored-by: Khaleel Al-Adhami <khaleel.aladhami@gmail.com>
2025-01-22 11:54:37 -08:00
Khaleel Al-Adhami
a923f657ac
retry failed tests (#4675)
* retry failed tests

* retry even more
2025-01-22 16:27:17 +01:00
Elijah Ahianyo
268effe62e
[ENG-4134]Allow specifying custom app module in rxconfig (#4556)
* Allow custom app module in rxconfig

* what was that pyscopg mess?

* fix another mess

* get this working with relative imports and hot reload

* typing to named tuple

* minor refactor

* revert redis knobs positions

* fix pyright except 1

* fix pyright hopefully

* use the resolved module path

* testing workflow

* move nba-proxy job to counter job

* just cast the type

* fix tests for python 3.9

* darglint

* CR Suggestions for #4556 (#4644)

* reload_dirs: search up from app_module for last directory containing __init__

* Change custom app_module to use an import string

* preserve sys.path entries added while loading rxconfig.py

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2025-01-20 10:12:54 -08:00
Masen Furer
427d7c56ab
Revert "[ENG-4005] Proxy backend requests on '/' to the frontend (#3300)" (#4614)
This reverts commit 438b31f270.
2025-01-09 16:30:49 -08:00
Masen Furer
5d877d54d0
Use older python versions for macos actions (#4601)
Use python versions that have a darwin/arm64 build for use with the newer
(faster) macos actions runners
2025-01-07 15:46:26 -08:00
Khaleel Al-Adhami
880975ae94
improve client state (#4597)
* improve client state

* no comma

* update python for unit tests

* overwrite it for windows

* bump other python versions
2025-01-07 14:41:03 -08:00
Masen Furer
08d9fbf9bc
unbreak link _hover (#4537)
* unbreak link _hover

* add a test to catch the error

* change tmp path for harness

* add () to fixture

* add spacer to avoid initial hover

* only install chromium browser for faster ci

---------

Co-authored-by: Lendemor <thomas.brandeho@gmail.com>
2025-01-07 10:35:36 -08:00
Masen Furer
438b31f270
[ENG-4005] Proxy backend requests on '/' to the frontend (#3300)
* Proxy backend requests on '/' to the frontend

If the optional extra `proxy` is installed, then the backend can handle all
requests by proxy unrecognized routes to the frontend nextjs server.

* Update lock file

* pre-commit fu

* AppHarness: set config frontend_port and backend_port

* integration: frontend port and backend port should return the same content

with proxying enabled by default in dev mode, both frontend and backend ports
on / should return the same content.

* Retry up to 100 times when proxying to frontend

* Reduce retry attempts to 25

Fix log level passing to subprocess

* scripts/wait_for_listening_port: primarily check HTTP responses

if the port is up or not, we don't really care... the HTTP request needs to
work and not return errors

* aiohttp is an optional dep

* adapt integration.sh for --backend-only (counter integration test)

* woops

* windows WTF?

* scratching my head 🎄

* double WTF windows

* Fix remaining integration tests
2025-01-03 15:50:38 -08:00
Thomas Brandého
a2ec1bc1d8
add codespell to pre-commit (#4559) 2024-12-20 17:04:39 -08:00
Masen Furer
053cbe7558
bump CI runners to macos-latest (#4526)
* use `macos-latest` runner

macos-12 is deprecated and the jobs don't start anymore, so see if we can run
fine on latest.

* unit_tests.yml: use python versions with arm64 builds
2024-12-12 04:17:28 -08:00
Thomas Brandého
5e026e4b27
Support python 3.13 (#4206)
* bump playwright and run tests with 3.13

* test with psycopg3

* typo

* update everything for psycopg 3.
2024-12-12 00:10:51 -08:00
Thomas Brandého
a68eef23aa
add issues templates (#4455)
* add issues templates

* fix typo
2024-12-10 15:37:58 +01:00
Masen Furer
a894f21ce5
[ENG-4149] require login to deploy named templates (#4450)
* integration_tests.yml: init masenf/rx_shout as a template

fix test

* [ENG-4149] require login to deploy template

* Send loginv2 telemetry event
2024-12-04 18:15:31 -08:00
benedikt-bartscher
dc347d10b3
fix: Failed to CreateArtifact (#4339) 2024-11-15 16:27:05 -08:00
Alek Petuskey
79a5409a8e
Update bug_report.md (#4382) 2024-11-13 20:42:29 -08:00
Khaleel Al-Adhami
6ea797d0cd
pin marked to correct version (#4313)
* pin marked to correct version

* remove it completely?

* missing quotations

* match against reflex
2024-11-06 11:28:08 -08:00
Thomas Brandého
54b081c104
allow custom bunfig.toml file (#4280)
* allow custom bunfig.toml file

* always copy custom bunfig

* split tests into half

* forgot a space

* use different syntax

* also split node latest check

* turn off failfast for app harness

---------

Co-authored-by: Khaleel Al-Adhami <khaleel.aladhami@gmail.com>
2024-11-06 09:31:13 -08:00
Simon Young
8d5187432f
add codeowners (#4312)
Co-authored-by: simon <simon@reflex.dev>
2024-11-06 09:30:43 -08:00
Thomas Brandého
e47cd25275
upgrade to nextJS v15 (#4243)
* upgrade to next 15

* relock poetry file

* test options

* skip windows on reflex-web

* bump min node version

* add turbo for dev command

* remove turbo flag
2024-10-26 02:27:44 +02:00
Thomas Brandého
cba6993247
test for stateless apps (#3816)
* test for stateless apps

* add playwright to dev dependencies

* fix docstring

* fix install of playwright in CI

* fix install again

* add allowed license

* add retry on running integrations step

* another attempt to fix licensing issue

* update timeout duration for retry

* fix timeout workflows

* remove dep changes

* remove outdated diff

* fix scope in new test and workflow for appharness

* run playwright tests last
2024-10-24 14:53:42 -07:00
Thomas Brandého
7168b42bab
versions bump before 0.6.4 (#4208) 2024-10-21 12:56:36 -07:00
Masen Furer
3a14025999
pin AppHarness tests to ubuntu-22.04 runner (#4173) 2024-10-14 15:36:30 -07:00
Thomas Brandého
60b6d4e7f2
only run macOS job on merge (#4139)
* update workflow

* skip more in unit tests

* try something else to prevent adding macos job to pool

* exclude too much

* fix units-text with macOS excluded

* also drop macOS job in integration tests

* readd macos job separately to only run on merge
2024-10-09 13:24:03 -07:00
Masen Furer
37508676cf
Revert Markdown-related frontend dep bumps (#4088)
* Revert markdown version bumps

* Ignore markdown related dependencies (these are pinned now)
2024-10-08 16:16:54 +02:00
Thomas Brandého
59dd54c049
add workflow to check dependencies on release branch (#4050)
* add workflow to check dependencies on release branch

* rename action to follow convention of other actions

* update workflow

* bump poetry version

* relock deps

* update check to ignore pyright and ruff

* oops, you saw nothing

* split dep check in two job

* fix frontend dep check

* fix stuff

* hmm yeah

* nope nope nope

* sigh

* bump js versions for some packages

* fix some warnings in tests

* fix tests

* try some options

* try to set asyncio policy

* debug dep check

* fix attempt for backend dep

* clean up output for backend check

* run bun outdated on reflex-web to catch most of the packages

* fix python version

* fix python version

* add missing env

* fix bun command

* fix workdir of frontend check

* update packages version

* up-pin plotly.js version

* add debug ouput

* clean frontend dep check output

* fix output

* fix async tests for redis

* relock poetry.lock

* Non-async functions do not need pytest_asyncio.fixture

* test_state: close StateManagerRedis connection in test to avoid warning

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2024-10-07 20:57:02 +02:00
Thomas Brandého
299f842756
add env var to enable using system node and bun (#4006)
* add env var to enable using system node and bun

* fix test to use env var
2024-09-26 16:12:12 -07:00
Thomas Brandého
3f538865b5
reorganize all tests in a single top folder (#3981)
* lift node version restraint to allow more recent version if already installed

* add node test for latest version

* change python version

* use purple for debug logs

* update workflow

* add playwright dev dependency

* update workflow

* change test

* oops

* improve test

* update test

* fix tests

* mv units tests to a subfolder

* reorganize tests

* fix install

* update test_state

* revert node changes and only keep new tests organization

* move integration tests in tests/integration

* fix integration workflow

* fix dockerfile workflow

* fix dockerfile workflow 2

* fix shared_state
2024-09-26 01:22:52 +02:00
Masen Furer
2883e541a9
Bring back py3.9 support with a deprecation warning. (#3976)
* Revert "ruff formatting to unbreak `main` CI (#3964)"

This reverts commit f9be184b86.

* Revert "bump python>=3.10 for 0.6.0 (#3956)"

This reverts commit fe1833c5e1.

* drop python3.8 support

* relock dependencies

* Raise warning when < py310 is used

* Move python version check to reflex version check function

Avoid spammy deprecation warnings by only emitting warning once per project,
per reflex version, per reinit.

* Remove other references to python3.8
2024-09-23 18:15:16 -07:00
Thomas Brandého
fe1833c5e1
bump python>=3.10 for 0.6.0 (#3956) 2024-09-20 09:52:29 -07:00
Alek Petuskey
b01c4b6c6a
Bump memory on relevant actions (#3781)
Co-authored-by: Alek Petuskey <alekpetuskey@Aleks-MacBook-Pro.local>
2024-08-13 15:49:43 -07:00
Alek Petuskey
0a8b8a89b4
Benchmarking Updates (#3680)
* Benchmark test

* Lighthouse posthog

---------

Co-authored-by: Alek Petuskey <alekpetuskey@Aleks-MacBook-Pro.local>
2024-07-17 17:15:13 -07:00
Masen Furer
d378e4a70c
benchmarks.yml: use node 18.x with reflex-web@main (#3657) 2024-07-11 10:43:09 -07:00
Thomas Brandého
0d39237b3c
upgrade to latest ruff (#3497)
* upgrade to latest ruff

* try to fix dep review

* try to fix dep review (2)

* upgrade black

* upgrade black (2)

* update allowed dependencies

* update allowed dependencies (2)

* update allowed dependencies (3)

* wait between interim and final in yield test

* remove previous commit, increase delay between yield

* forgot to save on the time.sleep(1) removal

* fix integration (maybe?)

* fix pyi?

* what even is going on

* what is realityi?

* test another fix for app harness

* try to wait even longer?

* force uvloop to be optional

* downpin fastapi < 0.111, remove changes to test
2024-06-19 12:32:13 +02:00
Elijah Ahianyo
34bf25071a
[REF-2821]Improve Dynamic Imports (#3345)
* Improve import times

* add lazy loading to rx.el

* add lazy loading to reflex core components

* minor refactor

* Get imports working with reflex web

* get imports to work with all reflex examples

* refactor to define imports only in the root.

* lint

* deadcode remove

* update poetry deps

* unit tests fix

* app_harness fix

* app_harness fix

* pyi file generate

* pyi file generate

* sort pyi order

* fix pyi

* fix docker ci

* rework pyi-generator

* generate pyi for __init__ files

* test pyright

* test pyright ci

* partial pyright fix

* more pyright fix

* pyright fix

* fix pyi_generator

* add rx.serializer and others

* add future annotation import which fixes container CI, then also load recharts lazily

* add new pyi files

* pyright fix

* minor fixes for reflex-web and flexdown

* forward references for py38

* ruff fix

* pyi fix

* unit tests fix

* reduce coverage to 68%

* reduce coverage to 67%

* reduce coverage to 66%as a workaround to coverage's rounding issue

* reduce coverage to 66%as a workaround to coverage's rounding issue

* exclude lazy_loader dependency review checks.

* its lazy-loader

* Add docstrings and regenerate pyi files

* add link

* address Pr comments

* CI fix

* partially address PR comments.

* edit docstrings and fix integration tests

* fix typo in docstring

* pyi fix
2024-05-31 16:43:10 +00:00
Elijah Ahianyo
4b939caa7f
[REF-2895]Benchmarks getting skipped on merge (#3369) 2024-05-29 09:28:41 -07:00
Eric Brown
30c8a07ba8
Adds dependency review action to verify allowed licensed dependencies (#3306)
This change will add a new action to scan the dependency's licenses
for any that may not be allowed for this project.

The pip-licenses command was run to get a dump of all the licenses
associated with this repo and put into the allow-licenses list.
Normally, you might only want to use deny-licenses list, but for
packages like Redis, there is no defined SPDX identifier for it.

Note: this list will require future maintenance as dependencies get
added that are not already in the allow list.

https://spdx.org/licenses/
https://github.com/raimon49/pip-licenses

Related to issue #2901

Signed-off-by: Eric Brown <eric_wade_brown@yahoo.com>
2024-05-15 11:55:18 -07:00
Eric Brown
bd3df68bef
Mirgrate from pip to uv (#3285)
In order to improve build time performance, this change switches
usage of pip to uv. The uv command is a pip alternative promising
much faster installs of Python packages.

For more information on uv, see:
https://github.com/astral-sh/uv

Closes: #2748

Signed-off-by: Eric Brown <eric_wade_brown@yahoo.com>
2024-05-15 11:56:16 +02:00
Elijah Ahianyo
89a83ecd42
[REF-2803] Add imports benchmarks (#3272) 2024-05-14 23:19:46 -07:00
Eric Brown
998d06518c
Automatically label bug report issues with bug tag (#3288)
This change automatically sets the label on an issue
to `bug` if opened using the bug report template.

Signed-off-by: Eric Brown <eric_wade_brown@yahoo.com>
2024-05-13 22:47:45 +02:00
Masen Furer
ea0f490030
[REF-2764] dep update 0.5.0 (#3245)
* upgrade to latest pip for in_docker_test_script.sh

* Bump gunicorn to 22.0.0 (security)

Changelog: https://docs.gunicorn.org/en/stable/news.html#id1

use utime to notify workers liveness
migrate setup to pyproject.toml
fix numerous security vulnerabilities in HTTP parser (closing some request smuggling vectors)
parsing additional requests is no longer attempted past unsupported request framing
on HTTP versions < 1.1 support for chunked transfer is refused (only used in exploits)
requests conflicting configured or passed SCRIPT_NAME now produce a verbose error
Trailer fields are no longer inspected for headers indicating secure scheme
support Python 3.12

** Breaking changes **
minimum version is Python 3.7
the limitations on valid characters in the HTTP method have been bounded to Internet Standards
requests specifying unsupported transfer coding (order) are refused by default (rare)
HTTP methods are no longer casefolded by default (IANA method registry contains none affected)
HTTP methods containing the number sign (#) are no longer accepted by default (rare)
HTTP versions < 1.0 or >= 2.0 are no longer accepted by default (rare, only HTTP/1.1 is supported)
HTTP versions consisting of multiple digits or containing a prefix/suffix are no longer accepted
HTTP header field names Gunicorn cannot safely map to variables are silently dropped, as in other software
HTTP headers with empty field name are refused by default (no legitimate use cases, used in exploits)
requests with both Transfer-Encoding and Content-Length are refused by default (such a message might indicate an attempt to perform request smuggling)
empty transfer codings are no longer permitted (reportedly seen with really old & broken proxies)

** SECURITY **
fix CVE-2024-1135

* Remove TYPE_CHECKING guard for pydantic v1 imports

Retain TYPE_CHECKING guard in v1 fallback to force pyright into pydantic.v1 namespace

* Run unit tests with pydantic v1 now that v2 is installed via poetry
2024-05-07 15:15:52 -07:00
Thomas Brandého
fd3375394b
pin macos version for CI (#3145)
* fix macos version for CI

* pin macos to 12 for CI

* replace macos-latest with macos-12
2024-04-23 17:38:12 +02:00