Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- type TableName = Ref Table
- newtype YAMLTask = YAMLTask {
- unYAMLTask :: Text
- data Artifact
- getArtifact :: Artifact -> TableName
- getArtifactName :: Artifact -> Text
- data TableTaskType
- = CreateAction [UpdateStrategy]
- | Entry [TaskId]
- | Exit
- | PreHook Int
- | PostHook Int
- data TaskType
- data Label
- printLabel :: Label -> Text
- data ForceTable
- isSkipped :: ForceTable -> Bool
- data ExecutionReason
- isForcedSkipped :: ExecutionReason -> Bool
- data Task payload = Task {
- taskId :: TaskId
- payload :: payload
- labels :: Set Label
- dependencies :: Set TaskId
- subgraphEntryId :: TaskId
- subgraphExitId :: TaskId
- shouldRun :: Bool
- executionReason :: ExecutionReason
- taskType :: TaskType
- prettyTaskName :: (Ref Table -> Ref Table) -> Task (Executable b) -> Text
- hasNodeLabel :: (Label -> Bool) -> Task payload -> Bool
- newtype TasksDAG kind b = TasksDAG {
- nodes :: Map TaskId (Task (Executable b))
- data Exec
- data Table
- data Full
- data Executable b
- = SpecProgram (SpecProgram b)
- | HookProgram (HookProgram b)
- | GlobalHookProgram (GlobalHookProgram b)
- | NullProgram
- isExecutable :: Executable b -> Bool
- data HookResult bk
- isOkHookResult :: HookResult bk -> Bool
- data TaskResult bk
- = TableResult (CreateQueryStats bk)
- | HookResult (HookResult bk) (HookQueryStats bk)
- | NullResult
- isOkTaskResult :: forall {k} {bk :: k}. TaskResult bk -> Bool
- getTaskResultStats :: HasBackendQueryStats bk => TaskResult bk -> QueryStats bk
- getAssertions :: HasBackendQueryStats bk => TaskResult bk -> Maybe (NonEmpty AssertionEntry)
- type TaskResultWithExc bk = Either SomeException (NominalDiffTime, TaskResult bk)
- type TaskResultWithExc' bk = Either SomeException (NominalDiffTime, Maybe (TaskResult bk))
- type TaskAsync bk = Async (NominalDiffTime, Maybe (TaskResult bk))
- type TasksDAGGraph kind b = Gr (Task (Executable b)) ()
- tasksToGraph :: TasksDAG kind b -> TasksDAGGraph kind b
- tableDownstream :: TasksDAGGraph kind b -> Set TaskId -> [Task (Executable b)]
- tableUpstream :: TasksDAGGraph kind b -> Set TaskId -> [Task (Executable b)]
- matchGraphTables :: TasksDAGGraph kind b -> (Task (Executable b) -> Bool) -> [Task (Executable b)]
- topsort :: TasksDAG kind b -> [Task (Executable b)]
- subgraph :: TasksDAG Full b -> TaskId -> Maybe (Task (Executable b) -> Bool) -> [TaskId]
- yamlTask :: Task (Executable b) -> Maybe YAMLTask
- tags :: Task (Executable b) -> [Text]
- unmanaged :: Task (Executable b) -> Maybe TableName
- createAction :: Task (Executable b) -> Maybe (TableName, [UpdateStrategy])
- tableNode :: Task (Executable b) -> Maybe TableName
- preHookNode :: Task (Executable b) -> Maybe Int
- postHookNode :: Task (Executable b) -> Maybe Int
- globalHookNode :: Task (Executable b) -> Maybe Text
- hookNode :: Task (Executable b) -> Bool
- tableTask :: Task (Executable b) -> Maybe TableName
- tableTaskType :: Task (Executable b) -> Maybe TableTaskType
- actionNode :: Task (Executable b) -> Bool
- isGlobalHookNode :: Task (Executable b) -> Bool
- isEntryNode :: Task (Executable b) -> Bool
- entryNode :: Task (Executable b) -> Maybe [TaskId]
- isExitNode :: Task (Executable b) -> Bool
- tableTaskTypeDescription :: TableTaskType -> Text
- taskTypeDescription :: TaskType -> Text
- getDependenciesWithProp :: (Task (Executable b) -> Bool) -> TasksDAG k b -> Task (Executable b) -> Set TaskId
- getDataDependencies :: TasksDAG k b -> Task (Executable b) -> Set TaskId
- getDataDependenciesUnmanaged :: TasksDAG k b -> Task (Executable b) -> Set TaskId
- tablesGraph :: TasksDAG a b -> TasksDAG Table b
- tablesGraph' :: TasksDAG Full b -> TasksDAG Table b
- cleanupGraph :: TasksDAG Full b -> TasksDAG Exec b
- cleanupSkipped :: TasksDAG k b -> TasksDAG k b
- cleanupGraphProp :: (Task (Executable b) -> Bool) -> TasksDAG k b -> TasksDAG k b
- unmanagedTables :: TasksDAG Full b -> Set SpecTableName
- tablesForUpdate :: TasksDAG Full b -> Set SpecTableName
- tasksForUpdate :: TasksDAG Full b -> [Task (Executable b)]
- noUpdatedDepsFromTablesForUpdate :: TasksDAG Full b -> Set SpecTableName
Documentation
getArtifact :: Artifact -> TableName #
getArtifactName :: Artifact -> Text #
data TableTaskType #
CreateAction [UpdateStrategy] | |
Entry [TaskId] | subgraph tasks Ids |
Exit | |
PreHook Int | |
PostHook Int |
Instances
Instances
Generic TaskType # | |
Eq TaskType # | |
Ord TaskType # | |
Defined in Napkin.Spec.Graph.TasksDAGGraph | |
type Rep TaskType # | |
Defined in Napkin.Spec.Graph.TasksDAGGraph type Rep TaskType = D1 ('MetaData "TaskType" "Napkin.Spec.Graph.TasksDAGGraph" "napkin-1.0.0-B79azc00rn1K8mj00hwhwG" 'False) (C1 ('MetaCons "Unmanaged" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TableName)) :+: (C1 ('MetaCons "TableTask" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TableName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TableTaskType)) :+: C1 ('MetaCons "GlobalHook" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))) |
Instances
Generic Label # | |
Eq Label # | |
Ord Label # | |
type Rep Label # | |
Defined in Napkin.Spec.Graph.TasksDAGGraph type Rep Label = D1 ('MetaData "Label" "Napkin.Spec.Graph.TasksDAGGraph" "napkin-1.0.0-B79azc00rn1K8mj00hwhwG" 'False) ((C1 ('MetaCons "Input" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Artifact)) :+: C1 ('MetaCons "Output" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Artifact))) :+: (C1 ('MetaCons "Tag" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: C1 ('MetaCons "YAMLTaskLabel" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 YAMLTask)))) |
printLabel :: Label -> Text #
data ForceTable #
Instances
Show ForceTable # | |
Defined in Napkin.Spec.Graph.TasksDAGGraph showsPrec :: Int -> ForceTable -> ShowS # show :: ForceTable -> String # showList :: [ForceTable] -> ShowS # | |
Eq ForceTable # | |
Defined in Napkin.Spec.Graph.TasksDAGGraph (==) :: ForceTable -> ForceTable -> Bool # (/=) :: ForceTable -> ForceTable -> Bool # |
isSkipped :: ForceTable -> Bool #
data ExecutionReason #
Instances
Show ExecutionReason # | |
Defined in Napkin.Spec.Graph.TasksDAGGraph showsPrec :: Int -> ExecutionReason -> ShowS # show :: ExecutionReason -> String # showList :: [ExecutionReason] -> ShowS # | |
Eq ExecutionReason # | |
Defined in Napkin.Spec.Graph.TasksDAGGraph (==) :: ExecutionReason -> ExecutionReason -> Bool # (/=) :: ExecutionReason -> ExecutionReason -> Bool # |
isForcedSkipped :: ExecutionReason -> Bool #
Task | |
|
Instances
prettyTaskName :: (Ref Table -> Ref Table) -> Task (Executable b) -> Text #
Instances
Generic (TasksDAG kind b) # | |
Default (TasksDAG kind b) # | |
Defined in Napkin.Spec.Graph.TasksDAGGraph | |
type Rep (TasksDAG kind b) # | |
Defined in Napkin.Spec.Graph.TasksDAGGraph type Rep (TasksDAG kind b) = D1 ('MetaData "TasksDAG" "Napkin.Spec.Graph.TasksDAGGraph" "napkin-1.0.0-B79azc00rn1K8mj00hwhwG" 'True) (C1 ('MetaCons "TasksDAG" 'PrefixI 'True) (S1 ('MetaSel ('Just "nodes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map TaskId (Task (Executable b)))))) |
data Executable b #
isExecutable :: Executable b -> Bool #
data HookResult bk #
HookError (NonEmpty AssertionEntry) | Fatal Assertions |
HookOk [AssertionEntry] | Warning Assertions |
isOkHookResult :: HookResult bk -> Bool #
data TaskResult bk #
TableResult (CreateQueryStats bk) | |
HookResult (HookResult bk) (HookQueryStats bk) | |
NullResult |
Instances
Generic (TaskResult bk) # | |
Defined in Napkin.Spec.Graph.TasksDAGGraph type Rep (TaskResult bk) :: Type -> Type # from :: TaskResult bk -> Rep (TaskResult bk) x # to :: Rep (TaskResult bk) x -> TaskResult bk # | |
type Rep (TaskResult bk) # | |
Defined in Napkin.Spec.Graph.TasksDAGGraph type Rep (TaskResult bk) = D1 ('MetaData "TaskResult" "Napkin.Spec.Graph.TasksDAGGraph" "napkin-1.0.0-B79azc00rn1K8mj00hwhwG" '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 :: HasBackendQueryStats bk => TaskResult bk -> QueryStats bk #
getAssertions :: HasBackendQueryStats bk => TaskResult bk -> Maybe (NonEmpty AssertionEntry) #
type TaskResultWithExc bk = Either SomeException (NominalDiffTime, TaskResult bk) #
type TaskResultWithExc' bk = Either SomeException (NominalDiffTime, Maybe (TaskResult bk)) #
type TaskAsync bk = Async (NominalDiffTime, Maybe (TaskResult bk)) #
type TasksDAGGraph kind b = Gr (Task (Executable b)) () #
tasksToGraph :: TasksDAG kind b -> TasksDAGGraph kind b #
tableDownstream :: TasksDAGGraph kind b -> Set TaskId -> [Task (Executable b)] #
tableUpstream :: TasksDAGGraph kind b -> Set TaskId -> [Task (Executable b)] #
matchGraphTables :: TasksDAGGraph kind b -> (Task (Executable b) -> Bool) -> [Task (Executable b)] #
topsort :: 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] #
createAction :: Task (Executable b) -> Maybe (TableName, [UpdateStrategy]) #
preHookNode :: Task (Executable b) -> Maybe Int #
postHookNode :: Task (Executable b) -> Maybe Int #
globalHookNode :: Task (Executable b) -> Maybe Text #
hookNode :: Task (Executable b) -> Bool #
tableTaskType :: Task (Executable b) -> Maybe TableTaskType #
actionNode :: Task (Executable b) -> Bool #
isGlobalHookNode :: Task (Executable b) -> Bool #
isEntryNode :: Task (Executable b) -> Bool #
isExitNode :: Task (Executable b) -> Bool #
taskTypeDescription :: TaskType -> Text #
Node type description: Action, Pre Hook, Post Hook, Global Hook, Unmanaged
getDependenciesWithProp :: (Task (Executable b) -> Bool) -> TasksDAG k b -> Task (Executable b) -> Set TaskId #
transverse DAG upstream collecting first node's occurrences satisfying the given property
getDataDependencies :: TasksDAG k b -> Task (Executable b) -> Set TaskId #
getDataDependenciesUnmanaged :: TasksDAG k b -> Task (Executable b) -> Set TaskId #
tablesGraph :: TasksDAG a b -> TasksDAG Table b #
just table tasks nodes graph, data dependencies and global hooks
cleanupGraph :: TasksDAG Full b -> TasksDAG Exec b #
clean up no runnable nodes, remove NullProgram or not #shouldRun nodes, modifying accordingly edges (optional step)
cleanupSkipped :: TasksDAG k b -> TasksDAG k b #
cleanupGraphProp :: (Task (Executable b) -> Bool) -> TasksDAG k b -> TasksDAG k b #
unmanagedTables :: TasksDAG Full b -> Set SpecTableName #
tablesForUpdate :: TasksDAG Full b -> Set SpecTableName #
tasksForUpdate :: TasksDAG Full b -> [Task (Executable b)] #