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
12
Merge Requests
12
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
67e1e32d
Commit
67e1e32d
authored
Aug 28, 2019
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[STACK LTS] upgrade + external API deps.
parent
f8b3f9de
Pipeline
#546
failed with stage
Changes
12
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
83 additions
and
26 deletions
+83
-26
package.yaml
package.yaml
+2
-2
API.hs
src/Gargantext/API.hs
+1
-1
Ngrams.hs
src/Gargantext/API/Ngrams.hs
+3
-3
Orchestrator._hs
src/Gargantext/API/Orchestrator._hs
+0
-0
Schedule._hs
src/Gargantext/API/Orchestrator/Scrapy/Schedule._hs
+0
-0
Types._hs
src/Gargantext/API/Orchestrator/Types._hs
+0
-0
Settings.hs
src/Gargantext/API/Settings.hs
+7
-7
Utils.hs
src/Gargantext/API/Utils.hs
+51
-0
API.hs
src/Gargantext/Text/Corpus/API.hs
+1
-1
Chart.hs
src/Gargantext/Viz/Chart.hs
+1
-1
API.hs
src/Gargantext/Viz/Phylo/API.hs
+1
-1
stack.yaml
stack.yaml
+16
-10
No files found.
package.yaml
View file @
67e1e32d
...
...
@@ -30,7 +30,7 @@ library:
-
Gargantext.API.FrontEnd
-
Gargantext.API.Ngrams
-
Gargantext.API.Node
-
Gargantext.API.Orchestrator
#
- Gargantext.API.Orchestrator
-
Gargantext.API.Search
-
Gargantext.API.Settings
-
Gargantext.Core
...
...
@@ -168,7 +168,7 @@ library:
-
servant-auth
-
servant-blaze
-
servant-client
-
servant-job
#
- servant-job
-
servant-mock
-
servant-multipart
-
servant-server
...
...
src/Gargantext/API.hs
View file @
67e1e32d
...
...
@@ -126,7 +126,7 @@ instance HasInvalidError GargError where
instance
HasTreeError
GargError
where
_TreeError
=
_GargTreeError
showAsServantErr
::
Show
a
=>
a
->
Serv
antEr
r
showAsServantErr
::
Show
a
=>
a
->
Serv
erErro
r
showAsServantErr
a
=
err500
{
errBody
=
BL8
.
pack
$
show
a
}
fireWall
::
Applicative
f
=>
Request
->
FireWall
->
f
Bool
...
...
src/Gargantext/API/Ngrams.hs
View file @
67e1e32d
...
...
@@ -56,7 +56,7 @@ import Data.Map.Strict (Map)
import
qualified
Data.Set
as
Set
import
Control.Category
((
>>>
))
import
Control.Concurrent
import
Control.Lens
(
makeLenses
,
makePrisms
,
Getter
,
Iso
'
,
iso
,
from
,
(
.~
),
(
?=
),
(
#
),
to
,
folded
,
{-withIndex, ifolded,-}
view
,
use
,
(
^.
),
(
^..
),
(
^?
),
(
+~
),
(
%~
),
(
%=
),
sumOf
,
at
,
_Just
,
Each
(
..
),
itraverse_
,
both
,
forOf_
,
(
%%~
))
import
Control.Lens
(
makeLenses
,
makePrisms
,
Getter
,
Iso
'
,
iso
,
from
,
(
.~
),
(
?=
),
(
#
),
to
,
folded
,
{-withIndex, ifolded,-}
view
,
use
,
(
^.
),
(
^..
),
(
^?
),
(
+~
),
(
%~
),
(
%=
),
sumOf
,
at
,
_Just
,
Each
(
..
),
itraverse_
,
both
,
forOf_
,
(
%%~
)
,
(
?~
)
)
import
Control.Monad.Error.Class
(
MonadError
)
import
Control.Monad.Reader
import
Control.Monad.State
...
...
@@ -441,11 +441,11 @@ instance (Eq a, Arbitrary a) => Arbitrary (Replace a) where
-- If they happen to be equal then the patch is Keep.
instance
ToSchema
a
=>
ToSchema
(
Replace
a
)
where
declareNamedSchema
(
_
::
p
roxy
(
Replace
a
))
=
do
declareNamedSchema
(
_
::
P
roxy
(
Replace
a
))
=
do
-- TODO Keep constructor is not supported here.
aSchema
<-
declareSchemaRef
(
Proxy
::
Proxy
a
)
return
$
NamedSchema
(
Just
"Replace"
)
$
mempty
&
type_
.
~
SwaggerObject
&
type_
?
~
SwaggerObject
&
properties
.~
InsOrdHashMap
.
fromList
[
(
"old"
,
aSchema
)
...
...
src/Gargantext/API/Orchestrator.hs
→
src/Gargantext/API/Orchestrator.
_
hs
View file @
67e1e32d
File moved
src/Gargantext/API/Orchestrator/Scrapy/Schedule.hs
→
src/Gargantext/API/Orchestrator/Scrapy/Schedule.
_
hs
View file @
67e1e32d
File moved
src/Gargantext/API/Orchestrator/Types.hs
→
src/Gargantext/API/Orchestrator/Types.
_
hs
View file @
67e1e32d
File moved
src/Gargantext/API/Settings.hs
View file @
67e1e32d
...
...
@@ -46,7 +46,7 @@ import qualified Data.ByteString.Lazy as L
import
Servant
import
Servant.Client
(
BaseUrl
,
parseBaseUrl
)
import
Servant.Job.Async
(
newJobEnv
,
defaultSettings
)
--
import Servant.Job.Async (newJobEnv, defaultSettings)
import
Web.HttpApiData
(
parseUrlPiece
)
import
qualified
Jose.Jwk
as
Jose
import
qualified
Jose.Jwa
as
Jose
...
...
@@ -60,7 +60,7 @@ import Control.Lens
import
Gargantext.Prelude
import
Gargantext.Database.Utils
(
databaseParameters
,
HasConnection
(
..
),
Cmd
'
,
runCmd
)
import
Gargantext.API.Ngrams
(
NgramsRepo
,
HasRepoVar
(
..
),
HasRepoSaver
(
..
),
HasRepo
(
..
),
RepoEnv
(
..
),
r_version
,
saveRepo
,
initRepo
,
renv_var
,
renv_lock
)
import
Gargantext.API.Orchestrator.Types
--
import Gargantext.API.Orchestrator.Types
type
PortNumber
=
Int
...
...
@@ -147,7 +147,7 @@ data Env = Env
,
_env_repo
::
!
RepoEnv
,
_env_manager
::
!
Manager
,
_env_self_url
::
!
BaseUrl
,
_env_scrapers
::
!
ScrapersEnv
--
, _env_scrapers :: !ScrapersEnv
}
deriving
(
Generic
)
...
...
@@ -243,7 +243,7 @@ newEnv port file = do
param
<-
databaseParameters
file
conn
<-
connect
param
repo
<-
readRepoEnv
scrapers_env
<-
newJobEnv
defaultSettings
manager
--
scrapers_env <- newJobEnv defaultSettings manager
logger
<-
newStderrLoggerSet
defaultBufSize
pure
$
Env
...
...
@@ -252,7 +252,7 @@ newEnv port file = do
,
_env_conn
=
conn
,
_env_repo
=
repo
,
_env_manager
=
manager
,
_env_scrapers
=
scrapers_env
--
, _env_scrapers = scrapers_env
,
_env_self_url
=
self_url
}
...
...
@@ -305,7 +305,7 @@ withDevEnv iniPath k = do
runCmdRepl
::
Show
err
=>
Cmd'
DevEnv
err
a
->
IO
a
runCmdRepl
f
=
withDevEnv
"gargantext.ini"
$
\
env
->
runCmdDev
env
f
runCmdReplServantErr
::
Cmd'
DevEnv
Serv
antEr
r
a
->
IO
a
runCmdReplServantErr
::
Cmd'
DevEnv
Serv
erErro
r
a
->
IO
a
runCmdReplServantErr
=
runCmdRepl
-- Use only for dev
...
...
@@ -324,5 +324,5 @@ runCmdDevNoErr :: DevEnv -> Cmd' DevEnv () a -> IO a
runCmdDevNoErr
=
runCmdDev
-- Use only for dev
runCmdDevServantErr
::
DevEnv
->
Cmd'
DevEnv
Serv
antEr
r
a
->
IO
a
runCmdDevServantErr
::
DevEnv
->
Cmd'
DevEnv
Serv
erErro
r
a
->
IO
a
runCmdDevServantErr
=
runCmdDev
src/Gargantext/API/Utils.hs
0 → 100644
View file @
67e1e32d
{-|
Module : Gargantext.API.Utils
Description : Server API main Types
Copyright : (c) CNRS, 2017-Present
License : BSD3
Maintainer : team@gargantext.org
Stability : experimental
Portability : POSIX
Mainly copied from Servant.Job.Utils (Thanks)
-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE NoImplicitPrelude #-}
module
Gargantext.API.Utils
where
import
Gargantext.Prelude
import
Data.Maybe
(
Maybe
,
fromMaybe
)
import
Prelude
(
String
)
import
qualified
Data.Text
as
T
import
Data.Swagger
import
Data.Text
(
Text
)
swaggerOptions
::
Text
->
SchemaOptions
swaggerOptions
pref
=
defaultSchemaOptions
{
Data
.
Swagger
.
fieldLabelModifier
=
modifier
pref
,
Data
.
Swagger
.
unwrapUnaryRecords
=
False
}
modifier
::
Text
->
String
->
String
modifier
pref
field
=
T
.
unpack
$
T
.
stripPrefix
pref
(
T
.
pack
field
)
?!
"Expecting prefix "
<>
T
.
unpack
pref
infixr
4
?|
-- Reverse infix form of "fromMaybe"
(
?|
)
::
Maybe
a
->
a
->
a
(
?|
)
=
flip
fromMaybe
infixr
4
?!
-- Reverse infix form of "fromJust" with a custom error message
(
?!
)
::
Maybe
a
->
String
->
a
(
?!
)
ma'
msg
=
ma'
?|
panic
(
T
.
pack
msg
)
src/Gargantext/Text/Corpus/API.hs
View file @
67e1e32d
...
...
@@ -55,7 +55,7 @@ type Query = Text
type
Limit
=
PubMed
.
Limit
get
::
ExternalAPIs
->
Query
->
Maybe
Limit
->
IO
[
HyperdataDocument
]
get
PubMed
q
l
=
either
(
\
e
->
panic
$
"CRAWL: PubMed"
<>
e
)
(
map
(
toDoc
EN
))
<$>
PubMed
.
crawler
q
l
get
PubMed
q
l
=
either
(
\
e
->
panic
$
"CRAWL: PubMed"
<>
e
)
(
map
(
toDoc
EN
))
<$>
PubMed
.
getMetadataWith
q
l
get
_
_
_
=
undefined
toDoc
::
Lang
->
Doc
.
PubMed
->
HyperdataDocument
...
...
src/Gargantext/Viz/Chart.hs
View file @
67e1e32d
...
...
@@ -106,7 +106,7 @@ treeData cId nt lt = do
pure
$
toTree
lt
cs'
m
treeData'
::
FlowCmdM
env
Serv
antEr
r
m
treeData'
::
FlowCmdM
env
Serv
erErro
r
m
=>
CorpusId
->
NgramsType
->
ListType
->
m
[
MyTree
]
treeData'
cId
nt
lt
=
do
...
...
src/Gargantext/Viz/Phylo/API.hs
View file @
67e1e32d
...
...
@@ -29,6 +29,7 @@ import qualified Data.ByteString as DB
import
qualified
Data.ByteString.Lazy
as
DBL
import
Data.Swagger
import
Gargantext.API.Types
import
Gargantext.API.Utils
(
swaggerOptions
)
import
Gargantext.Database.Types.Node
(
PhyloId
,
ListId
,
CorpusId
)
import
Gargantext.Database.Schema.Node
(
insertNodes
,
nodePhyloW
,
getNodePhylo
)
import
Gargantext.Database.Types.Node
-- (NodePhylo(..))
...
...
@@ -38,7 +39,6 @@ import Gargantext.Viz.Phylo.Main
import
Gargantext.Viz.Phylo.Example
import
Gargantext.API.Ngrams
(
TODO
(
..
))
import
Servant
import
Servant.Job.Utils
(
swaggerOptions
)
import
Test.QuickCheck
(
elements
)
import
Test.QuickCheck.Arbitrary
(
Arbitrary
,
arbitrary
)
import
Web.HttpApiData
(
parseUrlPiece
,
readTextData
)
...
...
stack.yaml
View file @
67e1e32d
resolver
:
lts-1
2.26
resolver
:
lts-1
4.1
flags
:
{}
extra-package-dbs
:
[]
packages
:
...
...
@@ -22,14 +22,21 @@ extra-deps:
commit
:
3fe28b683aba5ddf05e3b5f8eced0bd05c5a29f9
-
git
:
https://github.com/robstewart57/rdf4h.git
commit
:
4fd2edf30c141600ffad6d730cc4c1c08a6dbce4
#
# External API connectin to get data
-
git
:
https://gitlab.iscpif.fr/gargantext/crawlers/pubmed.git
commit
:
ac4f8ecfb2e579041a350e4718bc6d4e7a832d92
commit
:
01a6bf1e79cd5aef8628b240bbd47cb2a0864d5e
-
git
:
https://gitlab.iscpif.fr/gargantext/crawlers/istex.git
commit
:
daeae80365250c4bd539f0a65e271f9aa37f731f
-
git
:
https://gitlab.iscpif.fr/gargantext/crawlers/hal.git
commit
:
bf57642f6b66f554fdc0a38ac391cd8200dffcb3
commit
:
ef9e638c97788df251f50b71fcdd9551b87f12c5
-
git
:
https://gitlab.iscpif.fr/gargantext/crawlers/isidore.git
commit
:
3db385e767d2100d8abe900833c6e7de3ac55e1b
#
-
git
:
https://gitlab.iscpif.fr/gargantext/patches-class
commit
:
746b4ce0af8f9e600d555ad7e5b2973a940cdad9
-
git
:
https://github.com/np/servant-job.git
commit
:
ac4227441bbca30c44235582b5ec31340c569021
#
- git: https://github.com/np/servant-job.git
#
commit: ac4227441bbca30c44235582b5ec31340c569021
-
git
:
https://gitlab.iscpif.fr/gargantext/clustering-louvain.git
commit
:
1c636112b151110408e7c5a28cec39e46657358e
-
git
:
https://github.com/np/patches-map
...
...
@@ -38,10 +45,8 @@ extra-deps:
commit
:
53385de076be09f728a1b58c035a18e9ff9bcfd6
-
git
:
https://github.com/delanoe/hsparql.git
commit
:
308c74b71a1abb0a91546fa57d353131248e3a7f
-
git
:
https://gitlab.iscpif.fr/gargantext/crawlers/isidore.git
commit
:
e39454101b53916e3082085ebfe922df695fc775
-
KMP-0.1.0.2
-
accelerate-1.2.0.
0
-
accelerate-1.2.0.
1
-
aeson-lens-0.5.0.0
-
deepseq-th-0.1.0.4
-
duckling-0.1.3.0
...
...
@@ -56,8 +61,9 @@ extra-deps:
-
json-stream-0.4.2.4
# Text.Parsers (JSON)
-
serialise-0.2.0.0
-
servant-flatten-0.2
-
servant-multipart-0.11.2
#
- servant-multipart-0.11.2
-
stemmer-0.5.2
-
time-units-1.0.0
-
validity-0.9.0.0
# patches-{map,class}
-
directory-1.3.1.5
-
directory-1.3.1.5
-
process-1.6.5.1@sha256:77a9afeb676357f67fe5cf1ad79aca0745fb6f7fb96b786d510af08f622643f6,2468
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