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
Julien Moutinho
haskell-gargantext
Commits
a7375084
Verified
Commit
a7375084
authored
Oct 10, 2023
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[tests] attempt to add test for facet doc score
parent
5190ea81
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
Update.hs
src/Gargantext/API/Node/Update.hs
+1
-1
DocumentSearch.hs
test/Test/Database/Operations/DocumentSearch.hs
+2
-1
No files found.
src/Gargantext/API/Node/Update.hs
View file @
a7375084
...
...
@@ -197,7 +197,7 @@ updateNode _uId _nId _p jobHandle = do
------------------------------------------------------------------------
updateDocs
::
(
FlowCmdM
env
err
m
,
MonadJobStatus
m
)
=>
NodeId
->
m
()
=>
NodeId
->
m
()
updateDocs
cId
=
do
lId
<-
defaultList
cId
_
<-
reIndexWith
cId
lId
NgramsTerms
(
Set
.
singleton
MapTerm
)
...
...
test/Test/Database/Operations/DocumentSearch.hs
View file @
a7375084
...
...
@@ -190,6 +190,7 @@ corpusSearch03 env = do
map
facetDoc_title
results3
`
shouldBe
`
[
"PyPlasm: computational geometry made easy"
,
"Haskell for OCaml programmers"
]
-- | Check that the score doc count is correct
-- TODO This test is unfinished because `updateDocs` needs more work
corpusScore01
::
TestEnv
->
Assertion
corpusScore01
env
=
do
flip
runReaderT
env
$
runTestMonad
$
do
...
...
@@ -204,7 +205,7 @@ corpusScore01 env = do
map
facetDoc_score
results
`
shouldBe
`
[
Just
0.0
,
Just
0.0
]
_
<-
updateDocs
(
_node_id
corpus
)
--
_ <- updateDocs (_node_id corpus)
liftIO
$
do
map
facetDoc_score
results
`
shouldBe
`
[
Just
0.0
,
Just
0.0
]
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