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
153
Issues
153
List
Board
Labels
Milestones
Merge Requests
9
Merge Requests
9
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
113248dd
Commit
113248dd
authored
Apr 13, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DB|WIP] fixing imports still.
parent
f7186aaa
Pipeline
#815
failed with stage
Changes
25
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
72 additions
and
71 deletions
+72
-71
Auth.hs
src/Gargantext/API/Auth.hs
+2
-2
Export.hs
src/Gargantext/API/Export.hs
+1
-1
Node.hs
src/Gargantext/API/Node.hs
+9
-7
Search.hs
src/Gargantext/API/Search.hs
+1
-1
Table.hs
src/Gargantext/API/Table.hs
+1
-1
Types.hs
src/Gargantext/API/Types.hs
+1
-1
Flow.hs
src/Gargantext/Database/Action/Flow.hs
+5
-3
Pairing.hs
src/Gargantext/Database/Action/Flow/Pairing.hs
+2
-2
Utils.hs
src/Gargantext/Database/Action/Flow/Utils.hs
+7
-5
Learn.hs
src/Gargantext/Database/Action/Learn.hs
+1
-1
Metrics.hs
src/Gargantext/Database/Action/Metrics.hs
+1
-1
Query.hs
src/Gargantext/Database/Action/Query.hs
+6
-1
Select.hs
src/Gargantext/Database/Action/Query/Node/Select.hs
+1
-0
UpdateOpaleye.hs
src/Gargantext/Database/Action/Query/Node/UpdateOpaleye.hs
+1
-1
User.hs
src/Gargantext/Database/Action/Query/Node/User.hs
+4
-8
Tree.hs
src/Gargantext/Database/Action/Query/Tree.hs
+9
-16
Root.hs
src/Gargantext/Database/Action/Query/Tree/Root.hs
+2
-1
Search.hs
src/Gargantext/Database/Action/Search.hs
+1
-2
Node.hs
src/Gargantext/Database/Admin/Types/Node.hs
+1
-3
API.hs
src/Gargantext/Text/Corpus/API.hs
+1
-1
Isidore.hs
src/Gargantext/Text/Corpus/API/Isidore.hs
+1
-1
Chart.hs
src/Gargantext/Viz/Chart.hs
+1
-0
API.hs
src/Gargantext/Viz/Graph/API.hs
+10
-8
API.hs
src/Gargantext/Viz/Phylo/API.hs
+2
-3
Main.hs
src/Gargantext/Viz/Phylo/Main.hs
+1
-1
No files found.
src/Gargantext/API/Auth.hs
View file @
113248dd
...
...
@@ -44,8 +44,8 @@ import Gargantext.API.Settings
import
Gargantext.API.Types
(
HasJoseError
(
..
),
joseError
,
HasServerError
,
GargServerC
)
import
Gargantext.Core.Types.Individu
(
User
(
..
),
Username
,
Password
,
arbitraryUsername
,
arbitraryPassword
)
import
Gargantext.Core.Utils.Prefix
(
unPrefix
,
unPrefixSwagger
)
import
Gargantext.Database.Action.Root
(
getRoot
)
import
Gargantext.Database.Action.Tree
(
isDescendantOf
,
isIn
)
import
Gargantext.Database.Action.
Query.Tree.
Root
(
getRoot
)
import
Gargantext.Database.Action.
Query.
Tree
(
isDescendantOf
,
isIn
)
import
Gargantext.Database.Admin.Types.Node
(
NodePoly
(
_node_id
),
NodeId
(
..
),
UserId
,
ListId
,
DocId
)
import
Gargantext.Database.Admin.Utils
(
Cmd
'
,
CmdM
,
HasConnectionPool
)
import
Gargantext.Prelude
hiding
(
reverse
)
...
...
src/Gargantext/API/Export.hs
View file @
113248dd
...
...
@@ -38,13 +38,13 @@ import Gargantext.API.Types (GargNoServer)
import
Gargantext.Core.Types
--
import
Gargantext.Core.Utils.Prefix
(
unPrefix
,
unPrefixSwagger
)
import
Gargantext.Database.Action.Metrics.NgramsByNode
(
getNgramsByNodeOnlyUser
)
import
Gargantext.Database.Action.Query.Node
import
Gargantext.Database.Action.Query.Node.Select
(
selectNodesWithUsername
)
import
Gargantext.Database.Admin.Config
(
userMaster
)
import
Gargantext.Database.Admin.Types.Errors
(
HasNodeError
)
import
Gargantext.Database.Admin.Types.Node
(
Node
,
HyperdataDocument
(
..
),
NodeId
,
ListId
,
CorpusId
)
import
Gargantext.Database.Admin.Utils
(
Cmd
)
import
Gargantext.Database.Schema.Ngrams
(
NgramsType
(
..
))
import
Gargantext.Database.Schema.Node
(
defaultList
)
import
Gargantext.Database.Schema.NodeNode
(
selectDocNodes
)
import
Gargantext.Prelude
import
Gargantext.Prelude.Utils
(
sha
)
...
...
src/Gargantext/API/Node.hs
View file @
113248dd
...
...
@@ -53,25 +53,27 @@ import Gargantext.API.Table
import
Gargantext.API.Types
import
Gargantext.Core.Types
(
NodeTableResult
)
import
Gargantext.Core.Types.Main
(
Tree
,
NodeTree
,
ListType
)
import
Gargantext.Database.Action.Facet
(
FacetDoc
,
OrderBy
(
..
))
import
Gargantext.Database.Action.
Query.
Facet
(
FacetDoc
,
OrderBy
(
..
))
import
Gargantext.Database.Action.Flow.Pairing
(
pairing
)
import
Gargantext.Database.Action.Query.Node.Children
(
getChildren
)
import
Gargantext.Database.Action.Query.Node.UpdateOpaleye
(
updateHyperdata
)
import
Gargantext.Database.Action.Query.Node.User
(
NodeUser
)
import
Gargantext.Database.Action.Tree
(
treeDB
)
import
Gargantext.Database.Action.Query.Node.User
import
Gargantext.Database.Action.Query.Node
hiding
(
postNode
)
import
Gargantext.Database.Action.Query
import
Gargantext.Database.Action.Query.Tree
(
treeDB
)
import
Gargantext.Database.Admin.Config
(
nodeTypeId
)
import
Gargantext.Database.Admin.Types.Errors
(
HasNodeError
(
..
))
import
Gargantext.Database.Admin.Types.Node
import
Gargantext.Database.Admin.Utils
-- (Cmd, CmdM)
import
Gargantext.Database.Schema.Node
(
getNodesWithParentId
,
getNodeWith
,
getNode
,
deleteNode
,
deleteNodes
,
mkNodeWithParent
,
JSONB
,
getNodeUser
)
import
Gargantext.Database.Schema.NodeNode
-- (nodeNodesCategory, insertNodeNode, NodeNode(..))
import
Gargantext.Database.Schema.Node
import
Gargantext.Database.Schema.NodeNode
import
Gargantext.Prelude
import
Gargantext.Viz.Chart
import
Gargantext.Viz.Phylo.API
(
PhyloAPI
,
phyloAPI
)
import
Servant
import
Test.QuickCheck
(
elements
)
import
Test.QuickCheck.Arbitrary
(
Arbitrary
,
arbitrary
)
import
qualified
Gargantext.Database.Node.Update
as
U
(
update
,
Update
(
..
))
import
qualified
Gargantext.Database.
Action.Query.
Node.Update
as
U
(
update
,
Update
(
..
))
{-
import qualified Gargantext.Text.List.Learn as Learn
...
...
@@ -94,7 +96,7 @@ nodesAPI ids = deleteNodes ids
-- TODO-EVENTS:
-- PutNode ?
-- TODO needs design discussion.
type
Roots
=
Get
'[
J
SON
]
[
NodeUser
]
type
Roots
=
Get
'[
J
SON
]
[
Node
Hyperdata
User
]
:<|>
Put
'[
J
SON
]
Int
-- TODO
-- | TODO: access by admin only
...
...
src/Gargantext/API/Search.hs
View file @
113248dd
...
...
@@ -32,7 +32,7 @@ import Data.Time (UTCTime)
import
GHC.Generics
(
Generic
)
import
Gargantext.API.Types
(
GargServer
)
import
Gargantext.Core.Utils.Prefix
(
unPrefix
,
unPrefixSwagger
)
import
Gargantext.Database.Action.Facet
import
Gargantext.Database.Action.
Query.
Facet
import
Gargantext.Database.Action.Search
import
Gargantext.Database.Admin.Types.Node
import
Gargantext.Prelude
...
...
src/Gargantext/API/Table.hs
View file @
113248dd
...
...
@@ -46,7 +46,7 @@ import GHC.Generics (Generic)
import
Gargantext.API.Ngrams
(
TabType
(
..
))
import
Gargantext.Core.Types
(
Offset
,
Limit
,
TableResult
(
..
))
import
Gargantext.Core.Utils.Prefix
(
unPrefix
,
unPrefixSwagger
)
import
Gargantext.Database.Action.Facet
(
FacetDoc
,
runViewDocuments
,
OrderBy
(
..
),
runViewAuthorsDoc
)
import
Gargantext.Database.Action.
Query.
Facet
(
FacetDoc
,
runViewDocuments
,
OrderBy
(
..
),
runViewAuthorsDoc
)
import
Gargantext.Database.Action.Learn
(
FavOrTrash
(
..
),
moreLike
)
import
Gargantext.Database.Action.Search
import
Gargantext.Database.Admin.Types.Node
...
...
src/Gargantext/API/Types.hs
View file @
113248dd
...
...
@@ -41,7 +41,7 @@ import Gargantext.API.Ngrams
import
Gargantext.API.Orchestrator.Types
import
Gargantext.API.Settings
import
Gargantext.Core.Types
import
Gargantext.Database.Action.Tree
import
Gargantext.Database.Action.
Query.
Tree
import
Gargantext.Database.Admin.Types.Errors
(
NodeError
(
..
),
HasNodeError
(
..
))
import
Gargantext.Database.Admin.Utils
import
Gargantext.Prelude
...
...
src/Gargantext/Database/Action/Flow.hs
View file @
113248dd
...
...
@@ -55,10 +55,13 @@ import Gargantext.Core.Types.Individu (User(..))
import
Gargantext.Core.Types.Main
import
Gargantext.Database.Action.Flow.List
import
Gargantext.Database.Action.Flow.Types
import
Gargantext.Database.Action.Flow.Utils
(
insertDocNgrams
)
import
Gargantext.Database.Action.Flow.Utils
(
insertDocNgrams
,
getUserId
)
import
Gargantext.Database.Action.Query.Node
import
Gargantext.Database.Action.Query.User
import
Gargantext.Database.Action.Query.Node.Contact
-- (HyperdataContact(..), ContactWho(..))
import
Gargantext.Database.Action.Query.Node.Document.Insert
-- (insertDocuments, ReturnId(..), addUniqIdsDoc, addUniqIdsContact, ToDbData(..))
import
Gargantext.Database.Action.Root
(
getRoot
)
import
Gargantext.Database.Action.Query.Tree.Root
(
getRoot
)
import
Gargantext.Database.Action.Query.Tree
(
mkRoot
)
import
Gargantext.Database.Action.Search
(
searchInDatabase
)
import
Gargantext.Database.Admin.Config
(
userMaster
,
corpusMasterName
)
import
Gargantext.Database.Admin.Types.Errors
(
HasNodeError
(
..
),
NodeError
(
..
),
nodeError
)
...
...
@@ -68,7 +71,6 @@ import Gargantext.Database.Schema.Ngrams -- (insertNgrams, Ngrams(..), NgramsInd
import
Gargantext.Database.Schema.Node
-- (mkRoot, mkCorpus, getOrMkList, mkGraph, {-mkPhylo,-} mkDashboard, mkAnnuaire, getCorporaWithParentId, HasNodeError, NodeError(..), nodeError)
import
Gargantext.Database.Schema.NodeNgrams
(
listInsertDb
,
getCgramsId
)
import
Gargantext.Database.Schema.NodeNodeNgrams2
-- (NodeNodeNgrams2, insertNodeNodeNgrams2)
import
Gargantext.Database.Schema.User
(
getUserId
)
import
Gargantext.Ext.IMT
(
toSchoolName
)
import
Gargantext.Ext.IMTUser
(
deserialiseImtUsersFromFile
)
import
Gargantext.Prelude
...
...
src/Gargantext/Database/Action/Flow/Pairing.hs
View file @
113248dd
...
...
@@ -29,8 +29,8 @@ import Gargantext.Core.Types (TableResult(..))
import
Gargantext.Database.Action.Flow.Utils
import
Gargantext.Database.Admin.Types.Node
(
AnnuaireId
,
CorpusId
,
ListId
{-, DocId, ContactId-}
)
import
Gargantext.Database.Admin.Utils
(
Cmd
,
runPGSQuery
)
import
Gargantext.Database.Node.Children
(
getAllContacts
)
import
Gargantext.Database.Node.Contact
-- (HyperdataContact(..))
import
Gargantext.Database.
Action.Query.
Node.Children
(
getAllContacts
)
import
Gargantext.Database.
Action.Query.
Node.Contact
-- (HyperdataContact(..))
import
Gargantext.Database.Schema.Ngrams
-- (NgramsType(..))
import
Gargantext.Prelude
hiding
(
sum
)
import
Safe
(
lastMay
)
...
...
src/Gargantext/Database/Action/Flow/Utils.hs
View file @
113248dd
...
...
@@ -18,16 +18,20 @@ module Gargantext.Database.Action.Flow.Utils
where
import
Data.Map
(
Map
)
import
Gargantext.Core.Types
(
Name
)
import
Gargantext.Core.Types.Individu
(
User
(
..
))
import
Gargantext.Database.Action.Query.Node
import
Gargantext.Database.Action.Query.User
import
Gargantext.Database.Admin.Types.Errors
import
Gargantext.Database.Admin.Types.Node
import
Gargantext.Database.Admin.Types.Node
(
NodeId
,
Node
,
NodePoly
(
..
),
Hyperdata
)
import
Gargantext.Database.Admin.Utils
(
Cmd
)
import
Gargantext.Database.Schema.Ngrams
import
Gargantext.Database.Schema.Node
import
Gargantext.Database.Schema.User
import
Gargantext.Database.Schema.NodeNodeNgrams
import
Gargantext.Database.Action.Query.Node
(
getNode
)
import
Gargantext.Prelude
import
qualified
Data.Map
as
DM
getUserId
::
HasNodeError
err
=>
User
->
Cmd
err
UserId
...
...
@@ -42,8 +46,6 @@ getUserId (UserName u ) = do
Nothing
->
nodeError
NoUserFound
toMaps
::
Hyperdata
a
=>
(
a
->
Map
(
NgramsT
Ngrams
)
Int
)
->
[
Node
a
]
...
...
src/Gargantext/Database/Action/Learn.hs
View file @
113248dd
...
...
@@ -23,7 +23,7 @@ import Data.Maybe
import
Data.Text
(
Text
)
import
Data.Tuple
(
snd
)
import
Gargantext.Core.Types
(
Offset
,
Limit
)
import
Gargantext.Database.Action.Facet
import
Gargantext.Database.Action.
Query.
Facet
import
Gargantext.Database.Admin.Types.Node
import
Gargantext.Database.Admin.Utils
(
Cmd
)
import
Gargantext.Prelude
...
...
src/Gargantext/Database/Action/Metrics.hs
View file @
113248dd
...
...
@@ -28,7 +28,7 @@ import Gargantext.Database.Action.Metrics.NgramsByNode (getNodesByNgramsOnlyUser
import
Gargantext.Database.Action.Query.Node.Select
import
Gargantext.Database.Admin.Config
(
userMaster
)
import
Gargantext.Database.Admin.Types.Node
(
ListId
,
CorpusId
{-, HyperdataCorpus-}
)
import
Gargantext.Database.
Schema
.Node
(
defaultList
)
import
Gargantext.Database.
Action.Query
.Node
(
defaultList
)
import
Gargantext.Prelude
import
Gargantext.Text.Metrics
(
scored
,
Scored
(
..
),
{-localMetrics, toScored-}
)
import
qualified
Data.Map
as
Map
...
...
src/Gargantext/Database/Action/Query.hs
View file @
113248dd
...
...
@@ -27,12 +27,17 @@ Portability : POSIX
module
Gargantext.Database.Action.Query
where
import
Gargantext.Core.Types
(
Name
)
import
Gargantext.Database.Action.Query.Node
import
Gargantext.Database.Action.Query.Node.User
import
Gargantext.Database.Action.Query.User
import
Gargantext.Database.Admin.Types.Errors
import
Gargantext.Database.Admin.Types.Node
import
Gargantext.Database.Admin.Utils
(
Cmd
)
import
Gargantext.Database.Schema.Node
import
Opaleye
hiding
(
FromField
)
import
Prelude
hiding
(
null
,
id
,
map
,
sum
)
------------------------------------------------------------------------
-- | TODO mk all others nodes
mkNodeWithParent
::
HasNodeError
err
...
...
src/Gargantext/Database/Action/Query/Node/Select.hs
View file @
113248dd
...
...
@@ -24,6 +24,7 @@ import Gargantext.Database.Admin.Config
import
Gargantext.Database.Admin.Utils
import
Gargantext.Database.Schema.Node
import
Gargantext.Database.Schema.User
import
Gargantext.Database.Action.Query.User
import
Gargantext.Database.Action.Query.Node
import
Opaleye
...
...
src/Gargantext/Database/Action/Query/Node/UpdateOpaleye.hs
View file @
113248dd
...
...
@@ -26,7 +26,7 @@ import Gargantext.Prelude
import
Gargantext.Database.Schema.Node
import
Gargantext.Database.Admin.Types.Node
import
Gargantext.Database.Admin.Utils
(
Cmd
,
mkCmd
)
import
Gargantext.Database.A
ction.Query
.Node
(
pgNodeId
)
import
Gargantext.Database.A
dmin.Types
.Node
(
pgNodeId
)
updateHyperdata
::
ToJSON
a
=>
NodeId
->
a
->
Cmd
err
Int64
updateHyperdata
i
h
=
mkCmd
$
\
c
->
runUpdate_
c
(
updateHyperdataQuery
i
h
)
...
...
src/Gargantext/Database/Action/Query/Node/User.hs
View file @
113248dd
{-|
Module : Gargantext.Database.Node.User
Module : Gargantext.Database.
Action.Query.
Node.User
Description : User Node in Gargantext
Copyright : (c) CNRS, 2017-Present
License : AGPL + CECILL v3
...
...
@@ -15,7 +15,6 @@ Portability : POSIX
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TemplateHaskell #-}
...
...
@@ -32,8 +31,10 @@ import GHC.Generics (Generic)
import
Gargantext.Core
(
Lang
(
..
))
import
Gargantext.Core.Types
(
Name
)
import
Gargantext.Core.Types.Individu
(
Username
,
arbitraryUsername
,
User
(
..
),
UserId
)
import
Gargantext.Database.Admin.Types.Node
(
NodeType
(
..
))
import
Gargantext.Database.Action.Query.Node
import
Gargantext.Core.Utils.Prefix
(
unPrefix
,
unPrefixSwagger
)
import
Gargantext.Database.Admin.Types.Node
(
pgNodeId
)
import
Gargantext.Database.Action.Query.Node.Contact
(
HyperdataContact
,
fake_HyperdataContact
)
import
Gargantext.Database.Admin.Types.Node
(
Node
,
Hyperdata
,
DocumentId
,
NodeId
(
..
))
import
Gargantext.Database.Admin.Utils
-- (fromField', Cmd)
...
...
@@ -44,8 +45,6 @@ import Test.QuickCheck (elements)
import
Test.QuickCheck.Arbitrary
(
Arbitrary
,
arbitrary
)
------------------------------------------------------------------------
type
NodeUser
=
Node
HyperdataUser
data
HyperdataUser
=
HyperdataUser
{
_hu_private
::
!
(
Maybe
HyperdataPrivate
)
,
_hu_shared
::
!
(
Maybe
HyperdataContact
)
...
...
@@ -136,7 +135,7 @@ $(deriveJSON (unPrefix "_hpu_") ''HyperdataPublic)
-----------------------------------------------------------------
getNodeUser
::
NodeId
->
Cmd
err
(
Node
HyperdataUser
)
getNodeUser
nId
=
do
fromMaybe
(
panic
$
"Node does not exist: "
<>
show
nId
)
.
headMay
fromMaybe
(
panic
$
"Node does not exist: "
<>
(
cs
$
show
nId
)
)
.
headMay
<$>
runOpaQuery
(
limit
1
$
selectNode
(
pgNodeId
nId
))
...
...
@@ -145,6 +144,3 @@ nodeUserW maybeName maybeHyperdata = node NodeUser name user Nothing
where
name
=
maybe
"User"
identity
maybeName
user
=
maybe
fake_HyperdataUser
identity
maybeHyperdata
src/Gargantext/Database/Action/Query/Tree.hs
View file @
113248dd
...
...
@@ -18,15 +18,7 @@ Let a Root Node, return the Tree of the Node as a directed acyclic graph
{-# LANGUAGE RankNTypes #-}
module
Gargantext.Database.Action.Query.Tree
(
treeDB
,
TreeError
(
..
)
,
HasTreeError
(
..
)
,
dbTree
,
toNodeTree
,
DbTreeNode
,
isDescendantOf
,
isIn
)
where
where
import
Control.Lens
(
Prism
'
,
(
#
),
(
^..
),
at
,
each
,
_Just
,
to
)
import
Control.Monad.Error.Class
(
MonadError
(
throwError
))
...
...
@@ -34,15 +26,18 @@ import Data.Map (Map, fromListWith, lookup)
import
Data.Text
(
Text
)
import
Database.PostgreSQL.Simple
import
Database.PostgreSQL.Simple.SqlQQ
import
Gargantext.Prelude
import
Gargantext.Core.Types.Individu
import
Gargantext.Core.Types.Main
(
NodeTree
(
..
),
Tree
(
..
))
import
Gargantext.Database.Action.Query.Node
import
Gargantext.Database.Admin.Types.Node
-- (pgNodeId, NodeType(..))
import
Gargantext.Database.Action.Query.User
import
Gargantext.Database.Action.Query
import
Gargantext.Database.Action.Flow.Utils
(
getUserId
)
import
Gargantext.Database.Admin.Config
(
fromNodeTypeId
,
nodeTypeId
)
import
Gargantext.Database.Admin.Types.Node
(
NodeId
,
NodeType
,
DocId
,
allNodeTypes
)
import
Gargantext.Database.Admin.Types.Errors
import
Gargantext.Database.Admin.Types.Node
(
NodeId
,
NodeType
,
DocId
,
allNodeTypes
)
import
Gargantext.Database.Admin.Utils
(
Cmd
,
runPGSQuery
)
import
Gargantext.Database.Action.Query.Node
import
Gargantext.Database.Action.Query.User
import
Gargantext.Prelude
------------------------------------------------------------------------
-- import Gargantext.Database.Utils (runCmdDev)
...
...
@@ -87,8 +82,6 @@ treeError te = throwError $ _TreeError # te
treeDB
::
HasTreeError
err
=>
RootId
->
[
NodeType
]
->
Cmd
err
(
Tree
NodeTree
)
treeDB
r
nodeTypes
=
toTree
=<<
(
toTreeParent
<$>
dbTree
r
nodeTypes
)
type
RootId
=
NodeId
type
ParentId
=
NodeId
------------------------------------------------------------------------
toTree
::
(
MonadError
e
m
,
HasTreeError
e
)
=>
Map
(
Maybe
ParentId
)
[
DbTreeNode
]
->
m
(
Tree
NodeTree
)
...
...
src/Gargantext/Database/Action/Query/Tree/Root.hs
View file @
113248dd
...
...
@@ -33,7 +33,8 @@ import Gargantext.Database.Admin.Config (nodeTypeId)
import
Gargantext.Database.Action.Query.Node.User
(
HyperdataUser
)
import
Gargantext.Database.Schema.Node
(
NodeRead
)
import
Gargantext.Database.Schema.Node
(
queryNodeTable
)
import
Gargantext.Database.Schema.User
(
queryUserTable
,
UserPoly
(
..
))
import
Gargantext.Database.Schema.User
(
UserPoly
(
..
))
import
Gargantext.Database.Action.Query.User
(
queryUserTable
)
import
Gargantext.Database.Admin.Types.Node
(
Node
,
NodePoly
(
..
),
NodeType
(
NodeUser
))
import
Gargantext.Database.Admin.Utils
(
Cmd
,
runOpaQuery
)
import
Gargantext.Prelude
...
...
src/Gargantext/Database/Action/Search.hs
View file @
113248dd
...
...
@@ -16,7 +16,6 @@ Portability : POSIX
module
Gargantext.Database.Action.Search
where
--import Gargantext.Database.Node.Contact
import
Control.Arrow
(
returnA
)
import
Control.Lens
((
^.
))
import
Data.Aeson
...
...
@@ -31,6 +30,7 @@ import Database.PostgreSQL.Simple.ToField
import
Gargantext.Core.Types
import
Gargantext.Database.Action.Query.Facet
import
Gargantext.Database.Action.Query.Join
(
leftJoin6
)
import
Gargantext.Database.Action.Query.Node
import
Gargantext.Database.Admin.Config
(
nodeTypeId
)
import
Gargantext.Database.Admin.Types.Node
(
NodeType
(
..
))
import
Gargantext.Database.Admin.Utils
(
Cmd
,
runPGSQuery
,
runOpaQuery
,
runCountOpaQuery
)
...
...
@@ -43,7 +43,6 @@ import Gargantext.Text.Terms.Mono.Stem.En (stemIt)
import
Opaleye
hiding
(
Query
,
Order
)
import
qualified
Opaleye
as
O
hiding
(
Order
)
------------------------------------------------------------------------
searchInDatabase
::
ParentId
->
Text
...
...
src/Gargantext/Database/Admin/Types/Node.hs
View file @
113248dd
...
...
@@ -63,8 +63,6 @@ pgNodeId = O.pgInt4 . id2int
id2int
(
NodeId
n
)
=
n
------------------------------------------------------------------------
newtype
NodeId
=
NodeId
Int
deriving
(
Show
,
Read
,
Generic
,
Num
,
Eq
,
Ord
,
Enum
,
ToJSONKey
,
FromJSONKey
,
ToJSON
,
FromJSON
)
...
...
@@ -120,7 +118,7 @@ type CorpusId = NodeId
type
ListId
=
NodeId
type
DocumentId
=
NodeId
type
DocId
=
NodeId
type
RootId
=
NodeId
type
RootId
=
NodeId
type
MasterCorpusId
=
CorpusId
type
UserCorpusId
=
CorpusId
...
...
src/Gargantext/Text/Corpus/API.hs
View file @
113248dd
...
...
@@ -27,7 +27,7 @@ import Data.Maybe
import
Gargantext.Prelude
import
Gargantext.Core
(
Lang
(
..
))
import
Gargantext.API.Orchestrator.Types
(
ExternalAPIs
(
..
),
externalAPIs
)
import
Gargantext.Database.Types.Node
(
HyperdataDocument
(
..
))
import
Gargantext.Database.
Admin.
Types.Node
(
HyperdataDocument
(
..
))
import
qualified
Gargantext.Text.Corpus.API.Pubmed
as
PUBMED
import
qualified
Gargantext.Text.Corpus.API.Isidore
as
ISIDORE
...
...
src/Gargantext/Text/Corpus/API/Isidore.hs
View file @
113248dd
...
...
@@ -18,7 +18,7 @@ module Gargantext.Text.Corpus.API.Isidore where
import
System.FilePath
(
FilePath
())
import
Data.Text
(
Text
)
import
Gargantext.Core
(
Lang
(
..
))
import
Gargantext.Database.Types.Node
(
HyperdataDocument
(
..
))
import
Gargantext.Database.
Admin.
Types.Node
(
HyperdataDocument
(
..
))
import
Gargantext.Prelude
import
Isidore.Client
import
Servant.Client
...
...
src/Gargantext/Viz/Chart.hs
View file @
113248dd
...
...
@@ -24,6 +24,7 @@ import Data.Text (Text)
import
GHC.Generics
(
Generic
)
import
Gargantext.Core.Types.Main
import
Gargantext.Database.Action.Query.Node.Select
import
Gargantext.Database.Action.Query.Node
import
Gargantext.Database.Admin.Config
import
Gargantext.Database.Admin.Types.Node
(
CorpusId
)
import
Gargantext.Database.Admin.Utils
...
...
src/Gargantext/Viz/Graph/API.hs
View file @
113248dd
...
...
@@ -44,15 +44,17 @@ import Gargantext.API.Ngrams.Tools
import
Gargantext.API.Orchestrator.Types
import
Gargantext.API.Types
import
Gargantext.Core.Types.Main
import
Gargantext.Database.Config
import
Gargantext.Database.Metrics.NgramsByNode
(
getNodesByNgramsOnlyUser
)
import
Gargantext.Database.
Admin.
Config
import
Gargantext.Database.
Action.
Metrics.NgramsByNode
(
getNodesByNgramsOnlyUser
)
import
Gargantext.Database.Schema.Ngrams
import
Gargantext.Database.Node.Select
import
Gargantext.Database.Schema.Node
(
getNodeWith
,
getNodeUser
,
defaultList
,
insertGraph
)
import
Gargantext.Database.Types.Errors
(
HasNodeError
)
import
Gargantext.Database.Types.Node
hiding
(
node_id
)
-- (GraphId, ListId, CorpusId, NodeId)
import
Gargantext.Database.Node.UpdateOpaleye
(
updateHyperdata
)
import
Gargantext.Database.Utils
(
Cmd
)
import
Gargantext.Database.Action.Query.Node.Select
import
Gargantext.Database.Action.Query.Node
import
Gargantext.Database.Action.Query.Node.User
import
Gargantext.Database.Schema.Node
-- (getNodeWith, getNodeUser, defaultList, insertGraph)
import
Gargantext.Database.Admin.Types.Errors
(
HasNodeError
)
import
Gargantext.Database.Admin.Types.Node
hiding
(
node_id
)
-- (GraphId, ListId, CorpusId, NodeId)
import
Gargantext.Database.Action.Query.Node.UpdateOpaleye
(
updateHyperdata
)
import
Gargantext.Database.Admin.Utils
(
Cmd
)
import
Gargantext.Prelude
import
qualified
Gargantext.Prelude
as
P
import
Gargantext.Viz.Graph
...
...
src/Gargantext/Viz/Phylo/API.hs
View file @
113248dd
...
...
@@ -30,9 +30,8 @@ import qualified Data.ByteString as DB
import
qualified
Data.ByteString.Lazy
as
DBL
import
Data.Swagger
import
Gargantext.API.Types
import
Gargantext.Database.Types.Node
(
PhyloId
,
ListId
,
CorpusId
)
import
Gargantext.Database.Schema.Node
(
insertNodes
,
nodePhyloW
,
getNodePhylo
)
import
Gargantext.Database.Types.Node
-- (NodePhylo(..))
import
Gargantext.Database.Action.Query.Node
(
insertNodes
,
nodePhyloW
,
getNodePhylo
)
import
Gargantext.Database.Admin.Types.Node
-- (PhyloId, ListId, CorpusId, UserId, NodeId(..))
import
Gargantext.Prelude
import
Gargantext.Viz.Phylo
import
Gargantext.Viz.Phylo.Main
...
...
src/Gargantext/Viz/Phylo/Main.hs
View file @
113248dd
...
...
@@ -28,7 +28,7 @@ import Gargantext.API.Ngrams.Tools (getTermsWith)
import
Gargantext.Core.Types
import
Gargantext.Database.Action.Flow
import
Gargantext.Database.Schema.Ngrams
(
NgramsType
(
..
))
import
Gargantext.Database.
Schema.Node
(
defaultList
)
import
Gargantext.Database.
Action.Query.Node
(
defaultList
)
import
Gargantext.Database.Schema.NodeNode
(
selectDocs
)
import
Gargantext.Prelude
import
Gargantext.Text.Context
(
TermList
)
...
...
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