Commit Graph

1965 Commits

Author SHA1 Message Date
Masen Furer
3e9f346a54
bump to final 0.6.5 2024-11-12 13:47:13 -08:00
Masen Furer
593ec2342f
Temporarily downpin @radix-ui/themes <3.1.5 (#4370)
* Temporarily downpin @radix-ui/themes <3.1.5

A visual/style regression was introduced in @radix-ui/themes 3.1.5
as described in radix-ui/themes#627 which reflex needs to avoid.

* Get expected radix library version from component
2024-11-12 13:47:04 -08:00
Masen Furer
1f7e7aff15
bump to 0.6.5a3 2024-11-12 09:38:39 -08:00
Masen Furer
d6e59b9b51
Only pass Model.__fields__ when casting event args (#4356)
Attempting to initialize relationship fields in a sqlmodel model throws an
error, so only pass defined pydantic __fields__ if the type is a Model.
2024-11-12 09:38:21 -08:00
Masen Furer
cc337a8e52
Bump reflex-hosting-cli dep to 0.1.15 for v2 (#4355) 2024-11-12 09:38:20 -08:00
Masen Furer
e0911c5e68
bump to 0.6.5a2 2024-11-11 11:14:27 -08:00
Khaleel Al-Adhami
4afea2d338
fix upload argspec being missing (#4335) 2024-11-11 11:14:17 -08:00
Masen Furer
103069a188
bump to 0.6.5a1 2024-11-07 21:04:25 -08:00
Elijah Ahianyo
cd59ab5406
[ENG-4010]Codeblock cleanup in markdown (#4233)
* Codeblock cleanup in markdown

* Initial approach to getting this working with rx.memo and reflex web

* abstract the map var logic

* the tests are not valid + pyright fix

* darglint fix

* Add unit tests plus mix components

* pyi run

* rebase on main

* fix darglint

* testing different OS

* revert

* This should fix it. Right?

* Fix tests

* minor fn signature fix

* use ArgsFunctionOperation

* use destructured args and pass the tests

* fix remaining unit tests

* fix pyi files

* rebase on main

* move language regex on codeblock to markdown

* fix tests

---------

Co-authored-by: Khaleel Al-Adhami <khaleel.aladhami@gmail.com>
2024-11-07 19:18:14 -08:00
Simon Young
3d85936009
update cli version (#4333)
Co-authored-by: simon <simon@reflex.dev>
2024-11-07 19:17:55 -08:00
Khaleel Al-Adhami
a454b705a8
fix imports with alias from $ (#4332) 2024-11-07 19:17:07 -08:00
Khaleel Al-Adhami
4c4c59bf04
convert event return types to type hints (#4331) 2024-11-07 16:33:42 -08:00
Masen Furer
2ee2d52035
Fix pyi file merged after custom_attrs type change (#4330) 2024-11-07 16:18:28 -08:00
Elijah Ahianyo
855a20fd1c
[GTM-648]Add Missing Table props (#4322)
* Add Missing Table props

* add more props
2024-11-07 16:04:03 -08:00
Masen Furer
227d09a02c
test_exception_handlers: add test case that triggers ErrorBoundary (#4327) 2024-11-07 16:01:37 -08:00
benedikt-bartscher
8fd5c9f200
improve typing for serializer decorator (#4317)
* improve typing for serializer decorator

* use wrapped logic

* dang it darglint

---------

Co-authored-by: Khaleel Al-Adhami <khaleel.aladhami@gmail.com>
2024-11-07 15:52:11 -08:00
Khaleel Al-Adhami
0c482bda3c
mark var methods as private (#4319) 2024-11-07 14:50:26 -08:00
Khaleel Al-Adhami
7843a517bc
change custom attr to accept any (#4323) 2024-11-07 14:18:13 -08:00
benedikt-bartscher
2cb193e8d6
improve app_src typing (#4324) 2024-11-07 14:08:37 -08:00
Simon Young
e457d53924
Adding hosting v1 support (#4309)
Co-authored-by: simon <simon@reflex.dev>
Co-authored-by: Khaleel Al-Adhami <khaleel.aladhami@gmail.com>
2024-11-06 17:18:41 -08:00
Khaleel Al-Adhami
68407ce2d8
unbreak pyi plotly (#4320) 2024-11-06 16:56:26 -08:00
Khaleel Al-Adhami
3bd35f53f2
add type hinting for plotly (#4279)
* add type hinting for plotly

* fix merge
2024-11-06 16:41:13 -08:00
Khaleel Al-Adhami
93ae79aa60
fix call_function events sent from backend (#4316) 2024-11-06 15:13:00 -08:00
Khaleel Al-Adhami
b9d73edd66
add metainfo to keyevent (#4287)
* allow for event handlers to ignore args

* use a constant

* dang it darglint

* forgor

* keep the tests but move them to valid place

* add metainfo to keyevent

* format code

* fix pyi files

* generate all prefixes of event types

* change format rule
2024-11-06 15:10:02 -08:00
Thomas Brandého
4c0b49135b
stop ignoring some lint rules (#4311)
* bump python packages version

* stop ignoring some lint rules that pass ruff check

* stop ignoring rule F541

* remove sneaky test file
2024-11-06 13:32:31 -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
Carlos
8a4701143e
add toast classname prop (#4310) 2024-11-06 09:49:09 -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
Khaleel Al-Adhami
c57d496184
improve typing for non decorated events (#4308)
* improve typing for non decorated events

* fix any typing
2024-11-06 09:21:19 -08:00
Khaleel Al-Adhami
bfa7ca639f
better missing system package message (#4306)
* better missing system package message

* change error type
2024-11-06 09:21:04 -08:00
Khaleel Al-Adhami
6334cfab0d
allow for event handlers to ignore args (#4282)
* allow for event handlers to ignore args

* use a constant

* dang it darglint

* forgor

* keep the tests but move them to valid place
2024-11-06 09:20:37 -08:00
simon
d9ab3a0f1c Revert "add v1 support"
This reverts commit c216eeafeb.
2024-11-05 18:28:16 -08:00
simon
c216eeafeb add v1 support 2024-11-05 18:23:18 -08:00
Carlos
01e3844ac4
default props comment for GraphinTooltip (#4101)
* default props comment for GraphinTooltip

* update
2024-11-05 14:03:07 -08:00
benedikt-bartscher
4a6c16e9dc
More env var cleanup (#4248)
* fix and test bug in config env loading

* streamline env var interpretation with @adhami3310

* improve error messages, fix invalid value for TELEMETRY_ENABLED

* just a small hint

* ruffing

* fix typo from review

* refactor - ruff broke the imports..

* cleanup imports

* more

* add internal and enum env var support

* ruff cleanup

* more global imports

* revert telemetry, it lives in rx.Config

* minor fixes/cleanup

* i missed some refs

* fix darglint

* reload config is internal

* fix EnvVar name

* add test for EnvVar + minor typing improvement

* bool tests

* was this broken?

* retain old behavior

* migrate APP_HARNESS_HEADLESS to new env var system

* migrate more APP_HARNESS env vars to new config system

* migrate SCREENSHOT_DIR to new env var system

* refactor EnvVar.get to be a method

* readd deleted functions and deprecate them

* improve EnvVar api, cleanup RELOAD_CONFIG question

* move is_prod_mode back to where it was
2024-11-05 12:25:13 -08:00
Thomas Brandého
1c4f410052
bump python packages version (#4302) 2024-11-05 10:50:43 -08:00
Thomas Brandého
ce22ca5f71
rollback to 14.2.16 until v15 is more stable (#4297) 2024-11-05 10:50:32 -08:00
Khaleel Al-Adhami
b5d1e03de1
improve object var symantics (#4290)
* improve object var symantics

* add case for serializers

* check against serializer with to = dict

* add tests

* fix typing issues

* remove default value

* older version of python doesn't have assert type

* add base to rx field cases

* get it from typing_extension
2024-11-05 09:56:10 -08:00
Thomas Brandého
0ed7c5d969
expose rx.get_state() to get instance of state from anywhere (#3959)
* expose rx.get_state() to get instance of state from anywhere

* fix circular import and add read-only proxy
2024-11-05 16:21:59 +01:00
abulvenz
bb903b605a
Fix wrong hook (#4295)
* fix: Typo in variable name.

* fix: Using existing hook constant.

---------

Co-authored-by: Benedikt Bartscher <bb@senbax.de>
2024-11-04 15:20:02 -08:00
Khaleel Al-Adhami
1122cbf0b1
handle none case in state setattr (#4301) 2024-11-04 14:37:58 -08:00
benedikt-bartscher
b3c199870e
bypass pydantic runtime validation for state init (#4256)
* bypass pydantic runtime validation for state init
closes #4235

* cleanup
2024-11-04 13:05:39 -08:00
graham
702808afa6
Bugfix/leave gitignore as is (#4291)
* Refactor initialize_gitignore to support list type for files_to_ignore and improve current ignore handling.  Dont sort the gitignore file.

* more consistent list comprehension var
2024-11-04 11:36:12 -08:00
Khaleel Al-Adhami
51b0f7d28e
special case field in _isinstance (#4298) 2024-11-04 11:06:24 -08:00
Khaleel Al-Adhami
16ed266d11
move check of path to only check name (#4299)
* move check of path to only check name

* assert .name in other tests as well

* get even more ones
2024-11-04 11:01:14 -08:00
Khaleel Al-Adhami
ca81e623db
add noop event (#4288)
* add noop event

* fix pyi

* get it right pyright

* why

* remove silly events

* fix tests

* remove semi colon

* errors in merging
2024-11-04 10:33:07 -08:00
Khaleel Al-Adhami
6394a6dfc5
raise error when get package manager is not found (#4289)
* raise error when get package manager is not found

* add escape hatch

* handle installing frontend packages more gracefully

* fix no return

* dang it darglint
2024-11-04 10:31:24 -08:00
Masen Furer
163acf70a2
[ENG-759] [ENG-1104] patch json.dumps to handle __wrapped__ objects (#4166)
* [ENG-1104] patch `json.dumps` to handle `__wrapped__` objects

Unwrap proxied objects if the default serializer doesn't work.

* pre-commit fixup

* Skip default fallback logic when `cls` is specified

`cls` will provide its own default serialization mechanism, passing a `cls`
Encoder class is now also a way to opt-out of our patching shenanigans and just
use your own code.

This will work, provided the library doing the JSON encoding isn't also using
their own custom class.

* Override JSONEncoder.default instead of json.dumps

Many libraries (like httpx, used by openai), will use `from json import dumps`,
and if they do that before `reflex.state` gets imported, then they will get the
original dumps function instead of our patched one.

To workaround this, monkeypatch the `JSONEncoder.default` function instead.

This is also nicer behavior for custom subclasses of JSONEncoder; if someone
wants to opt-out of our monkeypatching, they can simply not call
`super().default(o)` in their subclass, which by default only raises a
TypeError.

---------

Co-authored-by: Nikhil Rao <nikhil@reflex.dev>
2024-11-04 10:11:51 -08:00
Masen Furer
0d9fc53a7d
[REF-3961] move "warn_if_too_large" logic into BaseState (#4284)
Check for too large serialized state whenever `BaseState._serialize` is used,
so it can apply to all state managers, not just `StateManagerRedis`.
2024-11-04 10:11:04 -08:00