Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Przemyslaw Kaminski
haskell-gargantext
Commits
d3bc8c5e
Commit
d3bc8c5e
authored
Jan 11, 2022
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into dev-docs-download
parents
4baef92d
5e849411
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
16 deletions
+21
-16
CHANGELOG.md
CHANGELOG.md
+3
-0
package.yaml
package.yaml
+1
-1
Update.hs
src/Gargantext/API/Node/Update.hs
+2
-2
API.hs
src/Gargantext/Core/Viz/Graph/API.hs
+15
-13
No files found.
CHANGELOG.md
View file @
d3bc8c5e
## Version 0.0.4.9.9.3
*
[
BACK
]
Graph update with force option
## Version 0.0.4.9.9.2
*
[
BACK
]
Opaleye Upgrade
...
...
package.yaml
View file @
d3bc8c5e
name
:
gargantext
version
:
'
0.0.4.9.9.
2
'
version
:
'
0.0.4.9.9.
3
'
synopsis
:
Search, map, share
description
:
Please see README.md
category
:
Data
...
...
src/Gargantext/API/Node/Update.hs
View file @
d3bc8c5e
...
...
@@ -36,7 +36,7 @@ import Gargantext.Database.Admin.Types.Node
import
Gargantext.Database.Query.Table.Node
(
getNode
)
import
Gargantext.Database.Schema.Node
(
node_parent_id
)
import
Gargantext.Database.Schema.Ngrams
(
NgramsType
(
NgramsTerms
))
import
Gargantext.Prelude
(
Ord
,
Eq
,
(
<$>
),
(
$
),
liftBase
,
(
.
),
printDebug
,
pure
,
show
,
cs
,
(
<>
),
panic
)
import
Gargantext.Prelude
(
Bool
(
..
),
Ord
,
Eq
,
(
<$>
),
(
$
),
liftBase
,
(
.
),
printDebug
,
pure
,
show
,
cs
,
(
<>
),
panic
)
import
qualified
Gargantext.Utils.Aeson
as
GUA
import
Prelude
(
Enum
,
Bounded
,
minBound
,
maxBound
)
import
Servant
...
...
@@ -95,7 +95,7 @@ updateNode uId nId (UpdateNodeParamsGraph metric) logStatus = do
,
_scst_events
=
Just
[]
}
_
<-
recomputeGraph
uId
nId
(
Just
metric
)
_
<-
recomputeGraph
uId
nId
(
Just
metric
)
True
pure
JobLog
{
_scst_succeeded
=
Just
2
,
_scst_failed
=
Just
0
...
...
src/Gargantext/Core/Viz/Graph/API.hs
View file @
d3bc8c5e
...
...
@@ -120,8 +120,9 @@ recomputeGraph :: FlowCmdM env err m
=>
UserId
->
NodeId
->
Maybe
GraphMetric
->
Bool
->
m
Graph
recomputeGraph
_uId
nId
maybeDistance
=
do
recomputeGraph
_uId
nId
maybeDistance
force
=
do
nodeGraph
<-
getNodeWith
nId
(
Proxy
::
Proxy
HyperdataGraph
)
let
graph
=
nodeGraph
^.
node_hyperdata
.
hyperdataGraph
...
...
@@ -142,21 +143,22 @@ recomputeGraph _uId nId maybeDistance = do
repo
<-
getRepo'
[
listId
]
let
v
=
repo
^.
unNodeStory
.
at
listId
.
_Just
.
a_version
let
computeG
mt
=
do
g
<-
computeGraph
cId
similarity
NgramsTerms
repo
let
g'
=
set
graph_metadata
mt
g
_
<-
updateHyperdata
nId
(
HyperdataGraph
(
Just
g'
)
camera
)
pure
g'
case
graph
of
Nothing
->
do
graph'
<-
computeGraph
cId
similarity
NgramsTerms
repo
mt
<-
defaultGraphMetadata
cId
"Title"
repo
(
fromMaybe
Order1
maybeDistance
)
let
graph''
=
set
graph_metadata
(
Just
mt
)
graph'
_
<-
updateHyperdata
nId
(
HyperdataGraph
(
Just
graph''
)
camera
)
pure
$
trace
"[G.V.G.API.recomputeGraph] Graph empty, computed"
graph''
Just
graph'
->
if
listVersion
==
Just
v
g
<-
computeG
$
Just
mt
pure
$
trace
"[G.V.G.API.recomputeGraph] Graph empty, computed"
g
Just
graph'
->
if
(
listVersion
==
Just
v
)
&&
(
not
force
)
then
pure
graph'
else
do
graph''
<-
computeGraph
cId
similarity
NgramsTerms
repo
let
graph'''
=
set
graph_metadata
graphMetadata
graph''
_
<-
updateHyperdata
nId
(
HyperdataGraph
(
Just
graph'''
)
camera
)
pure
$
trace
"[G.V.G.API] Graph exists, recomputing"
graph'''
g
<-
computeG
graphMetadata
pure
$
trace
"[G.V.G.API] Graph exists, recomputing"
g
computeGraph
::
FlowCmdM
env
err
m
...
...
@@ -242,7 +244,7 @@ graphRecompute u n logStatus = do
,
_scst_remaining
=
Just
1
,
_scst_events
=
Just
[]
}
_g
<-
trace
(
show
u
)
$
recomputeGraph
u
n
Nothing
_g
<-
trace
(
show
u
)
$
recomputeGraph
u
n
Nothing
False
pure
JobLog
{
_scst_succeeded
=
Just
1
,
_scst_failed
=
Just
0
,
_scst_remaining
=
Just
0
...
...
@@ -297,7 +299,7 @@ recomputeVersions :: FlowCmdM env err m
=>
UserId
->
NodeId
->
m
Graph
recomputeVersions
uId
nId
=
recomputeGraph
uId
nId
Nothing
recomputeVersions
uId
nId
=
recomputeGraph
uId
nId
Nothing
False
------------------------------------------------------------
graphClone
::
UserId
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment