genieframework / genieframeworkdemos Goto Github PK
View Code? Open in Web Editor NEWDemos for new reactive API
Demos for new reactive API
The demo in CSVAnalysis is not working. When uploading a new dataset, it does not appear in the drop-down menu, and the new columns are not available.
When downloaded and try to initialise the folder StipplePlotlyExamples
, I can see this. Thanks for comments.
(StipplePlotlyExamples) pkg> st
Status `~/My Drive/Projects/GitHub_others/GenieFrameworkDemos_NewAPI-main/StipplePlotlyExamples/Project.toml`
→ [a59fdf5c] GenieFramework v1.7.0 `C:\Users\aryan\.julia\dev\GenieFramework`
→ [4acbeb90] Stipple v0.25.16 `C:\Users\aryan\.julia\dev\Stipple`
→ [ec984513] StipplePlotly v0.13.2 `C:\Users\aryan\.julia\dev\StipplePlotly`
→ [a3c5d34a] StippleUI v0.21.3 `C:\Users\aryan\.julia\dev\StippleUI`
Info Packages marked with → are not downloaded, use `instantiate` to download
I've tried to run the Iris tutorial with the new API and simply instantiating packages as per Project.toml, but it fails.
How to reproduce? Simply instantiate based on Project.toml and run dashboard.jl
.
If I use the provided Manifest.toml, it works but that's technically not for my system/platform.
Would it be possible to update the tutorial (I'm trying to read up on recent PRs) or set the appropriate compat entries in Project.toml?
On GenieFramework 1.13 (latest)
WARNING: both Html and Base export "div"; uses of it in module Stipple must be qualified
LoadError: BoundsError: attempt to access 1-element Vector{Any} at index [2]
Stacktrace:
[1] getindex(A::Vector{Any}, i1::Int64)
@ Base ./array.jl:924
[2] var"@out"(source::LineNumberNode, module::Module, expr::Any)
@ Stipple.ReactiveTools ~/.julia/packages/Stipple/pgem3/src/ReactiveTools.jl:300
I know it has worked in the past, so I tried to downgrade, but there are still errors, eg, GenieFramework 1.5-1.10 gives
LoadError: MethodError: no method matching on(::var"#33#34"{var"##Main_ReactiveModel!#314"}, ::typeof(vars))
Closest candidates are:
on(::Any, ::AbstractObservable; weak, priority, update) at ~/.julia/packages/Observables/PHGQ8/src/Observables.jl:356
on(::AbstractObservable, ::Function; weak) at ~/.julia/packages/Stipple/Ird4L/src/Stipple.jl:708
Stacktrace:
[1] GF_AUTO_HANDLERS(model::var"##Main_ReactiveModel!#314")
@ Main ~/.julia/packages/Stipple/Ird4L/src/ReactiveTools.jl:643
[2] |>(x::var"##Main_ReactiveModel!#314", f::typeof(GF_AUTO_HANDLERS))
@ Base ./operators.jl:911
[3] top-level scope
@ ~/.julia/packages/Stipple/Ird4L/src/ReactiveTools.jl:422
[4] eval
@ ./boot.jl:368 [inlined]
[5] (::var"#35#36")()
@ Main ~/.julia/packages/Stipple/Ird4L/src/ReactiveTools.jl:711
[6] #invokelatest#2
@ ./essentials.jl:729 [inlined]
[7] invokelatest
@ ./essentials.jl:726 [inlined]
[8] Page(route::String; view::String, model::var"#35#36", layout::String, context::Module, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Stipple.Pages ~/.julia/packages/Stipple/Ird4L/src/Pages.jl:56
[9] top-level scope
@ ~/.julia/packages/Stipple/Ird4L/src/ReactiveTools.jl:698
Associated Manifest.toml uses GenieFramework 1.0 which works.
My system:
I've tried on many GenieFramework/Stipple versions, incl. the latest
Julia Version 1.8.5
Commit 17cfb8e65ea (2023-01-08 06:45 UTC)
Platform Info:
OS: macOS (arm64-apple-darwin21.5.0)
CPU: 8 × Apple M1 Pro
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-13.0.1 (ORCJIT, apple-m1)
Threads: 6 on 6 virtual cores
Environment:
JULIA_EDITOR = code
JULIA_NUM_THREADS = 8
As it is now, when a background process is started like in the lorenz demo,
the process keeps running when the user closes the window or reloads. We have two choices:
For 1 we'd need to send a kill signal to the running task. However, this is an issue in Stipple since having a reactive Task
variable yields serialization errors. @hhaensel suggested we could modify the Genie serializer to fix this
For 2, we'd need to keep track of the user session and manually return the corresponding ReactiveModel
on the route.
In the Database app, I have two objects and tables: Houses and Prediction. Every time I input a new House id in the text field, a new Prediction is created and added to the Predictions table.
I'm trying to set the id of the prediction to the id of the house. However, when I set this value either as an Int or as a DbId type
I'm getting an error:
[ Info: 2023-01-09 17:35:08 SELECT "houses"."id" AS "houses_id", "houses"."CRIM" AS "houses_CRIM", "houses"."ZN" AS "houses_ZN", "houses"."INDUS" AS "houses_INDUS", "houses"."CHAS" AS "houses_CHAS", "houses"."NOX" AS "houses_NOX", "houses"."RM" AS "houses_RM", "houses"."AGE" AS "houses_AGE", "houses"."DIS" AS "houses_DIS", "houses"."RAD" AS "houses_RAD", "houses"."TAX" AS "houses_TAX", "houses"."PTRATIO" AS "houses_PTRATIO", "houses"."B" AS "houses_B", "houses"."LSTAT" AS "houses_LSTAT", "houses"."MEDV" AS "houses_MEDV" FROM "houses" WHERE id == 15 ORDER BY houses.id ASC
__model__.prediction[] = Prediction
| KEY | VALUE |
|-------------------|-------------------------|
| error::Float64 | 0.14353387768486314 |
| id::DbId | 15 |
| price::Float64 | 18.056466122315136 |
| timestamp::String | 2023-01-09T17:35:08.773 |
[ Info: 2023-01-09 17:35:08 UPDATE predictions SET "id" = '15', "price" = 18.056466122315136, "error" = 0.14353387768486314, "timestamp" = '2023-01-09T17:35:08.773' WHERE predictions.id = '15' ; SELECT 15 AS LAST_INSERT_ID
[ Info: 2023-01-09 17:35:08 SELECT "predictions"."id" AS "predictions_id", "predictions"."price" AS "predictions_price", "predictions"."error" AS "predictions_error", "predictions"."timestamp" AS "predictions_timestamp" FROM "predictions" WHERE "id" = 15 ORDER BY predictions.id ASC
┌ Error: 2023-01-09 17:35:08 Error attempting to invoke handler 3 for field Reactive{Int64}(Observable{Int64} with 3 listeners. Value:
│ 15, 1, false, false, "/Users/pere/genie/demos/GenieFrameworkDemos_NewAPI/Database/app.jl:19") with value 15
└ @ Stipple ~/.julia/packages/Stipple/AUtza/src/stipple/mutators.jl:33
┌ Error: 2023-01-09 17:35:08 SearchLight.Exceptions.UnretrievedModelException{DataType}(Prediction, 15, "UnretrievedModelException: the DataType data could not be retrieved for id 15. \nModel: \nPrediction")
└ @ Stipple ~/.julia/packages/Stipple/AUtza/src/stipple/mutators.jl:34
If I comment out that line it works, but the id assigned to the prediction is incremental. I could add a new column with the House id, but I wonder if it is possible to have the tables House and Predictions share their primary keys (some kind of relational key?)
@hhaensel
When double clicking on the map, we want to get the (lat,lon) values and store them to a list. Can you share any idea on how to achieve this?
https://github.com/GenieFramework/GenieFrameworkDemos_NewAPI/tree/travellingsalesman/TravellingSalesman
maptest.jl
contains a MWE for the maps, the other .jl files are for the optimization problem demo.
When starting the Database demo, it stops responding and the CPU usage goes to 100%. This happens even if the Genie server is not started. This is the output
julia> includet("app.jl")
[ Info: 2023-03-28 18:44:16 SELECT "houses"."id" AS "houses_id", "houses"."CRIM" AS "houses_CRIM", "houses"."ZN" AS "houses_ZN", "houses"."INDUS" AS "houses_INDUS", "houses"."CHAS" AS "houses_CHAS", "houses"."NOX" AS "houses_NOX", "houses"."RM" AS "houses_RM", "houses"."AGE" AS "houses_AGE", "houses"."DIS" AS "houses_DIS", "houses"."RAD" AS "houses_RAD", "houses"."TAX" AS "houses_TAX", "houses"."PTRATIO" AS "houses_PTRATIO", "houses"."B" AS "houses_B", "houses"."LSTAT" AS "houses_LSTAT", "houses"."MEDV" AS "houses_MEDV" FROM "houses" ORDER BY houses.id ASC
[ Info: 2023-03-28 18:44:21 Watching ["/Users/pere/genie/demos/GenieFrameworkDemos_NewAPI/Database"]
[ Info: 2023-03-28 18:44:24 SELECT COUNT(*) AS __cid FROM "houses"
[ Info: 2023-03-28 18:44:28 SELECT "houses"."id" AS "houses_id", "houses"."CRIM" AS "houses_CRIM", "houses"."ZN" AS "houses_ZN", "houses"."INDUS" AS "houses_INDUS", "houses"."CHAS" AS "houses_CHAS", "houses"."NOX" AS "houses_NOX", "houses"."RM" AS "houses_RM", "houses"."AGE" AS "houses_AGE", "houses"."DIS" AS "houses_DIS", "houses"."RAD" AS "houses_RAD", "houses"."TAX" AS "houses_TAX", "houses"."PTRATIO" AS "houses_PTRATIO", "houses"."B" AS "houses_B", "houses"."LSTAT" AS "houses_LSTAT", "houses"."MEDV" AS "houses_MEDV" FROM "houses" ORDER BY houses.id ASC
[ Info: 2023-03-28 18:44:28 SELECT COUNT(*) AS __cid FROM "houses"
[ Info: 2023-03-28 18:44:32 SELECT "houses"."id" AS "houses_id", "houses"."CRIM" AS "houses_CRIM", "houses"."ZN" AS "houses_ZN", "houses"."INDUS" AS "houses_INDUS", "houses"."CHAS" AS "houses_CHAS", "houses"."NOX" AS "houses_NOX", "houses"."RM" AS "houses_RM", "houses"."AGE" AS "houses_AGE", "houses"."DIS" AS "houses_DIS", "houses"."RAD" AS "houses_RAD", "houses"."TAX" AS "houses_TAX", "houses"."PTRATIO" AS "houses_PTRATIO", "houses"."B" AS "houses_B", "houses"."LSTAT" AS "houses_LSTAT", "houses"."MEDV" AS "houses_MEDV" FROM "houses" ORDER BY houses.id ASC
[ Info: 2023-03-28 18:44:32 SELECT COUNT(*) AS __cid FROM "houses"
[ Info: 2023-03-28 18:44:36 SELECT "houses"."id" AS "houses_id", "houses"."CRIM" AS "houses_CRIM", "houses"."ZN" AS "houses_ZN", "houses"."INDUS" AS "houses_INDUS", "houses"."CHAS" AS "houses_CHAS", "houses"."NOX" AS "houses_NOX", "houses"."RM" AS "houses_RM", "houses"."AGE" AS "houses_AGE", "houses"."DIS" AS "houses_DIS", "houses"."RAD" AS "houses_RAD", "houses"."TAX" AS "houses_TAX", "houses"."PTRATIO" AS "houses_PTRATIO", "houses"."B" AS "houses_B", "houses"."LSTAT" AS "houses_LSTAT", "houses"."MEDV" AS "houses_MEDV" FROM "houses" ORDER BY houses.id ASC
[ Info: 2023-03-28 18:44:37 SELECT COUNT(*) AS __cid FROM "houses"
[ Info: 2023-03-28 18:44:38 SELECT "houses"."id" AS "houses_id", "houses"."CRIM" AS "houses_CRIM", "houses"."ZN" AS "houses_ZN", "houses"."INDUS" AS "houses_INDUS", "houses"."CHAS" AS "houses_CHAS", "houses"."NOX" AS "houses_NOX", "houses"."RM" AS "houses_RM", "houses"."AGE" AS "houses_AGE", "houses"."DIS" AS "houses_DIS", "houses"."RAD" AS "houses_RAD", "houses"."TAX" AS "houses_TAX", "houses"."PTRATIO" AS "houses_PTRATIO", "houses"."B" AS "houses_B", "houses"."LSTAT" AS "houses_LSTAT", "houses"."MEDV" AS "houses_MEDV" FROM "houses" ORDER BY houses.id ASC
Status `~/genie/demos/GenieFrameworkDemos_NewAPI/Database/Project.toml`
⌃ [fbb218c0] BSON v0.3.6
[336ed68f] CSV v0.10.9
[a93c6f00] DataFrames v1.5.0
⌅ [55351af7] ExproniconLite v0.7.9
⌃ [587475ba] Flux v0.13.9
[a59fdf5c] GenieFramework v1.13.0
⌃ [eb30cadb] MLDatasets v0.7.7
[21a827c4] SearchLightSQLite v2.2.1
[9a3f8284] Random
When clients lose the connection to their servers the reconnection procedure produces a high CPU load.
This happens for me, if a VPN server is stopped or the server needs to be restarted.
We should probably set a longer checking interval.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.