napkin-1.0.0
Safe HaskellNone
LanguageGHC2021

Napkin.Spec.Graph.TasksDAGGraph

Synopsis

Documentation

newtype YAMLTask #

Constructors

YAMLTask 

Fields

Instances

Instances details
Generic YAMLTask # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Associated Types

type Rep YAMLTask 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

type Rep YAMLTask = D1 ('MetaData "YAMLTask" "Napkin.Spec.Graph.TasksDAGGraph" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'True) (C1 ('MetaCons "YAMLTask" 'PrefixI 'True) (S1 ('MetaSel ('Just "unYAMLTask") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

Methods

from :: YAMLTask -> Rep YAMLTask x #

to :: Rep YAMLTask x -> YAMLTask #

Show YAMLTask # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Eq YAMLTask # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Ord YAMLTask # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

type Rep YAMLTask # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

type Rep YAMLTask = D1 ('MetaData "YAMLTask" "Napkin.Spec.Graph.TasksDAGGraph" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'True) (C1 ('MetaCons "YAMLTask" 'PrefixI 'True) (S1 ('MetaSel ('Just "unYAMLTask") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

data TableTaskType #

Constructors

Entry [TaskId]

subgraph tasks Ids

PreHook Int 
CreateAction [UpdateStrategy] 
PostHook Int 
Exit 

Instances

Instances details
Generic TableTaskType # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Associated Types

type Rep TableTaskType 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Show TableTaskType # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Eq TableTaskType # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Ord TableTaskType # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

type Rep TableTaskType # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

data TaskType #

Instances

Instances details
Generic TaskType # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Methods

from :: TaskType -> Rep TaskType x #

to :: Rep TaskType x -> TaskType #

Eq TaskType # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Ord TaskType # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

type Rep TaskType # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

data Label #

Instances

Instances details
Generic Label # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Methods

from :: Label -> Rep Label x #

to :: Rep Label x -> Label #

Show Label # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Methods

showsPrec :: Int -> Label -> ShowS #

show :: Label -> String #

showList :: [Label] -> ShowS #

Eq Label # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Methods

(==) :: Label -> Label -> Bool #

(/=) :: Label -> Label -> Bool #

Ord Label # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Methods

compare :: Label -> Label -> Ordering #

(<) :: Label -> Label -> Bool #

(<=) :: Label -> Label -> Bool #

(>) :: Label -> Label -> Bool #

(>=) :: Label -> Label -> Bool #

max :: Label -> Label -> Label #

min :: Label -> Label -> Label #

type Rep Label # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

data Task payload #

Instances

Instances details
Generic (Task payload) # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Associated Types

type Rep (Task payload) 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Methods

from :: Task payload -> Rep (Task payload) x #

to :: Rep (Task payload) x -> Task payload #

type Rep (Task payload) # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

newtype TasksDAG (kind :: k) b #

Constructors

TasksDAG 

Fields

Instances

Instances details
Generic (TasksDAG kind b) # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Associated Types

type Rep (TasksDAG kind b) 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

type Rep (TasksDAG kind b) = D1 ('MetaData "TasksDAG" "Napkin.Spec.Graph.TasksDAGGraph" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'True) (C1 ('MetaCons "TasksDAG" 'PrefixI 'True) (S1 ('MetaSel ('Just "nodes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map TaskId (Task (Executable b))))))

Methods

from :: TasksDAG kind b -> Rep (TasksDAG kind b) x #

to :: Rep (TasksDAG kind b) x -> TasksDAG kind b #

Default (TasksDAG kind b) # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Methods

def :: TasksDAG kind b #

type Rep (TasksDAG kind b) # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

type Rep (TasksDAG kind b) = D1 ('MetaData "TasksDAG" "Napkin.Spec.Graph.TasksDAGGraph" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'True) (C1 ('MetaCons "TasksDAG" 'PrefixI 'True) (S1 ('MetaSel ('Just "nodes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map TaskId (Task (Executable b))))))

data Exec #

data Table #

data Full #

data HookResult (bk :: k) #

Constructors

HookError (NonEmpty AssertionEntry)

Fatal Assertions

HookOk [AssertionEntry]

Warning Assertions

isOkHookResult :: forall {k} (bk :: k). HookResult bk -> Bool #

data TaskResult (bk :: k) #

Instances

Instances details
Generic (TaskResult bk) # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Associated Types

type Rep (TaskResult bk) 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

type Rep (TaskResult bk) = D1 ('MetaData "TaskResult" "Napkin.Spec.Graph.TasksDAGGraph" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) (C1 ('MetaCons "TableResult" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CreateQueryStats bk))) :+: (C1 ('MetaCons "HookResult" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HookResult bk)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HookQueryStats bk))) :+: C1 ('MetaCons "NullResult" 'PrefixI 'False) (U1 :: Type -> Type)))

Methods

from :: TaskResult bk -> Rep (TaskResult bk) x #

to :: Rep (TaskResult bk) x -> TaskResult bk #

type Rep (TaskResult bk) # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

type Rep (TaskResult bk) = D1 ('MetaData "TaskResult" "Napkin.Spec.Graph.TasksDAGGraph" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) (C1 ('MetaCons "TableResult" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CreateQueryStats bk))) :+: (C1 ('MetaCons "HookResult" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HookResult bk)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HookQueryStats bk))) :+: C1 ('MetaCons "NullResult" 'PrefixI 'False) (U1 :: Type -> Type)))

isOkTaskResult :: forall {k} {bk :: k}. TaskResult bk -> Bool #

getTaskResultStats :: forall {k} (bk :: k). HasBackendQueryStats bk => TaskResult bk -> QueryStats bk #

type TaskAsync (bk :: k) = Async (NominalDiffTime, Maybe (TaskResult bk)) #

type TasksDAGGraph (kind :: k) b = Gr (Task (Executable b)) () #

tasksToGraph :: forall {k} (kind :: k) b. TasksDAG kind b -> TasksDAGGraph kind b #

tableDownstream :: forall {k} (kind :: k) b. TasksDAGGraph kind b -> Set TaskId -> [Task (Executable b)] #

tableUpstream :: forall {k} (kind :: k) b. TasksDAGGraph kind b -> Set TaskId -> [Task (Executable b)] #

matchGraphTables :: forall {k} (kind :: k) b. TasksDAGGraph kind b -> (Task (Executable b) -> Bool) -> [Task (Executable b)] #

upstreamMap :: forall {k} (kind :: k) b. TasksDAG kind b -> Map TaskId (Set TaskId) #

downstreamMap :: forall {k} (kind :: k) b. TasksDAG kind b -> Map TaskId (Set TaskId, Set TaskId) #

topsort :: forall {k} (kind :: k) b. TasksDAG kind b -> [Task (Executable b)] #

topological graph nodes sort

subgraph :: TasksDAG Full b -> TaskId -> Maybe (Task (Executable b) -> Bool) -> [TaskId] #

transverse Entry node lists of tasks ids checking given property

tags :: Task (Executable b) -> [Text] #

entryNode :: Task (Executable b) -> Maybe [TaskId] #

if is entry node returns subgraph Ids

taskTypeDescription :: TaskType -> Text #

Node type description: Action, Pre Hook, Post Hook, Global Hook, Unmanaged

getDependenciesWithProp :: forall {k1} b (k2 :: k1). (Task (Executable b) -> Bool) -> TasksDAG k2 b -> Task (Executable b) -> Set TaskId #

transverse DAG upstream collecting first node's occurrences satisfying the given property

getDataDependencies :: forall {k1} (k2 :: k1) b. TasksDAG k2 b -> Task (Executable b) -> Set TaskId #

getDataDependenciesUnmanaged :: forall {k1} (k2 :: k1) b. TasksDAG k2 b -> Task (Executable b) -> Set TaskId #

tablesGraph :: forall {k} (a :: k) b. TasksDAG a b -> TasksDAG Table b #

just table tasks nodes graph, data dependencies and global hooks

tablesGraph' :: TasksDAG Full b -> TasksDAG Table b #

table and unmanaged tasks

cleanupGraph :: TasksDAG Full b -> TasksDAG Exec b #

clean up no runnable nodes, remove NullProgram or not #shouldRun nodes, modifying accordingly edges (optional step)

cleanupGraphProp :: forall {k1} b (k2 :: k1). (Task (Executable b) -> Bool) -> TasksDAG k2 b -> TasksDAG k2 b #

connectAsyncHooks :: forall {k} (t :: k) b. TasksDAG t b -> TasksDAG t b #

Connect async hooks to subgraph's exit node, used to fix async tasks with upstream table selectors