Commit Graph

90 Commits

Author SHA1 Message Date
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
Masen Furer
d7abcd45de
Force pydantic v1 for sqlmodel compatibility (#3026) 2024-04-11 13:42:30 -07:00
Elijah Ahianyo
a5d3ba419c
Run benchmarks when PR gets merged (#3022) 2024-04-08 11:22:25 -07:00
Martin Xu
7e4668f5ca
[REF-2425] Reduce unnecessary CI runs (#2966) 2024-03-29 16:25:03 -07:00
Thomas Brandého
0af4770180
generate pyi files when building/publishing 3rd party component (#2945)
* build pyi files when building/publishing 3rd party

* fix typo in workflow

* add future annotation

* add tests to pass coverage check

* add more unit tests

* omit pyi_generator from test coverage

* change black from dev deps to direct deps

* remake all pyi

* format pyi if black is present, return as if otherwise

* fix requested changes

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2024-03-29 09:54:21 -07:00
Elijah Ahianyo
e0fedeb419
[REF-1682][REF-1683][REF-1684][REF-2283]Benchmark reflex package size and .web folder (#2880)
* remove codspeed.yml

* test upload job

* minor edits to get upload job working

* perhaps this works

* upload needs relex-install-size

* retrigger pipeline

* test only on ubuntu

* change to save to db directly

* oops

* size benchmarks

* .web for counter

* its timeout-minutes

* se integration.sh to run and kill process

* install psycopg2

* move .web runs to integration_tests.yml to save runners

* fix measurement-type for reflex-web

* add database url to env

* psycopg2

* test run ids

* commit sha gets the job done

* refactor

* add more matrices

* move reflex package size to integration_test.yml

* fix venv path

* test fix

* test fix

* use hyphen

* testing reflex build size

* ls for temp debug

* fix typo in command

* possible fix

* possible fix for windows

* remove dead code

* remove dead code

* remove unwanted comments

* refactor

* rebase on main

* pr_title

* remove pr_title from args

* debug

* should work now

* precommit fix

* print out package size for

* add shell

* test

* trying again

* dont use cached poetry to have accurate measurement of deps

* remove reflex deps calculation step from integration job

* fix script path

* precommit fix

* no real difference on different python versions so use 3.11.5

* remove ls keyword
2024-03-25 08:33:28 +00:00
Elijah Ahianyo
83318530f2
[REF-2284]Benchmark add extra info on publishing data (#2864)
* Benchmark add extra info on publishing data

* fix typo

* get file name for simplicity

* precommit fix

* removesuffix not in python3.8

* add pr_id in case the pr title is changed

* precommit fix
2024-03-21 07:25:40 +00:00
Martin Xu
fa99407b81
Handle quote marks ' " in PR titles in benchmark CI (#2877)
* escape double quote marks in PR title

* move the pr title into the env
2024-03-20 11:30:47 -07:00
Elijah Ahianyo
a06b570e3a
Benchmark with app harness (#2774) 2024-03-13 15:59:55 -07:00
Alek Petuskey
4c10cbc6d1
Custom Component Request Template (#2853)
Co-authored-by: Alek Petuskey <alekpetuskey@aleks-mbp.lan>
2024-03-13 12:55:09 -07:00
Thomas Brandého
92db402539
telemetry refactor + unit tests (#2786) 2024-03-13 12:38:54 -07:00
Masen Furer
f52ff56440
[REF-2086] Avoid "Warning: The path to the Node binary could not be found. (#2803) 2024-03-13 12:35:43 -07:00
Masen Furer
eb18ce90d5
[REF-2172] Add DECORATED_PAGES before compiling in thread (#2841) 2024-03-12 10:28:37 -07:00
Masen Furer
82e3be76cf
benchmarks.yml: skip benchmarking if the DATABASE_URL is not set (#2701)
* benchmarks.yml: skip benchmarking if the DATABASE_URL is not set

* try to expand the value

* workaround secrets not available in the `if:` condition

* only skip database / pytest step if missing creds
2024-02-23 11:23:28 -08:00
Martin Xu
24ccb2a2aa
bump github action versions (#2680)
* bump gh action versions

* left out files
2024-02-21 15:01:59 -08:00
Masen Furer
192bddb5d4
workflows: remove references to now-defunct reflex-0.4.0 branch (#2643) 2024-02-16 11:32:24 -08:00
Masen Furer
fc6eff7104
Convert templates to use rx.chakra where needed (#2555)
* Convert templates to use `rx.chakra` where needed

* reflex_init_in_docker_test: run test on PR into reflex-0.4.0

This is why we didn't catch the template issues earlier
2024-02-12 13:32:23 -08:00
Masen Furer
aa4bdf53d5
enable CI on reflex-0.4.0 branch (#2502) 2024-01-31 16:06:04 -08:00
Martin Xu
3ff88390c2
Add git precommit hook that generates pyi files (#2447) 2024-01-29 20:32:36 -08:00
Nikhil Rao
d68de02bc8
Revert "Individually Import Chakra Packages (#2405)" (#2472) 2024-01-28 15:39:59 -08:00
Alek Petuskey
00a8054850
Individually Import Chakra Packages (#2405)
* Base lib switch

Co-authored-by: Alek Petuskey <alekpetuskey@aleks-mbp.lan>
2024-01-25 10:22:46 -08:00
Masen Furer
3de36be5f4
integration_tests: re-enable reflex-web with windows override (#2436) 2024-01-24 12:49:57 -08:00
Masen Furer
1916cf2277
integration tests: disable windows builds for reflex-web (#2417) 2024-01-18 12:53:35 -08:00
benedikt-bartscher
f90982ea06
use redis-py url syntax for redis_url (#2267)
* use redis-py url syntax for redis_url

* port is optional

* Add StateManagerRedis.close method

The close helper method always calls `close_connection_pool=True` so that all
outstanding redis operations can be stopped before changing event loops.

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2023-12-12 10:54:10 -08:00
Masen Furer
8e7d4819ee
check_generated_pyi: fix diff checking (#2029) 2023-11-17 15:21:52 -08:00
Masen Furer
ce47fcfd6c
Fix CustomComponent rendering (#2169) 2023-11-14 13:03:12 -08:00
Alek Petuskey
dd982c5ace
Add benchmarking tests (#2143) 2023-11-08 17:41:08 -08:00
Masen Furer
61c9afd5a5
Support Python 3.12 (#2006) 2023-11-06 12:08:14 -08:00