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
148
Issues
148
List
Board
Labels
Milestones
Merge Requests
7
Merge Requests
7
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
ca36379d
Verified
Commit
ca36379d
authored
Nov 02, 2023
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[WIP] epo: some work
parent
c71dbb14
Pipeline
#5322
failed with stages
in 1 minute and 1 second
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
6 deletions
+22
-6
cabal.project
cabal.project
+7
-0
gargantext.cabal
gargantext.cabal
+4
-3
Types.hs
src/Gargantext/API/Admin/Orchestrator/Types.hs
+1
-0
Types.hs
src/Gargantext/API/Node/Corpus/Types.hs
+2
-0
API.hs
src/Gargantext/Core/Text/Corpus/API.hs
+5
-0
OpenAlex.hs
src/Gargantext/Core/Text/Corpus/API/OpenAlex.hs
+3
-3
No files found.
cabal.project
View file @
ca36379d
...
...
@@ -6,6 +6,8 @@ with-compiler: ghc-8.10.7
packages
:
./
../
epo
-
api
-
client
../
openalex
source
-
repository
-
package
type
:
git
...
...
@@ -91,6 +93,11 @@ source-repository-package
location
:
https
://
gitlab
.
iscpif
.
fr
/
gargantext
/
crawlers
/
isidore
.
git
tag
:
3
db385e767d2100d8abe900833c6e7de3ac55e1b
source
-
repository
-
package
type
:
git
location
:
https
://
gitlab
.
iscpif
.
fr
/
gargantext
/
iso639
.
git
tag
:
1
a9e23e210a02da3b846d7cdc666541e2148334d
source
-
repository
-
package
type
:
git
location
:
https
://
gitlab
.
iscpif
.
fr
/
gargantext
/
crawlers
/
istex
.
git
...
...
gargantext.cabal
View file @
ca36379d
...
...
@@ -431,6 +431,7 @@ library
, duckling ^>= 0.2.0.0
, ekg-core ^>= 0.1.1.7
, ekg-json ^>= 0.1.0.7
, epo-api-client
, exceptions ^>= 0.10.4
, extra ^>= 1.7.9
, fast-logger ^>= 3.0.5
...
...
@@ -461,7 +462,7 @@ library
, ihaskell ^>= 0.10.2.2
, ini ^>= 0.4.1
, insert-ordered-containers ^>= 0.2.5.1
, iso639
^>= 0.1.0.3
, iso639
, jose ^>= 0.8.4
, json-stream ^>= 0.4.2.4
, lens ^>= 4.19.2
...
...
@@ -494,7 +495,7 @@ library
, process ^>= 1.6.13.2
, product-profunctors ^>= 0.11.0.3
, profunctors ^>= 5.6.2
, protolude ^>= 0.3.
0
, protolude ^>= 0.3.
3
, pureMD5 ^>= 2.1.4
, quickcheck-instances ^>= 0.3.25.2
, rake ^>= 0.0.1
...
...
@@ -667,7 +668,7 @@ executable gargantext-cli
, gargantext-prelude
, ini ^>= 0.4.1
, optparse-generic ^>= 1.4.7
, protolude ^>= 0.3.
0
, protolude ^>= 0.3.
3
, split ^>= 0.2.3.4
, text ^>= 1.2.4.1
, unordered-containers ^>= 0.2.16.0
...
...
src/Gargantext/API/Admin/Orchestrator/Types.hs
View file @
ca36379d
...
...
@@ -36,6 +36,7 @@ data ExternalAPIs = OpenAlex
|
HAL
|
IsTex
|
Isidore
|
EPO
deriving
(
Show
,
Eq
,
Generic
,
Enum
,
Bounded
)
...
...
src/Gargantext/API/Node/Corpus/Types.hs
View file @
ca36379d
...
...
@@ -32,6 +32,7 @@ data Database = Empty
|
HAL
|
IsTex
|
Isidore
|
EPO
deriving
(
Eq
,
Show
,
Generic
,
Enum
,
Bounded
)
instance
Arbitrary
Database
where
...
...
@@ -49,6 +50,7 @@ database2origin Arxiv = ExternalOrigin Types.Arxiv
database2origin
HAL
=
ExternalOrigin
Types
.
HAL
database2origin
IsTex
=
ExternalOrigin
Types
.
IsTex
database2origin
Isidore
=
ExternalOrigin
Types
.
Isidore
database2origin
EPO
=
ExternalOrigin
Types
.
EPO
------------------------------------------------------------------------
data
Datafield
=
Gargantext
...
...
src/Gargantext/Core/Text/Corpus/API.hs
View file @
ca36379d
...
...
@@ -21,9 +21,11 @@ module Gargantext.Core.Text.Corpus.API
import
Conduit
import
Control.Monad.Except
import
Data.Text
qualified
as
T
import
EPO.API.Client.Types
qualified
as
EPO
import
Gargantext.API.Admin.Orchestrator.Types
(
ExternalAPIs
(
..
),
externalAPIs
)
import
Gargantext.Core
(
Lang
(
..
),
toISO639
)
import
Gargantext.Core.Text.Corpus.API.Arxiv
qualified
as
Arxiv
import
Gargantext.Core.Text.Corpus.API.EPO
qualified
as
EPO
import
Gargantext.Core.Text.Corpus.API.Hal
qualified
as
HAL
import
Gargantext.Core.Text.Corpus.API.Isidore
qualified
as
ISIDORE
import
Gargantext.Core.Text.Corpus.API.Istex
qualified
as
ISTEX
...
...
@@ -47,6 +49,7 @@ get :: ExternalAPIs
->
Lang
->
Corpus
.
RawQuery
->
Maybe
PUBMED
.
APIKey
->
Maybe
EPO
.
AuthKey
->
Maybe
Corpus
.
Limit
-- -> IO [HyperdataDocument]
->
IO
(
Either
GetCorpusError
(
Maybe
Integer
,
ConduitT
()
HyperdataDocument
IO
()
))
...
...
@@ -69,5 +72,7 @@ get externalAPI la q mPubmedAPIKey limit = do
Isidore
->
do
docs
<-
ISIDORE
.
get
la
(
Corpus
.
getLimit
<$>
limit
)
(
Just
$
Corpus
.
getRawQuery
q
)
Nothing
pure
$
Right
(
Just
$
fromIntegral
$
length
docs
,
yieldMany
docs
)
EPO
->
do
first
ExternalAPIError
<$>
EPO
.
get
(
fromMaybe
""
Nothing
{- email -}
)
q
(
toISO639
la
)
limit
where
parse_query
=
first
(
InvalidInputQuery
q
.
T
.
pack
)
$
Corpus
.
parseQuery
q
src/Gargantext/Core/Text/Corpus/API/OpenAlex.hs
View file @
ca36379d
...
...
@@ -45,10 +45,10 @@ toDoc (OA.Work { .. } ) =
,
_hd_institutes
=
institutes
authorships
,
_hd_source
=
source
,
_hd_abstract
=
Just
abstract_reconstructed
,
_hd_publication_date
=
Just
$
show
publication_date
,
_hd_publication_date
=
Just
$
OA
.
showDate
publication_date
,
_hd_publication_year
=
Just
$
publication_year
,
_hd_publication_month
=
Nothing
-- TODO
,
_hd_publication_day
=
Nothing
-- TODO
,
_hd_publication_month
=
Just
$
OA
.
dateMonth
publication_date
,
_hd_publication_day
=
Just
$
OA
.
dateDay
publication_date
,
_hd_publication_hour
=
Nothing
-- TODO
,
_hd_publication_minute
=
Nothing
-- TODO
,
_hd_publication_second
=
Nothing
-- TODO
...
...
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