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
160
Issues
160
List
Board
Labels
Milestones
Merge Requests
14
Merge Requests
14
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
56317d50
Commit
56317d50
authored
Jul 19, 2024
by
mzheng
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
renaming HAL.Corpus to HAL.Document
parent
13359943
Pipeline
#6413
passed with stages
in 46 minutes and 53 seconds
Changes
4
Pipelines
1
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
# with the `sha256sum` result calculated on the `cabal.project` and
# `cabal.project.freeze`. This ensures the files stay deterministic so that CI
# cache can kick in.
expected_cabal_project_hash
=
"
ec368714e0d4213dcc60e7c98344ab9a4ecbcff522deb4c57a12490e3b048585
"
expected_cabal_project_hash
=
"
c2c8ffc22f513f962745a00db6f9199eca89066ecbb47c850e5969550a4e6e1e
"
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
cabal
--store-dir
=
$STORE_DIR
v2-freeze
...
...
cabal.project
View file @
56317d50
...
...
@@ -93,7 +93,7 @@ source-repository-package
source
-
repository
-
package
type
:
git
location
:
https
://
gitlab
.
iscpif
.
fr
/
gargantext
/
crawlers
/
hal
.
git
tag
:
3665
ccda54893d01bb27220538eefdde0c1e7419
tag
:
1
dbd939257d33126e49d2679375553df1f2eebc5
source
-
repository
-
package
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(..
import
Gargantext.Defaults
qualified
as
Defaults
import
Gargantext.Prelude
hiding
(
intercalate
)
import
HAL
qualified
import
HAL.Doc.
Corpus
qualified
as
HAL
import
HAL.Doc.
Document
qualified
as
HAL
import
HAL.Types
qualified
as
HAL
import
Servant.Client
(
ClientError
)
...
...
@@ -38,23 +38,23 @@ getC la q ml = do
-- Left err -> panic $ pack $ show err
-- Right (len, docsC) -> pure (len, docsC .| mapMC (toDoc' la))
toDoc'
::
Maybe
ISO639
.
ISO639_1
->
HAL
.
Corpus
->
IO
HyperdataDocument
toDoc'
la
(
HAL
.
Corpus
{
..
})
=
do
toDoc'
::
Maybe
ISO639
.
ISO639_1
->
HAL
.
Document
->
IO
HyperdataDocument
toDoc'
la
(
HAL
.
Document
{
..
})
=
do
-- 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
abstractDefault
=
unwords
_
corpus
_abstract
let
abstractDefault
=
unwords
_
document
_abstract
let
abstract
=
case
la
of
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"
,
_hd_doi
=
Just
$
pack
$
show
_
corpus
_docid
,
_hd_doi
=
Just
$
pack
$
show
_
document
_docid
,
_hd_url
=
Nothing
,
_hd_page
=
Nothing
,
_hd_title
=
Just
$
unwords
_
corpus
_title
,
_hd_authors
=
Just
$
foldl'
(
\
x
y
->
if
x
==
""
then
y
else
x
<>
", "
<>
y
)
""
_
corpus
_authors_names
,
_hd_institutes
=
Just
$
foldl'
(
\
x
y
->
if
x
==
""
then
y
else
x
<>
", "
<>
y
)
""
$
_
corpus_authors_affiliations
<>
map
show
_corpus
_struct_id
,
_hd_source
=
Just
$
maybe
"Nothing"
identity
_
corpus
_source
,
_hd_title
=
Just
$
unwords
_
document
_title
,
_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
)
""
$
_
document_authors_affiliations
<>
map
show
_document
_struct_id
,
_hd_source
=
Just
$
maybe
"Nothing"
identity
_
document
_source
,
_hd_abstract
=
Just
abstract
,
_hd_publication_date
=
fmap
show
utctime
,
_hd_publication_year
=
pub_year
...
...
stack.yaml
View file @
56317d50
...
...
@@ -126,7 +126,7 @@
git
:
"
https://gitlab.iscpif.fr/gargantext/crawlers/epo-proxy-api.git"
subdirs
:
-
.
-
commit
:
3665ccda54893d01bb27220538eefdde0c1e7419
-
commit
:
1dbd939257d33126e49d2679375553df1f2eebc5
git
:
"
https://gitlab.iscpif.fr/gargantext/crawlers/hal.git"
subdirs
:
-
.
...
...
@@ -316,7 +316,7 @@ flags:
"
full-text-search"
:
"
build-search-demo"
:
false
gargantext
:
"
no-phylo-debug-logs"
:
tru
e
"
no-phylo-debug-logs"
:
fals
e
"
test-crypto"
:
false
"
ghc-lib-parser"
:
"
threaded-rts"
:
true
...
...
Przemyslaw Kaminski
@cgenie
mentioned in commit
5660aec0
·
Oct 08, 2024
mentioned in commit
5660aec0
mentioned in commit 5660aec07ec5a0a0a5468f440092c1a8f57a864e
Toggle commit list
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