From c1098d9c428f1da660ebd41b5754116cf75718f1 Mon Sep 17 00:00:00 2001 From: JuliusMartensen Date: Fri, 10 Jun 2022 09:09:58 +0200 Subject: [PATCH] Fix docs build (#359) * Fix docs build * Fix missing dispatch ( possibly) * Again ready to squash --- docs/make.jl | 9 ++++++--- src/basis/type.jl | 16 +++++++++++++++- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/docs/make.jl b/docs/make.jl index e1bf3cd96..ea87e0e96 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -4,17 +4,17 @@ using Documenter, DataDrivenDiffEq using Flux, SymbolicRegression using Literate -include("pages.jl") ENV["GKSwstype"] = "100" # Evaluate the example directory - src = joinpath(@__DIR__, "src") lit = joinpath(@__DIR__, "examples") -excludes = []#["symbolic_regression.jl"] + +excludes = [] tutorials = [] +#function create_pages(dirname = @__DIR__) for (root, _, files) ∈ walkdir(lit), file ∈ files file ∈ excludes && continue fname, fext = splitext(file) @@ -34,6 +34,9 @@ for (root, _, files) ∈ walkdir(lit), file ∈ files end end +# Must be after tutorials is created +include("pages.jl") + # Create the docs makedocs( sitename="DataDrivenDiffEq.jl", diff --git a/src/basis/type.jl b/src/basis/type.jl index 5603d780b..f5cb9e949 100644 --- a/src/basis/type.jl +++ b/src/basis/type.jl @@ -71,6 +71,20 @@ mutable struct Basis <: AbstractBasis name::Symbol """Internal systems""" systems::Vector{Basis} + + function Basis(eqs, states, ctrls, ps, observed, iv, implicit, f, name, systems; + checks::Bool = true) + + if checks + # Currently do nothing here + #check_variables(dvs, iv) + #check_parameters(ps, iv) + #check_equations(deqs, iv) + #check_equations(equations(events), iv) + #all_dimensionless([dvs; ps; iv]) || check_units(deqs) + end + new(eqs, states, ctrls, ps, observed, iv, implicit, f, name, systems) + end end ## Constructors @@ -108,7 +122,7 @@ function Basis(eqs::AbstractVector, states::AbstractVector; end -function Basis(eqs::AbstractVector{Equation}, states::AbstractVector; +function Basis(eqs::AbstractVector{Symbolics.Equation}, states::AbstractVector; parameters::AbstractVector = [], iv = nothing, controls::AbstractVector = [], implicits = [], observed::AbstractVector = [],