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
470e9716
Commit
470e9716
authored
Feb 12, 2024
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/580-dev-phylo-params' into dev
parents
d1705f39
d4fcb126
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
160 additions
and
2 deletions
+160
-2
README.md
README.md
+12
-0
Phylo.hs
src/Gargantext/Core/Viz/Phylo.hs
+78
-0
API.hs
src/Gargantext/Core/Viz/Phylo/API.hs
+1
-1
open_science.json
test-data/phylo/open_science.json
+69
-1
No files found.
README.md
View file @
470e9716
...
...
@@ -189,6 +189,18 @@ From the Backend root folder (haskell-gargantext):
For frontend development and compilation, see the [Frontend Readme.md](https://gitlab.iscpif.fr/gargantext/purescript-gargantext#dev)
### Running tests
From nix shell:
```
cabal v2-test --test-show-details=streaming
```
Or, from "outside":
```
nix-shell --run "cabal v2-test --test-show-details=streaming"
```
### Working on libraries
When a devlopment is needed on libraries (for instance, the HAL crawler in https://gitlab.iscpif.fr/gargantext/crawlers):
...
...
src/Gargantext/Core/Viz/Phylo.hs
View file @
470e9716
...
...
@@ -37,6 +37,8 @@ import Data.Vector (Vector)
import
Gargantext.Core.Utils.Prefix
(
unPrefix
)
import
Gargantext.Core.Utils.Prefix
(
unPrefixSwagger
)
import
Gargantext.Prelude
import
Test.QuickCheck
import
Test.QuickCheck.Instances.Text
()
---------------------
-- | PhyloConfig | --
...
...
@@ -678,3 +680,79 @@ instance NFData Sort
instance
NFData
Tagger
instance
NFData
PhyloLabel
-- Arbitrary instances
instance
Arbitrary
PhyloConfig
where
arbitrary
=
PhyloConfig
<$>
arbitrary
<*>
arbitrary
<*>
arbitrary
<*>
arbitrary
<*>
arbitrary
<*>
arbitrary
<*>
arbitrary
<*>
arbitrary
<*>
arbitrary
<*>
arbitrary
<*>
arbitrary
<*>
arbitrary
<*>
arbitrary
<*>
arbitrary
<*>
arbitrary
<*>
vectorOf
10
arbitrary
<*>
arbitrary
<*>
vectorOf
10
arbitrary
instance
Arbitrary
CorpusParser
where
arbitrary
=
oneof
[
Wos
<$>
arbitrary
,
Csv
<$>
arbitrary
,
Csv'
<$>
arbitrary
]
instance
Arbitrary
ListParser
where
arbitrary
=
elements
[
V3
,
V4
]
instance
Arbitrary
PhyloSimilarity
where
arbitrary
=
oneof
[
WeightedLogJaccard
<$>
arbitrary
<*>
arbitrary
,
WeightedLogSim
<$>
arbitrary
<*>
arbitrary
,
Hamming
<$>
arbitrary
<*>
arbitrary
]
instance
Arbitrary
SeaElevation
where
arbitrary
=
oneof
[
Constante
<$>
arbitrary
<*>
arbitrary
,
Adaptative
<$>
arbitrary
,
Evolving
<$>
arbitrary
]
instance
Arbitrary
Synchrony
where
arbitrary
=
oneof
[
ByProximityThreshold
<$>
arbitrary
<*>
arbitrary
<*>
arbitrary
<*>
arbitrary
,
ByProximityDistribution
<$>
arbitrary
<*>
arbitrary
]
instance
Arbitrary
SynchronyScope
where
arbitrary
=
elements
[
SingleBranch
,
SiblingBranches
,
AllBranches
]
instance
Arbitrary
SynchronyStrategy
where
arbitrary
=
elements
[
MergeRegularGroups
,
MergeAllGroups
]
instance
Arbitrary
Quality
where
arbitrary
=
Quality
<$>
arbitrary
<*>
arbitrary
instance
Arbitrary
TimeUnit
where
arbitrary
=
oneof
[
Epoch
<$>
arbitrary
<*>
arbitrary
<*>
arbitrary
,
Year
<$>
arbitrary
<*>
arbitrary
<*>
arbitrary
,
Month
<$>
arbitrary
<*>
arbitrary
<*>
arbitrary
,
Week
<$>
arbitrary
<*>
arbitrary
<*>
arbitrary
,
Day
<$>
arbitrary
<*>
arbitrary
<*>
arbitrary
]
instance
Arbitrary
Cluster
where
arbitrary
=
oneof
[
Fis
<$>
arbitrary
<*>
arbitrary
,
MaxClique
<$>
arbitrary
<*>
arbitrary
<*>
arbitrary
]
instance
Arbitrary
MaxCliqueFilter
where
arbitrary
=
elements
[
ByThreshold
,
ByNeighbours
]
instance
Arbitrary
PhyloLabel
where
arbitrary
=
oneof
[
BranchLabel
<$>
arbitrary
<*>
arbitrary
,
GroupLabel
<$>
arbitrary
<*>
arbitrary
]
instance
Arbitrary
Tagger
where
arbitrary
=
elements
[
MostInclusive
,
MostEmergentInclusive
,
MostEmergentTfIdf
]
instance
Arbitrary
Sort
where
arbitrary
=
oneof
[
ByBirthDate
<$>
arbitrary
,
ByHierarchy
<$>
arbitrary
]
instance
Arbitrary
Order
where
arbitrary
=
elements
[
Asc
,
Desc
]
instance
Arbitrary
Filter
where
arbitrary
=
ByBranchSize
<$>
arbitrary
src/Gargantext/Core/Viz/Phylo/API.hs
View file @
470e9716
...
...
@@ -198,7 +198,7 @@ putPhylo = undefined
-- instance Arbitrary Phylo where arbitrary = elements [phylo]
instance
Arbitrary
PhyloGroup
where
arbitrary
=
elements
[]
-- instance Arbitrary PhyloView where arbitrary = elements [phyloView]
instance
Arbitrary
PhyloConfig
where
arbitrary
=
elements
[]
--
instance Arbitrary PhyloConfig where arbitrary = elements []
instance
FromHttpApiData
DisplayMode
where
parseUrlPiece
=
readTextData
instance
FromHttpApiData
ExportMode
where
parseUrlPiece
=
readTextData
instance
FromHttpApiData
Filiation
where
parseUrlPiece
=
readTextData
...
...
test-data/phylo/open_science.json
View file @
470e9716
...
...
@@ -1314,5 +1314,73 @@
"phyloSeaRiseSteps"
:
"0.1"
},
"pd_listId"
:
185785
,
"pd_corpusId"
:
185783
"pd_corpusId"
:
185783
,
"pd_config"
:
{
"clique"
:
{
"_mcl_filter"
:
"ByThreshold"
,
"_mcl_size"
:
5
,
"_mcl_threshold"
:
1.0e-4
,
"tag"
:
"MaxClique"
},
"corpusParser"
:
{
"_csv_limit"
:
150000
,
"tag"
:
"Csv"
},
"corpusPath"
:
"corpus.csv"
,
"defaultMode"
:
false
,
"exportFilter"
:
[
{
"_branch_size"
:
3
}
],
"exportLabel"
:
[
{
"_branch_labelSize"
:
2
,
"_branch_labelTagger"
:
"MostEmergentTfIdf"
,
"tag"
:
"BranchLabel"
},
{
"_group_labelSize"
:
2
,
"_group_labelTagger"
:
"MostEmergentInclusive"
,
"tag"
:
"GroupLabel"
}
],
"exportSort"
:
{
"_sort_order"
:
"Desc"
,
"tag"
:
"ByHierarchy"
},
"findAncestors"
:
true
,
"listParser"
:
"V4"
,
"listPath"
:
"list.csv"
,
"outputPath"
:
"data/"
,
"phyloName"
:
"Phylo Name"
,
"phyloQuality"
:
{
"_qua_granularity"
:
0.8
,
"_qua_minBranch"
:
3
},
"phyloScale"
:
2
,
"phyloSynchrony"
:
{
"_bpt_scope"
:
"AllBranches"
,
"_bpt_sensibility"
:
0
,
"_bpt_strategy"
:
"MergeAllGroups"
,
"_bpt_threshold"
:
0.5
,
"tag"
:
"ByProximityThreshold"
},
"seaElevation"
:
{
"_cons_gap"
:
0.1
,
"_cons_start"
:
0.1
,
"tag"
:
"Constante"
},
"similarity"
:
{
"_wlj_minSharedNgrams"
:
2
,
"_wlj_sensibility"
:
0.5
,
"tag"
:
"WeightedLogJaccard"
},
"timeUnit"
:
{
"_year_matchingFrame"
:
5
,
"_year_period"
:
3
,
"_year_step"
:
1
,
"tag"
:
"Year"
}
}
}
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