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
702882d0
Commit
702882d0
authored
Jun 25, 2024
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev-phylo-csv-fix' into dev
parents
0087a0f8
843c3f32
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
1 deletion
+15
-1
Phylo.hs
src/Gargantext/Core/Viz/Phylo.hs
+4
-0
cleopatre.golden.csv.json
test-data/phylo/cleopatre.golden.csv.json
+1
-0
Phylo.hs
test/Test/Offline/Phylo.hs
+10
-1
No files found.
src/Gargantext/Core/Viz/Phylo.hs
View file @
702882d0
...
@@ -45,6 +45,8 @@ data CorpusParser =
...
@@ -45,6 +45,8 @@ data CorpusParser =
Wos
{
_wos_limit
::
Int
}
Wos
{
_wos_limit
::
Int
}
|
Tsv
{
_tsv_limit
::
Int
}
|
Tsv
{
_tsv_limit
::
Int
}
|
Tsv'
{
_tsv'_limit
::
Int
}
|
Tsv'
{
_tsv'_limit
::
Int
}
|
Csv
{
_csv_limit
::
Int
}
|
Csv'
{
_csv'_limit
::
Int
}
deriving
(
Show
,
Generic
,
Eq
,
ToExpr
)
deriving
(
Show
,
Generic
,
Eq
,
ToExpr
)
instance
ToSchema
CorpusParser
where
instance
ToSchema
CorpusParser
where
...
@@ -727,6 +729,8 @@ instance Arbitrary CorpusParser where
...
@@ -727,6 +729,8 @@ instance Arbitrary CorpusParser where
arbitrary
=
oneof
[
Wos
<$>
arbitrary
arbitrary
=
oneof
[
Wos
<$>
arbitrary
,
Tsv
<$>
arbitrary
,
Tsv
<$>
arbitrary
,
Tsv'
<$>
arbitrary
,
Tsv'
<$>
arbitrary
,
Csv
<$>
arbitrary
,
Csv'
<$>
arbitrary
]
]
instance
Arbitrary
ListParser
where
instance
Arbitrary
ListParser
where
...
...
test-data/phylo/cleopatre.golden.csv.json
0 → 100644
View file @
702882d0
This diff is collapsed.
Click to expand it.
test/Test/Offline/Phylo.hs
View file @
702882d0
...
@@ -13,7 +13,7 @@ import Data.Text.Lazy as TL
...
@@ -13,7 +13,7 @@ import Data.Text.Lazy as TL
import
Data.TreeDiff
import
Data.TreeDiff
import
Data.Vector
qualified
as
V
import
Data.Vector
qualified
as
V
import
Gargantext.Core.Text.List.Formats.TSV
import
Gargantext.Core.Text.List.Formats.TSV
import
Gargantext.Core.Types.Phylo
import
Gargantext.Core.Types.Phylo
hiding
(
Phylo
(
..
))
import
Gargantext.Core.Viz.Phylo
hiding
(
EdgeType
(
..
))
import
Gargantext.Core.Viz.Phylo
hiding
(
EdgeType
(
..
))
import
Gargantext.Core.Viz.Phylo.API.Tools
(
readPhylo
,
phylo2dot2json
)
import
Gargantext.Core.Viz.Phylo.API.Tools
(
readPhylo
,
phylo2dot2json
)
import
Gargantext.Core.Viz.Phylo.Example
qualified
as
Cleopatre
import
Gargantext.Core.Viz.Phylo.Example
qualified
as
Cleopatre
...
@@ -69,6 +69,7 @@ tests = testGroup "Phylo" [
...
@@ -69,6 +69,7 @@ tests = testGroup "Phylo" [
,
testGroup
"relatedComponents"
[
,
testGroup
"relatedComponents"
[
testCase
"finds simple connection"
testRelComp_Connected
testCase
"finds simple connection"
testRelComp_Connected
]
]
,
testCase
"parses csv phylo"
testCsvPhylo
]
]
testCleopatreWithoutLinkExpectedOutput
::
Assertion
testCleopatreWithoutLinkExpectedOutput
::
Assertion
...
@@ -248,3 +249,11 @@ testToPhyloDeterminism = do
...
@@ -248,3 +249,11 @@ testToPhyloDeterminism = do
let
actual
=
setConfig
phyloTestConfig
$
toPhylo
$
toPhyloWithoutLink
corpus
config
let
actual
=
setConfig
phyloTestConfig
$
toPhylo
$
toPhyloWithoutLink
corpus
config
expected
<-
setConfig
phyloTestConfig
<$>
(
readPhylo
=<<
getDataFileName
"test-data/phylo/187481.json"
)
expected
<-
setConfig
phyloTestConfig
<$>
(
readPhylo
=<<
getDataFileName
"test-data/phylo/187481.json"
)
assertBool
(
"Phylo mismatch! "
<>
show
(
ansiWlEditExprCompact
$
ediff
expected
actual
))
(
expected
==
actual
)
assertBool
(
"Phylo mismatch! "
<>
show
(
ansiWlEditExprCompact
$
ediff
expected
actual
))
(
expected
==
actual
)
testCsvPhylo
::
Assertion
testCsvPhylo
=
do
pth
<-
getDataFileName
"test-data/phylo/cleopatre.golden.csv.json"
phyloJson
<-
eitherDecodeFileStrict'
@
Phylo
pth
case
phyloJson
of
Left
err
->
error
err
Right
_
->
pure
()
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