Verified Commit e89238cb authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

Merge branch 'dev' into 571-dev-node-corpus-api-search-fixes-take-2

parents 8aeae22e f98437bf
Pipeline #4255 failed with stages
in 40 minutes and 7 seconds
......@@ -43,7 +43,7 @@ import Gargantext.Database.Query.Table.Node (defaultList, getNode)
import Gargantext.Database.Query.Table.Node.UpdateOpaleye (updateHyperdata)
import Gargantext.Database.Schema.Ngrams (NgramsType(NgramsTerms))
import Gargantext.Database.Schema.Node (node_parent_id)
import Gargantext.Prelude (Bool(..), Ord, Eq, (<$>), ($), {-printDebug,-} pure, show, cs, (<>), panic, (<*>))
import Gargantext.Prelude (Bool(..), Ord, Eq, (<$>), ($), printDebug, pure, show, cs, (<>), panic, (<*>))
import Gargantext.Utils.Jobs (serveJobsAPI, MonadJobStatus(..))
import Prelude (Enum, Bounded, minBound, maxBound)
import Servant
......@@ -155,25 +155,19 @@ updateNode _uId lId (UpdateNodeParamsList _mode) jobHandle = do
updateNode _userId phyloId (UpdateNodePhylo config) jobHandle = do
markStarted 3 jobHandle
corpusId' <- view node_parent_id <$> getNode phyloId
let corpusId = fromMaybe (panic "") corpusId'
phy <- flowPhyloAPI (subConfig2config config) corpusId
let corpusId = fromMaybe (panic "UpdateNodePhylo: no corpusId") corpusId'
let config' = subConfig2config config
printDebug "UpdateNodePhylo" config'
phy <- flowPhyloAPI config' corpusId
markProgress 1 jobHandle
_ <- updateHyperdata phyloId (HyperdataPhylo Nothing (Just phy))
markComplete jobHandle
updateNode _uId tId (UpdateNodeParamsTexts _mode) jobHandle = do
markStarted 3 jobHandle
corpusId <- view node_parent_id <$> getNode tId
lId <- defaultList $ fromMaybe (panic "[G.A.N.Update] updateNode/UpdateNodeParamsTexts: no defaultList") corpusId
markProgress 1 jobHandle
_ <- case corpusId of
......
......@@ -212,6 +212,7 @@ subConfig2config subConfig = defaultConfig { similarity = WeightedLogJaccard
, phyloQuality = Quality (_sc_phyloQuality subConfig) 1
, timeUnit = _sc_timeUnit subConfig
, clique = _sc_clique subConfig
, defaultMode = _sc_defaultMode subConfig
, exportFilter = [ByBranchSize $ _sc_exportFilter subConfig]
}
......@@ -230,9 +231,9 @@ defaultConfig =
, defaultMode = False
, findAncestors = False
, phyloSynchrony = ByProximityThreshold 0.5 0 AllBranches MergeAllGroups
, phyloQuality = Quality 0.5 1
, phyloQuality = Quality 0.3 1
, timeUnit = Year 3 1 5
, clique = MaxClique 5 0.0001 ByThreshold
, clique = Fis 3 1 -- MaxClique 5 0.0001 ByThreshold
, exportLabel = [BranchLabel MostEmergentTfIdf 2, GroupLabel MostEmergentInclusive 2]
, exportSort = ByHierarchy Desc
, exportFilter = [ByBranchSize 3]
......
......@@ -162,7 +162,7 @@ getPhyloDataJson phyloId = do
------------------------------------------------------------------------
type PostPhylo = QueryParam "listId" ListId
-- :> ReqBody '[JSON] PhyloQueryBuild
-- :> ReqBody '[JSON] PhyloQueryBuild
:> (Post '[JSON] NodeId)
postPhylo :: PhyloId -> UserId -> GargServer PostPhylo
......
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