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
-- Fix Filter parameters
-- TODO fix parameters to default config that should be in Node
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
let phyloData = fromMaybe phyloExample maybePhyloData
phyloJson <- liftBase $ phylo2dot2json phyloData
pure phyloJson
-- getPhylo phId _lId l msb = do
-- let
-- level = fromMaybe 2 l
......
......@@ -72,8 +72,8 @@ phylo2dot2json phylo = do
file_to_json = "/tmp/toPhylo.json"
_ <- dotToFile file_from (toPhyloExport phylo)
_ <- Shell.callProcess "/usr/bin/dot" ["-Tdot", "-o", file_dot, file_from]
_ <- Shell.callProcess "/usr/bin/dot" ["-Txdot_json", "-o", file_to_json, file_dot]
_ <- Shell.callProcess "dot" ["-Tdot", "-o", file_dot, file_from]
_ <- Shell.callProcess "dot" ["-Txdot_json", "-o", file_to_json, file_dot]
maybeValue <- decodeFileStrict file_to_json
......
......@@ -89,7 +89,9 @@ phyloCooc = docsToTimeScaleCooc docs (foundations ^. foundations_roots)
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
......
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