Commit 470e9716 authored by Alexandre Delanoë's avatar Alexandre Delanoë

Merge remote-tracking branch 'origin/580-dev-phylo-params' into dev

parents d1705f39 d4fcb126
......@@ -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):
......
......@@ -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
......@@ -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
......
......@@ -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"
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment