Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add prettyprinting of models #256

Merged
merged 2 commits into from
Jan 18, 2024
Merged

add prettyprinting of models #256

merged 2 commits into from
Jan 18, 2024

Conversation

hhaensel
Copy link
Member

model printing is currently not easy to understand at the REPL, Garish.pprint doesn't improve the situation a lot
This PR implements automatic prettyprinting at the REPL:

julia> @app begin
         @out non_reactive a_::Int = 12
         @out s_ = "Hello"
         @out f = jsfunction"console.log('Hi')"
       end
__GF_AUTO_HANDLERS__ (generic function with 1 method)

julia> @init
Instance of 'Main_ReactiveModel'
    channel_ (internal): JUURVSVWBPYQFUNBDYIEDYVCFGCTUEFG
    channel__ (internal): JUURVSVWBPYQFUNBDYIEDYVCFGCTUEFG
    modes__ (internal): LittleDict(:a_ => 4)
    isready (autofield, in): false
    isprocessing (autofield, out): false
    fileuploads (autofield, in): Dict{AbstractString, AbstractString}()

    a_ (out, non-reactive): 12
    s_ (out): Hello
    f (out): Dict{Symbol, Any}(:jsfunction => Dict{Symbol, Any}(:body => "console.log('Hi')", :arguments => ""))

@hhaensel hhaensel merged commit 90947cb into master Jan 18, 2024
2 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant