Skip to content

Commit

Permalink
Updated to new JSMDInterfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
MicheleCeresoli committed Nov 29, 2023
1 parent 082c9c1 commit 1069652
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ SMDGraphs = "b792745b-7241-45be-ba96-70eb67e8468f"

[compat]
FunctionWrappersWrappers = "0.1"
JSMDInterfaces = "1"
JSMDInterfaces = "1.5"
JSMDUtils = "1"
PrecompileTools = "1"
SMDGraphs = "0.1"
julia = "1"
SMDGraphs = "0.2"
julia = "1.6"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Expand Down
18 changes: 11 additions & 7 deletions src/Tempo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,19 @@ module Tempo
# TODO: remove this dependency - could be handled by Tempo itself?
using Dates: DateTime as DatesDateTime, datetime2julian, now

using FunctionWrappersWrappers: FunctionWrappersWrapper,
FunctionWrappers.FunctionWrapper
using FunctionWrappersWrappers:
FunctionWrappersWrapper,
FunctionWrappers.FunctionWrapper

using JSMDInterfaces.Errors: AbstractGenericException, @custom_error

using JSMDInterfaces.Graph:
AbstractJSMDGraphNode,
add_edge!,
add_vertex!,
get_path,
has_vertex

using JSMDUtils
using JSMDUtils.Autodiff

Expand All @@ -17,15 +25,11 @@ using PrecompileTools: PrecompileTools
using SMDGraphs:
MappedNodeGraph,
MappedDiGraph,
AbstractGraphNode,
SimpleDiGraph,
has_vertex,
add_edge!,
get_path,
get_mappedid,
get_mappednode

import SMDGraphs: get_node_id, add_vertex!
import SMDGraphs: get_node_id

include("constants.jl")
include("errors.jl")
Expand Down
8 changes: 4 additions & 4 deletions src/scales.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ TimeNodeWrappers{T} = FunctionWrappersWrapper{Tuple{
}, true}

"""
TimeScaleNode{T} <: AbstractGraphNode
TimeScaleNode{T} <: AbstractJSMDGraphNode
Define a timescale.
Expand All @@ -34,7 +34,7 @@ Define a timescale.
- `ffp` -- offest function from the parent timescale
- `ftp` -- offset function to the parent timescale
"""
struct TimeScaleNode{T} <: AbstractGraphNode
struct TimeScaleNode{T} <: AbstractJSMDGraphNode
name::Symbol
id::Int
parentid::Int
Expand All @@ -60,7 +60,7 @@ end
A `TimeSystem` object manages a collection of default and user-defined [`TimeScaleNode`](@ref)
objects, enabling efficient time transformations between them. It leverages a
[`MappedDiGraph`](@ref) to keep track of the relationships between the timescales.
`MappedDiGraph` to keep track of the relationships between the timescales.
---
Expand Down Expand Up @@ -251,7 +251,7 @@ julia> add_timescale!(SYSTEM, RTS)
julia> add_timescale!(SYSTEM, CTS, root_to_child; parent=RTS, ftp=child_to_root)
### See also
See also [`@timescale`](@ref), [`TimeSystem`](@ref) and [`apply_offsets`](@ref).
See also [`@timescale`](@ref), [`TimeSystem`](@ref) and `apply_offsets`.
"""
function add_timescale!(
ts::TimeSystem{T},
Expand Down

0 comments on commit 1069652

Please sign in to comment.