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
160
Issues
160
List
Board
Labels
Milestones
Merge Requests
14
Merge Requests
14
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
843c3f32
Commit
843c3f32
authored
Jun 19, 2024
by
Karen Konou
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix parsing of old phylo files
parent
e147c115
Pipeline
#6248
failed with stages
Changes
3
Pipelines
1
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 @
843c3f32
...
...
@@ -45,6 +45,8 @@ data CorpusParser =
Wos
{
_wos_limit
::
Int
}
|
Tsv
{
_tsv_limit
::
Int
}
|
Tsv'
{
_tsv'_limit
::
Int
}
|
Csv
{
_csv_limit
::
Int
}
|
Csv'
{
_csv'_limit
::
Int
}
deriving
(
Show
,
Generic
,
Eq
,
ToExpr
)
instance
ToSchema
CorpusParser
where
...
...
@@ -727,6 +729,8 @@ instance Arbitrary CorpusParser where
arbitrary
=
oneof
[
Wos
<$>
arbitrary
,
Tsv
<$>
arbitrary
,
Tsv'
<$>
arbitrary
,
Csv
<$>
arbitrary
,
Csv'
<$>
arbitrary
]
instance
Arbitrary
ListParser
where
...
...
test-data/phylo/cleopatre.golden.csv.json
0 → 100644
View file @
843c3f32
This diff is collapsed.
Click to expand it.
test/Test/Offline/Phylo.hs
View file @
843c3f32
...
...
@@ -13,7 +13,7 @@ import Data.Text.Lazy as TL
import
Data.TreeDiff
import
Data.Vector
qualified
as
V
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.API.Tools
(
readPhylo
,
phylo2dot2json
)
import
Gargantext.Core.Viz.Phylo.Example
qualified
as
Cleopatre
...
...
@@ -69,6 +69,7 @@ tests = testGroup "Phylo" [
,
testGroup
"relatedComponents"
[
testCase
"finds simple connection"
testRelComp_Connected
]
,
testCase
"parses csv phylo"
testCsvPhylo
]
testCleopatreWithoutLinkExpectedOutput
::
Assertion
...
...
@@ -248,3 +249,11 @@ testToPhyloDeterminism = do
let
actual
=
setConfig
phyloTestConfig
$
toPhylo
$
toPhyloWithoutLink
corpus
config
expected
<-
setConfig
phyloTestConfig
<$>
(
readPhylo
=<<
getDataFileName
"test-data/phylo/187481.json"
)
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
()
Przemyslaw Kaminski
@cgenie
mentioned in commit
5660aec0
·
Oct 08, 2024
mentioned in commit
5660aec0
mentioned in commit 5660aec07ec5a0a0a5468f440092c1a8f57a864e
Toggle commit list
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