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
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Christian Merten
haskell-gargantext
Commits
56317d50
Commit
56317d50
authored
Jul 19, 2024
by
mzheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
renaming HAL.Corpus to HAL.Document
parent
13359943
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
16 deletions
+16
-16
update-project-dependencies
bin/update-project-dependencies
+2
-2
cabal.project
cabal.project
+1
-1
Hal.hs
src/Gargantext/Core/Text/Corpus/API/Hal.hs
+11
-11
stack.yaml
stack.yaml
+2
-2
No files found.
bin/update-project-dependencies
View file @
56317d50
...
@@ -18,10 +18,10 @@ fi
...
@@ -18,10 +18,10 @@ fi
# with the `sha256sum` result calculated on the `cabal.project` and
# with the `sha256sum` result calculated on the `cabal.project` and
# `cabal.project.freeze`. This ensures the files stay deterministic so that CI
# `cabal.project.freeze`. This ensures the files stay deterministic so that CI
# cache can kick in.
# cache can kick in.
expected_cabal_project_hash
=
"
ec368714e0d4213dcc60e7c98344ab9a4ecbcff522deb4c57a12490e3b048585
"
expected_cabal_project_hash
=
"
c2c8ffc22f513f962745a00db6f9199eca89066ecbb47c850e5969550a4e6e1e
"
expected_cabal_project_freeze_hash
=
"0999af7642e822e6b4e2996b743c8f924cdfa406c9b2941bb53f1ca7b3a0737d"
expected_cabal_project_freeze_hash
=
"0999af7642e822e6b4e2996b743c8f924cdfa406c9b2941bb53f1ca7b3a0737d"
cabal
--store-dir
=
$STORE_DIR
v2-build
--dry-run
cabal
--store-dir
=
$STORE_DIR
v2-build
--dry-run
--minimize-conflict-set
cabal2stack
--system-ghc
--allow-newer
--resolver
lts-21.17
--resolver-file
devops/stack/lts-21.17.yaml
-o
stack.yaml
cabal2stack
--system-ghc
--allow-newer
--resolver
lts-21.17
--resolver-file
devops/stack/lts-21.17.yaml
-o
stack.yaml
cabal
--store-dir
=
$STORE_DIR
v2-freeze
cabal
--store-dir
=
$STORE_DIR
v2-freeze
...
...
cabal.project
View file @
56317d50
...
@@ -93,7 +93,7 @@ source-repository-package
...
@@ -93,7 +93,7 @@ source-repository-package
source
-
repository
-
package
source
-
repository
-
package
type
:
git
type
:
git
location
:
https
://
gitlab
.
iscpif
.
fr
/
gargantext
/
crawlers
/
hal
.
git
location
:
https
://
gitlab
.
iscpif
.
fr
/
gargantext
/
crawlers
/
hal
.
git
tag
:
3665
ccda54893d01bb27220538eefdde0c1e7419
tag
:
1
dbd939257d33126e49d2679375553df1f2eebc5
source
-
repository
-
package
source
-
repository
-
package
type
:
git
type
:
git
...
...
src/Gargantext/Core/Text/Corpus/API/Hal.hs
View file @
56317d50
...
@@ -21,7 +21,7 @@ import Gargantext.Database.Admin.Types.Hyperdata.Document ( HyperdataDocument(..
...
@@ -21,7 +21,7 @@ import Gargantext.Database.Admin.Types.Hyperdata.Document ( HyperdataDocument(..
import
Gargantext.Defaults
qualified
as
Defaults
import
Gargantext.Defaults
qualified
as
Defaults
import
Gargantext.Prelude
hiding
(
intercalate
)
import
Gargantext.Prelude
hiding
(
intercalate
)
import
HAL
qualified
import
HAL
qualified
import
HAL.Doc.
Corpus
qualified
as
HAL
import
HAL.Doc.
Document
qualified
as
HAL
import
HAL.Types
qualified
as
HAL
import
HAL.Types
qualified
as
HAL
import
Servant.Client
(
ClientError
)
import
Servant.Client
(
ClientError
)
...
@@ -38,23 +38,23 @@ getC la q ml = do
...
@@ -38,23 +38,23 @@ getC la q ml = do
-- Left err -> panic $ pack $ show err
-- Left err -> panic $ pack $ show err
-- Right (len, docsC) -> pure (len, docsC .| mapMC (toDoc' la))
-- Right (len, docsC) -> pure (len, docsC .| mapMC (toDoc' la))
toDoc'
::
Maybe
ISO639
.
ISO639_1
->
HAL
.
Corpus
->
IO
HyperdataDocument
toDoc'
::
Maybe
ISO639
.
ISO639_1
->
HAL
.
Document
->
IO
HyperdataDocument
toDoc'
la
(
HAL
.
Corpus
{
..
})
=
do
toDoc'
la
(
HAL
.
Document
{
..
})
=
do
-- printDebug "[toDoc corpus] h" h
-- printDebug "[toDoc corpus] h" h
let
mDateS
=
_
corpus
_date
<|>
Just
(
pack
$
show
Defaults
.
year
)
let
mDateS
=
_
document
_date
<|>
Just
(
pack
$
show
Defaults
.
year
)
let
(
utctime
,
(
pub_year
,
pub_month
,
pub_day
))
=
Date
.
mDateSplit
mDateS
let
(
utctime
,
(
pub_year
,
pub_month
,
pub_day
))
=
Date
.
mDateSplit
mDateS
let
abstractDefault
=
unwords
_
corpus
_abstract
let
abstractDefault
=
unwords
_
document
_abstract
let
abstract
=
case
la
of
let
abstract
=
case
la
of
Nothing
->
abstractDefault
Nothing
->
abstractDefault
Just
l
->
maybe
abstractDefault
unwords
(
Map
.
lookup
l
_
corpus
_abstract_lang_map
)
Just
l
->
maybe
abstractDefault
unwords
(
Map
.
lookup
l
_
document
_abstract_lang_map
)
pure
HyperdataDocument
{
_hd_bdd
=
Just
"Hal"
pure
HyperdataDocument
{
_hd_bdd
=
Just
"Hal"
,
_hd_doi
=
Just
$
pack
$
show
_
corpus
_docid
,
_hd_doi
=
Just
$
pack
$
show
_
document
_docid
,
_hd_url
=
Nothing
,
_hd_url
=
Nothing
,
_hd_page
=
Nothing
,
_hd_page
=
Nothing
,
_hd_title
=
Just
$
unwords
_
corpus
_title
,
_hd_title
=
Just
$
unwords
_
document
_title
,
_hd_authors
=
Just
$
foldl'
(
\
x
y
->
if
x
==
""
then
y
else
x
<>
", "
<>
y
)
""
_
corpus
_authors_names
,
_hd_authors
=
Just
$
foldl'
(
\
x
y
->
if
x
==
""
then
y
else
x
<>
", "
<>
y
)
""
_
document
_authors_names
,
_hd_institutes
=
Just
$
foldl'
(
\
x
y
->
if
x
==
""
then
y
else
x
<>
", "
<>
y
)
""
$
_
corpus_authors_affiliations
<>
map
show
_corpus
_struct_id
,
_hd_institutes
=
Just
$
foldl'
(
\
x
y
->
if
x
==
""
then
y
else
x
<>
", "
<>
y
)
""
$
_
document_authors_affiliations
<>
map
show
_document
_struct_id
,
_hd_source
=
Just
$
maybe
"Nothing"
identity
_
corpus
_source
,
_hd_source
=
Just
$
maybe
"Nothing"
identity
_
document
_source
,
_hd_abstract
=
Just
abstract
,
_hd_abstract
=
Just
abstract
,
_hd_publication_date
=
fmap
show
utctime
,
_hd_publication_date
=
fmap
show
utctime
,
_hd_publication_year
=
pub_year
,
_hd_publication_year
=
pub_year
...
...
stack.yaml
View file @
56317d50
...
@@ -126,7 +126,7 @@
...
@@ -126,7 +126,7 @@
git
:
"
https://gitlab.iscpif.fr/gargantext/crawlers/epo-proxy-api.git"
git
:
"
https://gitlab.iscpif.fr/gargantext/crawlers/epo-proxy-api.git"
subdirs
:
subdirs
:
-
.
-
.
-
commit
:
3665ccda54893d01bb27220538eefdde0c1e7419
-
commit
:
1dbd939257d33126e49d2679375553df1f2eebc5
git
:
"
https://gitlab.iscpif.fr/gargantext/crawlers/hal.git"
git
:
"
https://gitlab.iscpif.fr/gargantext/crawlers/hal.git"
subdirs
:
subdirs
:
-
.
-
.
...
@@ -316,7 +316,7 @@ flags:
...
@@ -316,7 +316,7 @@ flags:
"
full-text-search"
:
"
full-text-search"
:
"
build-search-demo"
:
false
"
build-search-demo"
:
false
gargantext
:
gargantext
:
"
no-phylo-debug-logs"
:
tru
e
"
no-phylo-debug-logs"
:
fals
e
"
test-crypto"
:
false
"
test-crypto"
:
false
"
ghc-lib-parser"
:
"
ghc-lib-parser"
:
"
threaded-rts"
:
true
"
threaded-rts"
:
true
...
...
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