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
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
Christian Merten
haskell-gargantext
Commits
5d253bb5
Commit
5d253bb5
authored
Mar 25, 2024
by
Alfredo Di Napoli
Committed by
Alfredo Di Napoli
Apr 02, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve a bit phylo tests
parent
977c1d25
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
11 deletions
+21
-11
gargantext.cabal
gargantext.cabal
+3
-2
cleopatre.golden.json
test-data/phylo/cleopatre.golden.json
+1
-0
issue-290-small.golden.json
test-data/phylo/issue-290-small.golden.json
+1
-1
small-phylo.golden.json
test-data/phylo/small-phylo.golden.json
+1
-1
Phylo.hs
test/Test/Offline/Phylo.hs
+14
-6
Main.hs
test/drivers/tasty/Main.hs
+1
-1
No files found.
gargantext.cabal
View file @
5d253bb5
...
@@ -36,8 +36,9 @@ data-files:
...
@@ -36,8 +36,9 @@ data-files:
test-data/ngrams/simple.json
test-data/ngrams/simple.json
test-data/ngrams/simple.csv
test-data/ngrams/simple.csv
test-data/phylo/bpa_phylo_test.json
test-data/phylo/bpa_phylo_test.json
test-data/phylo/
open_science
.json
test-data/phylo/
cleopatre.golden
.json
test-data/phylo/issue-290-small.golden.json
test-data/phylo/issue-290-small.golden.json
test-data/phylo/open_science.json
test-data/phylo/small-phylo.golden.json
test-data/phylo/small-phylo.golden.json
test-data/phylo/small_phylo_docslist.csv
test-data/phylo/small_phylo_docslist.csv
test-data/phylo/small_phylo_ngramslist.csv
test-data/phylo/small_phylo_ngramslist.csv
...
@@ -188,6 +189,7 @@ library
...
@@ -188,6 +189,7 @@ library
Gargantext.Core.Viz.Phylo
Gargantext.Core.Viz.Phylo
Gargantext.Core.Viz.Phylo.API
Gargantext.Core.Viz.Phylo.API
Gargantext.Core.Viz.Phylo.API.Tools
Gargantext.Core.Viz.Phylo.API.Tools
Gargantext.Core.Viz.Phylo.Example
Gargantext.Core.Viz.Phylo.PhyloExport
Gargantext.Core.Viz.Phylo.PhyloExport
Gargantext.Core.Viz.Phylo.PhyloMaker
Gargantext.Core.Viz.Phylo.PhyloMaker
Gargantext.Core.Viz.Phylo.PhyloTools
Gargantext.Core.Viz.Phylo.PhyloTools
...
@@ -353,7 +355,6 @@ library
...
@@ -353,7 +355,6 @@ library
Gargantext.Core.Viz.Graph.Tools.Infomap
Gargantext.Core.Viz.Graph.Tools.Infomap
Gargantext.Core.Viz.Graph.Utils
Gargantext.Core.Viz.Graph.Utils
Gargantext.Core.Viz.LegacyPhylo
Gargantext.Core.Viz.LegacyPhylo
Gargantext.Core.Viz.Phylo.Example
Gargantext.Core.Viz.Phylo.Legacy.LegacyMain
Gargantext.Core.Viz.Phylo.Legacy.LegacyMain
Gargantext.Core.Viz.Phylo.TemporalMatching
Gargantext.Core.Viz.Phylo.TemporalMatching
Gargantext.Data.HashMap.Strict.Utils
Gargantext.Data.HashMap.Strict.Utils
...
...
test-data/phylo/cleopatre.golden.json
0 → 100644
View file @
5d253bb5
This diff is collapsed.
Click to expand it.
test-data/phylo/issue-290-small.golden.json
View file @
5d253bb5
This diff is collapsed.
Click to expand it.
test-data/phylo/small-phylo.golden.json
View file @
5d253bb5
This diff is collapsed.
Click to expand it.
test/Test/Offline/Phylo.hs
View file @
5d253bb5
...
@@ -13,6 +13,7 @@ import Data.TreeDiff
...
@@ -13,6 +13,7 @@ import Data.TreeDiff
import
Data.Vector
qualified
as
V
import
Data.Vector
qualified
as
V
import
Gargantext.Core.Viz.Phylo
import
Gargantext.Core.Viz.Phylo
import
Gargantext.Core.Viz.Phylo.API.Tools
(
readPhylo
,
writePhylo
)
import
Gargantext.Core.Viz.Phylo.API.Tools
(
readPhylo
,
writePhylo
)
import
Gargantext.Core.Viz.Phylo.Example
qualified
as
Cleopatre
import
Gargantext.Core.Viz.Phylo.PhyloExport
import
Gargantext.Core.Viz.Phylo.PhyloExport
import
Gargantext.Core.Viz.Phylo.PhyloMaker
(
toPhylo
,
toPhyloWithoutLink
)
import
Gargantext.Core.Viz.Phylo.PhyloMaker
(
toPhylo
,
toPhyloWithoutLink
)
import
Gargantext.Core.Viz.Phylo.PhyloTools
import
Gargantext.Core.Viz.Phylo.PhyloTools
...
@@ -48,23 +49,30 @@ phyloConfig = PhyloConfig {
...
@@ -48,23 +49,30 @@ phyloConfig = PhyloConfig {
,
exportFilter
=
[
ByBranchSize
{
_branch_size
=
3.0
}]
,
exportFilter
=
[
ByBranchSize
{
_branch_size
=
3.0
}]
}
}
tests
::
TestTree
tests
::
HasCallStack
=>
TestTree
tests
=
testGroup
"Phylo"
[
tests
=
testGroup
"Phylo"
[
testGroup
"Export"
[
testGroup
"Export"
[
testCase
"ngramsToLabel respects encoding"
test_ngramsToLabel_01
testCase
"ngramsToLabel respects encoding"
test_ngramsToLabel_01
,
testCase
"ngramsToLabel is rendered correctly in CustomAttribute"
test_ngramsToLabel_02
,
testCase
"ngramsToLabel is rendered correctly in CustomAttribute"
test_ngramsToLabel_02
]
]
,
testGroup
"toPhyloWithoutLink"
[
,
testGroup
"toPhyloWithoutLink"
[
testProperty
"returns expected data"
testSmallPhyloWithoutLinkExpectedOutput
testProperty
"returns expected data"
testSmallPhyloWithoutLinkExpectedOutput
]
,
testProperty
"phyloCleopatre returns expected data"
testCleopatreWithoutLinkExpectedOutput
]
,
testGroup
"toPhylo"
[
,
testGroup
"toPhylo"
[
testProperty
"returns expected data"
testSmallPhyloExpectedOutput
--
testProperty "returns expected data" testSmallPhyloExpectedOutput
]
]
,
testGroup
"relatedComponents"
[
,
testGroup
"relatedComponents"
[
testCase
"finds simple connection"
testRelComp_Connected
testCase
"finds simple connection"
testRelComp_Connected
]
]
]
]
testCleopatreWithoutLinkExpectedOutput
::
HasCallStack
=>
Property
testCleopatreWithoutLinkExpectedOutput
=
monadicIO
$
do
actual
<-
pure
$
toPhyloWithoutLink
Cleopatre
.
docs
Cleopatre
.
config
expected
<-
run
$
readPhylo
=<<
getDataFileName
"test-data/phylo/cleopatre.golden.json"
pure
$
counterexample
(
show
$
ansiWlEditExpr
$
ediff'
expected
actual
)
(
expected
===
actual
)
testSmallPhyloWithoutLinkExpectedOutput
::
Property
testSmallPhyloWithoutLinkExpectedOutput
::
Property
testSmallPhyloWithoutLinkExpectedOutput
=
monadicIO
$
do
testSmallPhyloWithoutLinkExpectedOutput
=
monadicIO
$
do
bpaConfig
<-
run
$
getDataFileName
"bench-data/phylo/bpa-config.json"
bpaConfig
<-
run
$
getDataFileName
"bench-data/phylo/bpa-config.json"
...
@@ -85,8 +93,8 @@ testSmallPhyloWithoutLinkExpectedOutput = monadicIO $ do
...
@@ -85,8 +93,8 @@ testSmallPhyloWithoutLinkExpectedOutput = monadicIO $ do
testSmallPhyloExpectedOutput
::
Property
testSmallPhyloExpectedOutput
::
Property
testSmallPhyloExpectedOutput
=
monadicIO
$
do
testSmallPhyloExpectedOutput
=
monadicIO
$
do
issue290PhyloSmall
<-
run
$
setConfig
phyloConfig
<$>
(
readPhylo
=<<
getDataFileName
"bench-data/phylo/issue-290-small.json"
)
issue290PhyloSmall
<-
run
$
setConfig
phyloConfig
<$>
(
readPhylo
=<<
getDataFileName
"bench-data/phylo/issue-290-small.json"
)
expected
<-
run
$
readPhylo
=<<
getDataFileName
"test-data/phylo/issue-290-small.golden.json"
let
actual
=
toPhylo
issue290PhyloSmall
let
actual
=
toPhylo
issue290PhyloSmall
expected
<-
run
$
readPhylo
=<<
getDataFileName
"test-data/phylo/issue-290-small.golden.json"
pure
$
counterexample
(
show
$
ansiWlEditExpr
$
ediff'
expected
actual
)
(
expected
===
actual
)
pure
$
counterexample
(
show
$
ansiWlEditExpr
$
ediff'
expected
actual
)
(
expected
===
actual
)
test_ngramsToLabel_01
::
Assertion
test_ngramsToLabel_01
::
Assertion
...
...
test/drivers/tasty/Main.hs
View file @
5d253bb5
...
@@ -29,7 +29,7 @@ import qualified Test.Core.Similarity as Similarity
...
@@ -29,7 +29,7 @@ import qualified Test.Core.Similarity as Similarity
import
Test.Tasty
import
Test.Tasty
import
Test.Tasty.Hspec
import
Test.Tasty.Hspec
main
::
IO
()
main
::
HasCallStack
=>
IO
()
main
=
do
main
=
do
utilSpec
<-
testSpec
"Utils"
Utils
.
test
utilSpec
<-
testSpec
"Utils"
Utils
.
test
clusteringSpec
<-
testSpec
"Graph Clustering"
Graph
.
test
clusteringSpec
<-
testSpec
"Graph Clustering"
Graph
.
test
...
...
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