Commit 409e2465 authored by mzheng's avatar mzheng

changed HyperdataDocument so it follows the type Document in HAL

parent 39a8897b
...@@ -18,7 +18,7 @@ fi ...@@ -18,7 +18,7 @@ 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="fae6b12c0cb5d80a79c92dd3184b9e19662648de9a12ebd4a0aa336bc31054c0" expected_cabal_project_hash="ed85064669c844e43ebc723ed707b7d320d2133dd5d93d3750257e368d7fe254"
expected_cabal_project_freeze_hash="50f3ccea242400c48bd9cec7286bd07c8223c87c043e09576dd5fef0949f982a" expected_cabal_project_freeze_hash="50f3ccea242400c48bd9cec7286bd07c8223c87c043e09576dd5fef0949f982a"
......
...@@ -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: d54812d52c9d1f86d331a991b3a87c9a8b4379cf tag: 229fdf40b8ccecd527fca5a7bbb554b0deb540dc
source-repository-package source-repository-package
type: git type: git
......
...@@ -97,7 +97,7 @@ getTreeInstitutesUser :: HasDBid NodeType ...@@ -97,7 +97,7 @@ getTreeInstitutesUser :: HasDBid NodeType
-> NgramsType -> NgramsType
-> DBCmd err (HashMap Text [Text]) -> DBCmd err (HashMap Text [Text])
getTreeInstitutesUser cId nt = getTreeInstitutesUser cId nt =
HM.unionsWith (++) . map (\(_, hd) -> HM.fromList $ map (\(p, c) -> (p, [c])) $ Map.toList $ fromMaybe Map.empty (_hd_institutes_tree hd)) <$> selectHyperDataByContextUser cId nt HM.unionsWith (++) . map (\(_, hd) -> HM.fromList $ Map.toList $ fromMaybe Map.empty (_hd_institutes_tree hd)) <$> selectHyperDataByContextUser cId nt
selectHyperDataByContextUser :: HasDBid NodeType selectHyperDataByContextUser :: HasDBid NodeType
=> CorpusId => CorpusId
......
...@@ -36,7 +36,7 @@ data HyperdataDocument = HyperdataDocument { _hd_bdd :: !(Maybe T ...@@ -36,7 +36,7 @@ data HyperdataDocument = HyperdataDocument { _hd_bdd :: !(Maybe T
, _hd_publication_minute :: !(Maybe Int) , _hd_publication_minute :: !(Maybe Int)
, _hd_publication_second :: !(Maybe Int) , _hd_publication_second :: !(Maybe Int)
, _hd_language_iso2 :: !(Maybe Text) , _hd_language_iso2 :: !(Maybe Text)
, _hd_institutes_tree :: !(Maybe (Map Text Text)) , _hd_institutes_tree :: !(Maybe (Map Text [Text]))
} }
deriving (Show, Generic) deriving (Show, Generic)
......
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,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: d54812d52c9d1f86d331a991b3a87c9a8b4379cf - commit: 229fdf40b8ccecd527fca5a7bbb554b0deb540dc
git: "https://gitlab.iscpif.fr/gargantext/crawlers/hal.git" git: "https://gitlab.iscpif.fr/gargantext/crawlers/hal.git"
subdirs: subdirs:
- . - .
......
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