Commit 880785c0 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FIX] dot path

parent c7ae5797
Pipeline #2494 passed with stage
in 55 minutes and 9 seconds
#!/bin/bash
ln -s $(nix-shell --run "which dot") ~/.local/bin/dot
...@@ -90,12 +90,17 @@ type GetPhylo = QueryParam "listId" ListId ...@@ -90,12 +90,17 @@ type GetPhylo = QueryParam "listId" ListId
-- Fix Filter parameters -- Fix Filter parameters
-- TODO fix parameters to default config that should be in Node -- TODO fix parameters to default config that should be in Node
getPhylo :: PhyloId -> GargServer GetPhylo getPhylo :: PhyloId -> GargServer GetPhylo
getPhylo phyloId _lId _level _minSizeBranch = do getPhylo phyloId _lId _level _minSizeBranch = getPhyloDataJson phyloId
getPhyloDataJson :: PhyloId -> GargNoServer Value
getPhyloDataJson phyloId = do
maybePhyloData <- getPhyloData phyloId maybePhyloData <- getPhyloData phyloId
let phyloData = fromMaybe phyloExample maybePhyloData let phyloData = fromMaybe phyloExample maybePhyloData
phyloJson <- liftBase $ phylo2dot2json phyloData phyloJson <- liftBase $ phylo2dot2json phyloData
pure phyloJson pure phyloJson
-- getPhylo phId _lId l msb = do -- getPhylo phId _lId l msb = do
-- let -- let
-- level = fromMaybe 2 l -- level = fromMaybe 2 l
......
...@@ -72,8 +72,8 @@ phylo2dot2json phylo = do ...@@ -72,8 +72,8 @@ phylo2dot2json phylo = do
file_to_json = "/tmp/toPhylo.json" file_to_json = "/tmp/toPhylo.json"
_ <- dotToFile file_from (toPhyloExport phylo) _ <- dotToFile file_from (toPhyloExport phylo)
_ <- Shell.callProcess "/usr/bin/dot" ["-Tdot", "-o", file_dot, file_from] _ <- Shell.callProcess "dot" ["-Tdot", "-o", file_dot, file_from]
_ <- Shell.callProcess "/usr/bin/dot" ["-Txdot_json", "-o", file_to_json, file_dot] _ <- Shell.callProcess "dot" ["-Txdot_json", "-o", file_to_json, file_dot]
maybeValue <- decodeFileStrict file_to_json maybeValue <- decodeFileStrict file_to_json
......
...@@ -89,7 +89,9 @@ phyloCooc = docsToTimeScaleCooc docs (foundations ^. foundations_roots) ...@@ -89,7 +89,9 @@ phyloCooc = docsToTimeScaleCooc docs (foundations ^. foundations_roots)
periods :: [(Date,Date)] periods :: [(Date,Date)]
periods = toPeriods (sort $ nub $ map date docs) (getTimePeriod $ timeUnit config) (getTimeStep $ timeUnit config) periods = toPeriods (sort $ nub $ map date docs)
(getTimePeriod $ timeUnit config)
(getTimeStep $ timeUnit config)
nbDocsByYear :: Map Date Double nbDocsByYear :: Map Date Double
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment