Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
152
Issues
152
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
purescript-gargantext
Commits
5617ee80
Commit
5617ee80
authored
Oct 09, 2024
by
david Chavalarias
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
https://gitlab.iscpif.fr/gargantext/purescript-gargantext
into dev-david
parents
8f0e61d4
8343397e
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
346 additions
and
34 deletions
+346
-34
.gitignore
.gitignore
+1
-0
CHANGELOG.md
CHANGELOG.md
+246
-0
README.md
README.md
+3
-8
App.purs
src/Gargantext/Components/App/App.purs
+3
-2
Update.purs
...Gargantext/Components/Forest/Tree/Node/Action/Update.purs
+62
-8
Types.purs
...text/Components/Forest/Tree/Node/Action/Update/Types.purs
+26
-14
Settings.purs
src/Gargantext/Components/Forest/Tree/Node/Settings.purs
+2
-1
Store.purs
src/Gargantext/Components/GraphExplorer/Store.purs
+1
-1
Utils.purs
src/Gargantext/Utils.purs
+2
-0
No files found.
.gitignore
View file @
5617ee80
...
@@ -46,6 +46,7 @@ bundle.js
...
@@ -46,6 +46,7 @@ bundle.js
/.lesshst
/.lesshst
/dist/js/**/*.map
/dist/js/**/*.map
/dist/styles/**/*.map
/dist/styles/**/*.map
/dist/bundle.min.js*
# IDE specific
# IDE specific
.vscode
.vscode
CHANGELOG.md
0 → 100644
View file @
5617ee80
This diff is collapsed.
Click to expand it.
README.md
View file @
5617ee80
...
@@ -52,21 +52,16 @@ $ nix-env --version
...
@@ -52,21 +52,16 @@ $ nix-env --version
nix-env
(
Nix
)
2.11.0
nix-env
(
Nix
)
2.11.0
```
```
Enable de flake experimental feature :
```
shell
mkdir
~/.config/nix
echo
"experimental-features = nix-command flakes"
>
~/.config/nix/nix.conf
```
To build the frontend just execute the install script at the root at the project:
To build the frontend just execute the install script at the root at the project:
```
shell
```
shell
./install
./
bin/
install
```
```
Alternatively, you can use
```
shell
```
shell
nix
-L
develop
nix
-L
develop
```
```
and then run the
`npm`
commands manually.
**Local instance is ready!**
(Example: http://localhost:8000/)
**Local instance is ready!**
(Example: http://localhost:8000/)
...
...
src/Gargantext/Components/App/App.purs
View file @
5617ee80
...
@@ -15,7 +15,7 @@ import Gargantext.Hooks.FirstEffect (useFirstEffect')
...
@@ -15,7 +15,7 @@ import Gargantext.Hooks.FirstEffect (useFirstEffect')
import Gargantext.Router as Router
import Gargantext.Router as Router
import Gargantext.Sessions as Sessions
import Gargantext.Sessions as Sessions
import Gargantext.Types (CacheParams, defaultCacheParams)
import Gargantext.Types (CacheParams, defaultCacheParams)
import Gargantext.Utils (getter)
import Gargantext.Utils (getter
, host
)
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Reactix as R2
import Reactix as R
import Reactix as R
import Reactix.Utils as RU
import Reactix.Utils as RU
...
@@ -110,7 +110,8 @@ mainAppCpt = here.component "main" cpt where
...
@@ -110,7 +110,8 @@ mainAppCpt = here.component "main" cpt where
let session = Seq.head sessions
let session = Seq.head sessions
-- here.log2 "[mainApp] sessions" sessions'
-- here.log2 "[mainApp] sessions" sessions'
wsProto <- Notifications.wsProtocol
wsProto <- Notifications.wsProtocol
Notifications.connect ws (wsProto <> "://localhost:8008/ws") session
h <- host
Notifications.connect ws (wsProto <> "://" <> h <> "/ws") session
-- T.write_ ws boxes.wsNotification
-- T.write_ ws boxes.wsNotification
-- NOTE: Dummy subscription
-- NOTE: Dummy subscription
-- let action = NotificationsT.InsertCallback (NotificationsT.UpdateTree (-1)) "some-uuid" (\_ -> here.log "callback!")
-- let action = NotificationsT.InsertCallback (NotificationsT.UpdateTree (-1)) "some-uuid" (\_ -> here.log "callback!")
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Update.purs
View file @
5617ee80
...
@@ -2,7 +2,7 @@ module Gargantext.Components.Forest.Tree.Node.Action.Update where
...
@@ -2,7 +2,7 @@ module Gargantext.Components.Forest.Tree.Node.Action.Update where
import Gargantext.Prelude
import Gargantext.Prelude
import Gargantext.Components.Forest.Tree.Node.Action.Update.Types (Charts(..), Granularity(..), GraphMetric(..), Method(..), PartitionMethod(..), UpdateNodeParams(..), Strength(..), BridgenessMethod(..))
import Gargantext.Components.Forest.Tree.Node.Action.Update.Types (Charts(..), Granularity(..), GraphMetric(..), Method(..), PartitionMethod(..), UpdateNodeParams(..), Strength(..), BridgenessMethod(..)
, UpdateNodeConfigGraph(..)
)
import DOM.Simple.Console (log3)
import DOM.Simple.Console (log3)
import Data.Either (Either(..))
import Data.Either (Either(..))
...
@@ -52,6 +52,7 @@ updateCpt = here.component "update" cpt where
...
@@ -52,6 +52,7 @@ updateCpt = here.component "update" cpt where
cpt props@{ nodeType: NodeList } _ = pure $ updateNodeList props []
cpt props@{ nodeType: NodeList } _ = pure $ updateNodeList props []
cpt props@{ nodeType: NodeTexts } _ = pure $ updateTexts props []
cpt props@{ nodeType: NodeTexts } _ = pure $ updateTexts props []
cpt props@{ nodeType: Phylo } _ = pure $ updatePhylo props
cpt props@{ nodeType: Phylo } _ = pure $ updatePhylo props
cpt props@{ nodeType: Corpus } _ = pure $ updateCorpus props
cpt props@{ nodeType: _ } _ = pure $ updateOther props []
cpt props@{ nodeType: _ } _ = pure $ updateOther props []
updateDashboard :: R2.Component UpdateProps
updateDashboard :: R2.Component UpdateProps
...
@@ -100,13 +101,14 @@ updateGraphCpt = here.component "updateGraph" cpt where
...
@@ -100,13 +101,14 @@ updateGraphCpt = here.component "updateGraph" cpt where
callback :: Action -> Aff Unit
callback :: Action -> Aff Unit
callback = dispatch >=> \_ -> dispatch CloseBox
callback = dispatch >=> \_ -> dispatch CloseBox
let
action = UpdateNode $ UpdateNodeParams
Graph { methodGraphMetric: methodGraphMetric'
let
config = UpdateNodeConfig
Graph { methodGraphMetric: methodGraphMetric'
, methodGraphClustering: methodGraphClustering'
, methodGraphClustering: methodGraphClustering'
, methodGraphBridgeness: methodGraphBridgeness'
, methodGraphBridgeness: methodGraphBridgeness'
, methodGraphEdgesStrength : methodGraphEdgesStrength'
, methodGraphEdgesStrength : methodGraphEdgesStrength'
, methodGraphNodeType1 : methodGraphNodeType1'
, methodGraphNodeType1 : methodGraphNodeType1'
, methodGraphNodeType2 : methodGraphNodeType2'
, methodGraphNodeType2 : methodGraphNodeType2'
}
}
let action = UpdateNode $ UpdateNodeParamsGraph { methodGraph: config }
pure $
pure $
Tools.panelWithSubmitButton { action
Tools.panelWithSubmitButton { action
...
@@ -211,6 +213,58 @@ updatePhyloCpt = here.component "updatePhylo" cpt where
...
@@ -211,6 +213,58 @@ updatePhyloCpt = here.component "updatePhylo" cpt where
, status: Enabled
, status: Enabled
} `merge` parser.toFormData defaultData
} `merge` parser.toFormData defaultData
updateCorpus :: R2.Leaf UpdateProps
updateCorpus = R2.leaf updateCorpusCpt
updateCorpusCpt :: R.Component UpdateProps
updateCorpusCpt = here.component "updateTexts" cpt where
cpt { dispatch } _ = do
-- nodeList parameters
methodList <- T.useBox Basic
methodList' <- T.useLive T.unequal methodList
-- method for graph metric
methodGraphMetric <- T.useBox Order1
methodGraphMetric' <- T.useLive T.unequal methodGraphMetric
let graphConfig = UpdateNodeConfigGraph { methodGraphMetric: methodGraphMetric'
, methodGraphEdgesStrength: Strong
, methodGraphClustering: Spinglass
, methodGraphBridgeness: BridgenessMethod_Basic
, methodGraphNodeType1: GT.CTabTerms
, methodGraphNodeType2: GT.CTabTerms
}
let phyloConfig = Phylo.UpdateData { defaultMode: true
, proximity: 0.5
, synchrony: 0.5
, quality: 0.8
, exportFilter: 3.0
, timeUnit: Phylo.Year $ Phylo.TimeUnitCriteria
{ period: 3
, step: 1
, matchingFrame: 5
}
, clique: Phylo.MaxClique
{ size: 5
, threshold: 0.0001
, filter: Phylo.ByThreshold
}
}
let methodTexts = Both
pure $
Tools.panelWithSubmitButton { action: UpdateNode $ UpdateNodeParamsCorpus { methodTexts: methodTexts
, methodList: methodList' }
, dispatch
, mError: Nothing }
[ H.p { } [ H.text "Update both term and document indexing."]
, H.p { } [ H.text "Term update mode"
, Tools.formChoiceSafe { items: [Basic, Advanced, WithModel]
, default: methodList'
, callback: \val -> T.write_ val methodList
, print: show } [] ]
, H.text "If you also want to update a graph or a phylo, use the update action on the respective node."
]
updateNodeList :: R2.Component UpdateProps
updateNodeList :: R2.Component UpdateProps
updateNodeList = R.createElement updateNodeListCpt
updateNodeList = R.createElement updateNodeListCpt
updateNodeListCpt :: R.Component UpdateProps
updateNodeListCpt :: R.Component UpdateProps
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Update/Types.purs
View file @
5617ee80
...
@@ -10,17 +10,26 @@ import Gargantext.Types as GT
...
@@ -10,17 +10,26 @@ import Gargantext.Types as GT
import Simple.JSON as JSON
import Simple.JSON as JSON
import Simple.JSON.Generics as JSONG
import Simple.JSON.Generics as JSONG
newtype UpdateNodeConfigGraph = UpdateNodeConfigGraph { methodGraphMetric :: GraphMetric
data UpdateNodeParams
= UpdateNodeParamsList { methodList :: Method }
| UpdateNodeParamsGraph { methodGraphMetric :: GraphMetric
, methodGraphEdgesStrength :: Strength
, methodGraphEdgesStrength :: Strength
, methodGraphClustering :: PartitionMethod
, methodGraphClustering :: PartitionMethod
, methodGraphBridgeness :: BridgenessMethod
, methodGraphBridgeness :: BridgenessMethod
, methodGraphNodeType1 :: GT.CTabNgramType
, methodGraphNodeType1 :: GT.CTabNgramType
, methodGraphNodeType2 :: GT.CTabNgramType
, methodGraphNodeType2 :: GT.CTabNgramType
}
}
derive instance Eq UpdateNodeConfigGraph
derive instance Generic UpdateNodeConfigGraph _
instance Show UpdateNodeConfigGraph where show = genericShow
derive newtype instance JSON.ReadForeign UpdateNodeConfigGraph
derive newtype instance JSON.WriteForeign UpdateNodeConfigGraph
data UpdateNodeParams
= UpdateNodeParamsList { methodList :: Method }
| UpdateNodeParamsGraph { methodGraph :: UpdateNodeConfigGraph }
| UpdateNodeParamsTexts { methodTexts :: Granularity }
| UpdateNodeParamsTexts { methodTexts :: Granularity }
| UpdateNodeParamsCorpus { methodTexts :: Granularity
, methodList :: Method }
| UpdateNodeParamsBoard { methodBoard :: Charts }
| UpdateNodeParamsBoard { methodBoard :: Charts }
| UpdateNodeParamsPhylo { methodPhylo :: Phylo.UpdateData }
| UpdateNodeParamsPhylo { methodPhylo :: Phylo.UpdateData }
| UpdateNodeParamsLink { methodLink :: LinkNodeReq }
| UpdateNodeParamsLink { methodLink :: LinkNodeReq }
...
@@ -32,12 +41,15 @@ instance JSON.WriteForeign UpdateNodeParams where
...
@@ -32,12 +41,15 @@ instance JSON.WriteForeign UpdateNodeParams where
writeImpl (UpdateNodeParamsList { methodList }) =
writeImpl (UpdateNodeParamsList { methodList }) =
JSON.writeImpl { type: "UpdateNodeParamsList"
JSON.writeImpl { type: "UpdateNodeParamsList"
, methodList }
, methodList }
writeImpl (UpdateNodeParamsGraph { methodGraph
Metric, methodGraphClustering, methodGraphBridgeness, methodGraphEdgesStrength, methodGraphNodeType1, methodGraphNodeType2
}) =
writeImpl (UpdateNodeParamsGraph { methodGraph
}) =
JSON.writeImpl { type: "UpdateNodeParamsGraph"
JSON.writeImpl { type: "UpdateNodeParamsGraph"
, methodGraph
Metric, methodGraphClustering, methodGraphBridgeness, methodGraphEdgesStrength, methodGraphNodeType1, methodGraphNodeType2
}
, methodGraph
}
writeImpl (UpdateNodeParamsTexts { methodTexts }) =
writeImpl (UpdateNodeParamsTexts { methodTexts }) =
JSON.writeImpl { type: "UpdateNodeParamsTexts"
JSON.writeImpl { type: "UpdateNodeParamsTexts"
, methodTexts }
, methodTexts }
writeImpl (UpdateNodeParamsCorpus { methodTexts, methodList }) =
JSON.writeImpl { type: "UpdateNodeParamsCorpus"
, methodTexts, methodList }
writeImpl (UpdateNodeParamsBoard { methodBoard }) =
writeImpl (UpdateNodeParamsBoard { methodBoard }) =
JSON.writeImpl { type: "UpdateNodeParamsBoard"
JSON.writeImpl { type: "UpdateNodeParamsBoard"
, methodBoard }
, methodBoard }
...
...
src/Gargantext/Components/Forest/Tree/Node/Settings.purs
View file @
5617ee80
...
@@ -152,7 +152,8 @@ settingsBoxLens Calc =
...
@@ -152,7 +152,8 @@ settingsBoxLens Calc =
, ShareURL
, ShareURL
, Delete ]
, Delete ]
settingsBoxLens Corpus =
settingsBoxLens Corpus =
_buttons .~ [ Add [ Graph
_buttons .~ [ ReloadWithSettings
, Add [ Graph
, Notes
, Notes
, Calc
, Calc
, NodeTexts
, NodeTexts
...
...
src/Gargantext/Components/GraphExplorer/Store.purs
View file @
5617ee80
...
@@ -122,7 +122,7 @@ options ::
...
@@ -122,7 +122,7 @@ options ::
}
}
options =
options =
-- Layout
-- Layout
{ showControls :
fals
e
{ showControls :
tru
e
, sideTab : GET.SideTabLegend
, sideTab : GET.SideTabLegend
, showSidebar : GT.InitialClosed
, showSidebar : GT.InitialClosed
, showDoc : Nothing
, showDoc : Nothing
...
...
src/Gargantext/Utils.purs
View file @
5617ee80
...
@@ -112,6 +112,8 @@ href = location >>= WHL.href
...
@@ -112,6 +112,8 @@ href = location >>= WHL.href
protocol :: Effect String
protocol :: Effect String
protocol = location >>= WHL.protocol
protocol = location >>= WHL.protocol
host :: Effect String
host = location >>= WHL.host
nbsp :: Int -> String
nbsp :: Int -> String
nbsp = nbsp' ""
nbsp = nbsp' ""
...
...
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