Commit d1a288ff authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FIX] PubMed api ok.

parent 203bd3b0
Pipeline #539 failed with stage
...@@ -76,7 +76,7 @@ api (Query q _ as) = do ...@@ -76,7 +76,7 @@ api (Query q _ as) = do
Nothing -> flowCorpusSearchInDatabase "user1" EN q Nothing -> flowCorpusSearchInDatabase "user1" EN q
Just API.All -> flowCorpusSearchInDatabase "user1" EN q Just API.All -> flowCorpusSearchInDatabase "user1" EN q
Just a -> do Just a -> do
docs <- liftIO $ API.get a q Nothing docs <- liftIO $ API.get a q (Just 1000)
cId' <- flowCorpus "user1" (Left q) (Multi EN) [docs] cId' <- flowCorpus "user1" (Left q) (Multi EN) [docs]
pure cId' pure cId'
...@@ -96,4 +96,3 @@ info :: FlowCmdM env err m => UserId -> m ApiInfo ...@@ -96,4 +96,3 @@ info :: FlowCmdM env err m => UserId -> m ApiInfo
info _u = pure $ ApiInfo API.externalAPIs info _u = pure $ ApiInfo API.externalAPIs
...@@ -57,7 +57,7 @@ import Gargantext.Database.Node.Contact -- (HyperdataContact(..), ContactWho(..) ...@@ -57,7 +57,7 @@ import Gargantext.Database.Node.Contact -- (HyperdataContact(..), ContactWho(..)
import Gargantext.Database.Node.Document.Insert -- (insertDocuments, ReturnId(..), addUniqIdsDoc, addUniqIdsContact, ToDbData(..)) import Gargantext.Database.Node.Document.Insert -- (insertDocuments, ReturnId(..), addUniqIdsDoc, addUniqIdsContact, ToDbData(..))
import Gargantext.Database.Root (getRoot) import Gargantext.Database.Root (getRoot)
import Gargantext.Database.Schema.Ngrams -- (insertNgrams, Ngrams(..), NgramsIndexed(..), indexNgrams, NgramsType(..), text2ngrams, ngramsTypeId) import Gargantext.Database.Schema.Ngrams -- (insertNgrams, Ngrams(..), NgramsIndexed(..), indexNgrams, NgramsType(..), text2ngrams, ngramsTypeId)
import Gargantext.Database.Schema.Node -- (mkRoot, mkCorpus, getOrMkList, mkGraph, mkPhylo, mkDashboard, mkAnnuaire, getCorporaWithParentId, HasNodeError, NodeError(..), nodeError) import Gargantext.Database.Schema.Node -- (mkRoot, mkCorpus, getOrMkList, mkGraph, {-mkPhylo,-} mkDashboard, mkAnnuaire, getCorporaWithParentId, HasNodeError, NodeError(..), nodeError)
import Gargantext.Database.Schema.User (getUser, UserLight(..)) import Gargantext.Database.Schema.User (getUser, UserLight(..))
import Gargantext.Database.TextSearch (searchInDatabase) import Gargantext.Database.TextSearch (searchInDatabase)
import Gargantext.Database.Types.Node -- (HyperdataDocument(..), NodeType(..), NodeId, UserId, ListId, CorpusId, RootId, MasterCorpusId, MasterUserId) import Gargantext.Database.Types.Node -- (HyperdataDocument(..), NodeType(..), NodeId, UserId, ListId, CorpusId, RootId, MasterCorpusId, MasterUserId)
...@@ -177,8 +177,6 @@ flowCorpus :: (FlowCmdM env err m, FlowCorpus a) ...@@ -177,8 +177,6 @@ flowCorpus :: (FlowCmdM env err m, FlowCorpus a)
flowCorpus = flow (Nothing :: Maybe HyperdataCorpus) flowCorpus = flow (Nothing :: Maybe HyperdataCorpus)
------------------------------------------------------------------------ ------------------------------------------------------------------------
flowCorpusUser :: (FlowCmdM env err m, MkCorpus c) flowCorpusUser :: (FlowCmdM env err m, MkCorpus c)
=> Lang -> Username -> Either CorpusName [CorpusId] -> Maybe c -> [NodeId] -> m CorpusId => Lang -> Username -> Either CorpusName [CorpusId] -> Maybe c -> [NodeId] -> m CorpusId
flowCorpusUser l userName corpusName ctype ids = do flowCorpusUser l userName corpusName ctype ids = do
...@@ -199,7 +197,7 @@ flowCorpusUser l userName corpusName ctype ids = do ...@@ -199,7 +197,7 @@ flowCorpusUser l userName corpusName ctype ids = do
-- User Graph Flow -- User Graph Flow
_ <- mkDashboard userCorpusId userId _ <- mkDashboard userCorpusId userId
_ <- mkGraph userCorpusId userId _ <- mkGraph userCorpusId userId
_ <- mkPhylo userCorpusId userId --_ <- mkPhylo userCorpusId userId
--} --}
......
...@@ -89,6 +89,3 @@ toDoc l (Doc.PubMed (Doc.PubMedArticle t j as aus) ...@@ -89,6 +89,3 @@ toDoc l (Doc.PubMed (Doc.PubMedArticle t j as aus)
abstract :: Maybe [Text] -> Maybe Text abstract :: Maybe [Text] -> Maybe Text
abstract as' = fmap (Text.intercalate ", ") as' abstract as' = fmap (Text.intercalate ", ") as'
...@@ -77,7 +77,7 @@ getGraph nId = do ...@@ -77,7 +77,7 @@ getGraph nId = do
<$> groupNodesByNgrams ngs <$> groupNodesByNgrams ngs
<$> getNodesByNgramsOnlyUser cId (lIds <> [lId]) NgramsTerms (Map.keys ngs) <$> getNodesByNgramsOnlyUser cId (lIds <> [lId]) NgramsTerms (Map.keys ngs)
graph <- liftIO $ cooc2graph 1 myCooc graph <- liftIO $ cooc2graph 0 myCooc
pure $ set graph_metadata (Just metadata) graph pure $ set graph_metadata (Just metadata) graph
......
...@@ -23,7 +23,7 @@ extra-deps: ...@@ -23,7 +23,7 @@ extra-deps:
- git: https://github.com/robstewart57/rdf4h.git - git: https://github.com/robstewart57/rdf4h.git
commit: 4fd2edf30c141600ffad6d730cc4c1c08a6dbce4 commit: 4fd2edf30c141600ffad6d730cc4c1c08a6dbce4
- git: https://gitlab.iscpif.fr/gargantext/crawlers/pubmed.git - git: https://gitlab.iscpif.fr/gargantext/crawlers/pubmed.git
commit: 23a3e2cdad564299aa294286a9fc74c550bd09db commit: ac4f8ecfb2e579041a350e4718bc6d4e7a832d92
- git: https://gitlab.iscpif.fr/gargantext/crawlers/hal.git - git: https://gitlab.iscpif.fr/gargantext/crawlers/hal.git
commit: bf57642f6b66f554fdc0a38ac391cd8200dffcb3 commit: bf57642f6b66f554fdc0a38ac391cd8200dffcb3
- git: https://gitlab.iscpif.fr/gargantext/patches-class - git: https://gitlab.iscpif.fr/gargantext/patches-class
......
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