diff --git a/Project.toml b/Project.toml index a8f81b6..6fe0e64 100644 --- a/Project.toml +++ b/Project.toml @@ -24,6 +24,7 @@ UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" YAML = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6" [compat] +Aqua = "0.6" CodecZlib = "0.6, 0.7" DashBase = "0.1" DashCoreComponents = "2.0.0" @@ -40,7 +41,8 @@ YAML = "0.4.7" julia = "1.6" [extras] +Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Test"] +test = ["Aqua", "Test"] diff --git a/src/Dash.jl b/src/Dash.jl index f099e75..9e063c2 100644 --- a/src/Dash.jl +++ b/src/Dash.jl @@ -13,7 +13,7 @@ include("HttpHelpers/HttpHelpers.jl") using .HttpHelpers -export dash, Component, Front, callback!, +export dash, Component, callback!, enable_dev_tools!, ClientsideFunction, run_server, PreventUpdate, no_update, @var_str, Input, Output, State, make_handler, callback_context, diff --git a/src/app/dashapp.jl b/src/app/dashapp.jl index 64d02b3..4e687a3 100644 --- a/src/app/dashapp.jl +++ b/src/app/dashapp.jl @@ -42,7 +42,6 @@ end #only name, index_string and layout are available to set function Base.setproperty!(app::DashApp, property::Symbol, value) - property == :name && return set_name!(app, value) property == :index_string && return set_index_string!(app, value) property == :layout && return set_layout!(app::DashApp, value) property == :title && return set_title!(app::DashApp, value) @@ -52,16 +51,10 @@ function Base.setproperty!(app::DashApp, property::Symbol, value) error("The property `$(property)` of `DashApp` does not exist.") end -function set_name!(app::DashApp, name) - setfield!(app, :name, name) -end - function set_title!(app::DashApp, title) setfield!(app, :title, title) end -get_name(app::DashApp) = app.name - function set_layout!(app::DashApp, component::Union{Component,Function}) setfield!(app, :layout, component) end diff --git a/src/components_utils/table_format.jl b/src/components_utils/table_format.jl index b2af952..0661c32 100644 --- a/src/components_utils/table_format.jl +++ b/src/components_utils/table_format.jl @@ -4,7 +4,7 @@ module TableFormat struct NamedValue{Name, T} value::T - NamedValue{Name}(value::T) where {Name, Keys, T} = new{Name, T}(value) + NamedValue{Name}(value::T) where {Name, T} = new{Name, T}(value) end struct TupleWithNamedValues{Name, Keys} diff --git a/test/aqua.jl b/test/aqua.jl new file mode 100644 index 0000000..8524b4e --- /dev/null +++ b/test/aqua.jl @@ -0,0 +1,6 @@ +using Aqua + +# ideally we get both these tests to work, but: +# stale_deps is ignored to help transition from DashCoreComponents +# amiguities is ignored because they originate outside the package +Aqua.test_all(Dash; ambiguities=false, stale_deps=false) \ No newline at end of file diff --git a/test/runtests.jl b/test/runtests.jl index df10058..6e955b4 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -12,4 +12,5 @@ include("callbacks.jl") include("components_utils.jl") include("table_format.jl") include("reload_hash.jl") +include("aqua.jl") #include("dev.jl") \ No newline at end of file