Commit 719fd6e7 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[REFACT]

parent eb307705
...@@ -67,7 +67,6 @@ library: ...@@ -67,7 +67,6 @@ library:
- Gargantext.Database.Admin.Types.Node - Gargantext.Database.Admin.Types.Node
- Gargantext.Prelude - Gargantext.Prelude
- Gargantext.Prelude.Crypto.Pass.User - Gargantext.Prelude.Crypto.Pass.User
- Gargantext.Prelude.GargDB
- Gargantext.Prelude.Crypto.Hash - Gargantext.Prelude.Crypto.Hash
- Gargantext.Prelude.Utils - Gargantext.Prelude.Utils
- Gargantext.Core.Text - Gargantext.Core.Text
...@@ -111,7 +110,6 @@ library: ...@@ -111,7 +110,6 @@ library:
- aeson - aeson
- aeson-lens - aeson-lens
- aeson-pretty - aeson-pretty
- password
- array - array
- async - async
- attoparsec - attoparsec
...@@ -229,6 +227,7 @@ library: ...@@ -229,6 +227,7 @@ library:
- cprng-aes - cprng-aes
- binary - binary
- crypto-random - crypto-random
- password
- split - split
- stemmer - stemmer
...@@ -333,7 +332,7 @@ executables: ...@@ -333,7 +332,7 @@ executables:
- optparse-generic - optparse-generic
- split - split
- unordered-containers - unordered-containers
- cryptohash - cryptohash
- time - time
gargantext-import: gargantext-import:
......
...@@ -39,8 +39,8 @@ withDevEnv iniPath k = do ...@@ -39,8 +39,8 @@ withDevEnv iniPath k = do
repo <- readRepoEnv (_gc_repofilepath cfg) repo <- readRepoEnv (_gc_repofilepath cfg)
setts <- devSettings devJwkFile setts <- devSettings devJwkFile
pure $ DevEnv pure $ DevEnv
{ _dev_env_pool = pool { _dev_env_pool = pool
, _dev_env_repo = repo , _dev_env_repo = repo
, _dev_env_settings = setts , _dev_env_settings = setts
, _dev_env_config = cfg , _dev_env_config = cfg
} }
......
...@@ -594,7 +594,9 @@ getTableNgrams _nType nId tabType listId limit_ offset ...@@ -594,7 +594,9 @@ getTableNgrams _nType nId tabType listId limit_ offset
pure $ toVersionedWithCount fltrCount tableMap3 pure $ toVersionedWithCount fltrCount tableMap3
scoresRecomputeTableNgrams :: forall env err m. (RepoCmdM env err m, HasNodeError err, HasConnectionPool env, HasConfig env) => NodeId -> TabType -> ListId -> m Int scoresRecomputeTableNgrams :: forall env err m.
(RepoCmdM env err m, HasNodeError err, HasConnectionPool env, HasConfig env)
=> NodeId -> TabType -> ListId -> m Int
scoresRecomputeTableNgrams nId tabType listId = do scoresRecomputeTableNgrams nId tabType listId = do
tableMap <- getNgramsTableMap listId ngramsType tableMap <- getNgramsTableMap listId ngramsType
_ <- tableMap & v_data %%~ setScores _ <- tableMap & v_data %%~ setScores
...@@ -736,20 +738,20 @@ getTableNgramsDoc dId tabType listId limit_ offset listType minSize maxSize orde ...@@ -736,20 +738,20 @@ getTableNgramsDoc dId tabType listId limit_ offset listType minSize maxSize orde
apiNgramsTableCorpus :: ( GargServerC env err m apiNgramsTableCorpus :: ( GargServerC env err m
) )
=> NodeId -> ServerT TableNgramsApi m => NodeId -> ServerT TableNgramsApi m
apiNgramsTableCorpus cId = getTableNgramsCorpus cId apiNgramsTableCorpus cId = getTableNgramsCorpus cId
:<|> tableNgramsPut :<|> tableNgramsPut
:<|> scoresRecomputeTableNgrams cId :<|> scoresRecomputeTableNgrams cId
:<|> getTableNgramsVersion cId :<|> getTableNgramsVersion cId
:<|> apiNgramsAsync cId :<|> apiNgramsAsync cId
apiNgramsTableDoc :: ( GargServerC env err m apiNgramsTableDoc :: ( GargServerC env err m
) )
=> DocId -> ServerT TableNgramsApi m => DocId -> ServerT TableNgramsApi m
apiNgramsTableDoc dId = getTableNgramsDoc dId apiNgramsTableDoc dId = getTableNgramsDoc dId
:<|> tableNgramsPut :<|> tableNgramsPut
:<|> scoresRecomputeTableNgrams dId :<|> scoresRecomputeTableNgrams dId
:<|> getTableNgramsVersion dId :<|> getTableNgramsVersion dId
:<|> apiNgramsAsync dId :<|> apiNgramsAsync dId
-- > index all the corpus accordingly (TODO AD) -- > index all the corpus accordingly (TODO AD)
apiNgramsAsync :: NodeId -> GargServer TableNgramsAsyncApi apiNgramsAsync :: NodeId -> GargServer TableNgramsAsyncApi
......
...@@ -52,7 +52,7 @@ import Gargantext.Database.Admin.Types.Node (CorpusId, NodeType(..), UserId) ...@@ -52,7 +52,7 @@ import Gargantext.Database.Admin.Types.Node (CorpusId, NodeType(..), UserId)
import Gargantext.Database.Query.Table.Node (getNodeWith) import Gargantext.Database.Query.Table.Node (getNodeWith)
import Gargantext.Database.Query.Table.Node.UpdateOpaleye (updateHyperdata) import Gargantext.Database.Query.Table.Node.UpdateOpaleye (updateHyperdata)
import Gargantext.Database.Schema.Node (node_hyperdata) import Gargantext.Database.Schema.Node (node_hyperdata)
import qualified Gargantext.Prelude.GargDB as GargDB import qualified Gargantext.Database.GargDB as GargDB
import qualified Gargantext.Core.Text.Corpus.API as API import qualified Gargantext.Core.Text.Corpus.API as API
import qualified Gargantext.Core.Text.Corpus.Parsers as Parser (FileFormat(..), parseFormat) import qualified Gargantext.Core.Text.Corpus.Parsers as Parser (FileFormat(..), parseFormat)
......
...@@ -27,7 +27,7 @@ import Servant.Job.Async (JobFunction(..), serveJobsAPI) ...@@ -27,7 +27,7 @@ import Servant.Job.Async (JobFunction(..), serveJobsAPI)
import qualified Data.ByteString as BS import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as BSL import qualified Data.ByteString.Lazy as BSL
import qualified Data.MIME.Types as DMT import qualified Data.MIME.Types as DMT
import qualified Gargantext.Prelude.GargDB as GargDB import qualified Gargantext.Database.GargDB as GargDB
import qualified Network.HTTP.Media as M import qualified Network.HTTP.Media as M
data RESPONSE deriving Typeable data RESPONSE deriving Typeable
......
...@@ -18,7 +18,7 @@ import Web.FormUrlEncoded (FromForm) ...@@ -18,7 +18,7 @@ import Web.FormUrlEncoded (FromForm)
import Gargantext.Core (Lang(..){-, allLangs-}) import Gargantext.Core (Lang(..){-, allLangs-})
import Gargantext.Core.Utils.Prefix (unPrefixSwagger) import Gargantext.Core.Utils.Prefix (unPrefixSwagger)
import Gargantext.Prelude import Gargantext.Prelude
import qualified Gargantext.Prelude.GargDB as GargDB import qualified Gargantext.Database.GargDB as GargDB
import Gargantext.API.Node.Corpus.New.File (FileType) import Gargantext.API.Node.Corpus.New.File (FileType)
------------------------------------------------------- -------------------------------------------------------
......
...@@ -32,7 +32,7 @@ import GHC.Generics (Generic) ...@@ -32,7 +32,7 @@ import GHC.Generics (Generic)
import Gargantext.Core (Lang(..)) import Gargantext.Core (Lang(..))
import Gargantext.Database.Admin.Types.Hyperdata (HyperdataDocument(..), ToHyperdataDocument, toHyperdataDocument) import Gargantext.Database.Admin.Types.Hyperdata (HyperdataDocument(..), ToHyperdataDocument, toHyperdataDocument)
import Gargantext.Prelude import Gargantext.Prelude
import Gargantext.Prelude.GargDB import Gargantext.Database.GargDB
import qualified Data.ByteString.Lazy as DBL import qualified Data.ByteString.Lazy as DBL
import qualified Data.JsonStream.Parser as P import qualified Data.JsonStream.Parser as P
import qualified Data.Text as Text import qualified Data.Text as Text
......
...@@ -34,7 +34,7 @@ import Data.Tuple.Extra (both) ...@@ -34,7 +34,7 @@ import Data.Tuple.Extra (both)
import qualified Data.ByteString.Lazy as BSL import qualified Data.ByteString.Lazy as BSL
import Gargantext.Prelude import Gargantext.Prelude
import Gargantext.Prelude.GargDB import Gargantext.Database.GargDB
import Gargantext.Core (Lang(..), allLangs) import Gargantext.Core (Lang(..), allLangs)
import Gargantext.Core.Text.Terms.Mono (words) import Gargantext.Core.Text.Terms.Mono (words)
import Gargantext.Core.Text.Metrics.Count (occurrencesWith) import Gargantext.Core.Text.Metrics.Count (occurrencesWith)
......
...@@ -28,7 +28,7 @@ import Gargantext.Core ...@@ -28,7 +28,7 @@ import Gargantext.Core
import Gargantext.Core.Text.Metrics.Count (occurrencesWith) import Gargantext.Core.Text.Metrics.Count (occurrencesWith)
import Gargantext.Core.Types.Main (ListType(..)) import Gargantext.Core.Types.Main (ListType(..))
import Gargantext.Prelude import Gargantext.Prelude
import Gargantext.Prelude.GargDB import Gargantext.Database.GargDB
------------------------------------------------------------------------ ------------------------------------------------------------------------
train :: Double -> Double -> SVM.Problem -> IO SVM.Model train :: Double -> Double -> SVM.Problem -> IO SVM.Model
......
...@@ -33,7 +33,7 @@ import Gargantext.Database.Query.Table.Node (getNodeWith) ...@@ -33,7 +33,7 @@ import Gargantext.Database.Query.Table.Node (getNodeWith)
import Gargantext.Database.Query.Table.Node.Error (HasNodeError) import Gargantext.Database.Query.Table.Node.Error (HasNodeError)
import Gargantext.Database.Schema.Node import Gargantext.Database.Schema.Node
import Gargantext.Prelude import Gargantext.Prelude
import qualified Gargantext.Prelude.GargDB as GargDB import qualified Gargantext.Database.GargDB as GargDB
------------------------------------------------------------------------ ------------------------------------------------------------------------
......
...@@ -12,7 +12,7 @@ TODO_2: quantitative tests (coded) ...@@ -12,7 +12,7 @@ TODO_2: quantitative tests (coded)
-} -}
module Gargantext.Prelude.GargDB module Gargantext.Database.GargDB
where where
import Control.Exception import Control.Exception
......
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