Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
152
Issues
152
List
Board
Labels
Milestones
Merge Requests
9
Merge Requests
9
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
gargantext
haskell-gargantext
Commits
cdcf9903
Commit
cdcf9903
authored
May 24, 2021
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[test] fix tests
parent
dc10d9c3
Pipeline
#1465
failed with stage
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
10 deletions
+14
-10
Distance.hs
src-test/Graph/Distance.hs
+2
-1
Date.hs
src-test/Parsers/Date.hs
+1
-1
Crypto.hs
src-test/Utils/Crypto.hs
+2
-0
Tools.hs
src/Gargantext/Core/Viz/Graph/Tools.hs
+9
-8
No files found.
src-test/Graph/Distance.hs
View file @
cdcf9903
...
...
@@ -16,7 +16,8 @@ commentary with @some markup@.
module
Graph.Distance
where
import
Test.Hspec
import
Gargantext.Viz.Graph.Distances.Matrice
import
Gargantext.Core.Methods.Matrix.Accelerate.Utils
(
cross'
,
matrix
)
import
Gargantext.Prelude
test
::
IO
()
...
...
src-test/Parsers/Date.hs
View file @
cdcf9903
...
...
@@ -28,7 +28,7 @@ import Duckling.Time.Types (toRFC3339)
-----------------------------------------------------------
import
Gargantext.Prelude
import
Gargantext.Text.Corpus.Parsers.Date.Parsec
(
fromRFC3339
)
import
Gargantext.
Core.
Text.Corpus.Parsers.Date.Parsec
(
fromRFC3339
)
import
Parsers.Types
-----------------------------------------------------------
...
...
src-test/Utils/Crypto.hs
View file @
cdcf9903
...
...
@@ -14,7 +14,9 @@ module Utils.Crypto where
import
Data.Text
(
Text
)
import
Test.Hspec
import
Gargantext.Prelude
import
Gargantext.Prelude.Crypto.Hash
import
Gargantext.Prelude.Utils
-- | Crypto Hash tests
...
...
src/Gargantext/Core/Viz/Graph/Tools.hs
View file @
cdcf9903
...
...
@@ -69,6 +69,7 @@ cooc2graph' distance threshold myCooc
data
PartitionMethod
=
Louvain
|
Spinglass
-- | coocurrences graph computation
cooc2graphWith
::
PartitionMethod
->
Distance
->
Threshold
...
...
@@ -134,14 +135,14 @@ cooc2graphWith' doPartitions distance threshold myCooc = do
similarities
=
measure
distance
matCooc
links
=
round
(
let
n
::
Double
=
fromIntegral
tiSize
in
n
*
log
n
)
distanceMap
=
Map
.
fromList
$
List
.
take
links
$
List
.
sortOn
snd
$
Map
.
toList
$
case
distance
of
Conditional
->
Map
.
filter
(
>
threshold
)
Distributional
->
Map
.
filter
(
>
0
)
$
mat2map
similarities
distanceMap
=
Map
.
fromList
$
List
.
take
links
$
List
.
sortOn
snd
$
Map
.
toList
$
case
distance
of
Conditional
->
Map
.
filter
(
>
threshold
)
Distributional
->
Map
.
filter
(
>
0
)
$
mat2map
similarities
nodesApprox
::
Int
nodesApprox
=
n'
...
...
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