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
195
Issues
195
List
Board
Labels
Milestones
Merge Requests
12
Merge Requests
12
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
f7b357a7
Commit
f7b357a7
authored
May 07, 2019
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DOC] stack haddock build ok.
parent
ec52b44c
Pipeline
#374
failed with stage
Changes
9
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
31 additions
and
27 deletions
+31
-27
Ngrams.hs
src/Gargantext/API/Ngrams.hs
+5
-3
Node.hs
src/Gargantext/API/Node.hs
+2
-2
Settings.hs
src/Gargantext/API/Settings.hs
+8
-8
Facet.hs
src/Gargantext/Database/Facet.hs
+0
-1
Flow.hs
src/Gargantext/Database/Flow.hs
+1
-1
Insert.hs
src/Gargantext/Database/Node/Document/Insert.hs
+3
-3
Node.hs
src/Gargantext/Database/Types/Node.hs
+8
-5
Fr.hs
src/Gargantext/Text/Terms/Multi/Lang/Fr.hs
+3
-3
API.hs
src/Gargantext/Viz/Phylo/API.hs
+1
-1
No files found.
src/Gargantext/API/Ngrams.hs
View file @
f7b357a7
...
...
@@ -236,10 +236,12 @@ ngramsElementFromRepo
,
_ne_children
=
c
,
_ne_ngrams
=
ngrams
,
_ne_occurrences
=
panic
"API.Ngrams._ne_occurrences"
-- ^ Here we could use 0 if we want to avoid any `panic`.
{-
-- Here we could use 0 if we want to avoid any `panic`.
-- It will not happen using getTableNgrams if
-- getOccByNgramsOnly provides a count of occurrences for
-- all the ngrams given.
-}
}
------------------------------------------------------------------------
...
...
@@ -644,14 +646,14 @@ ngramsTypeFromTabType tabType =
Institutes
->
Ngrams
.
Institutes
Terms
->
Ngrams
.
NgramsTerms
_
->
panic
$
lieu
<>
"No Ngrams for this tab"
--
^
TODO: This `panic` would disapear with custom NgramsType.
-- TODO: This `panic` would disapear with custom NgramsType.
------------------------------------------------------------------------
data
Repo
s
p
=
Repo
{
_r_version
::
Version
,
_r_state
::
s
,
_r_history
::
[
p
]
--
^
first patch in the list is the most recent
-- first patch in the list is the most recent
}
deriving
(
Generic
)
...
...
src/Gargantext/API/Node.hs
View file @
f7b357a7
...
...
@@ -297,7 +297,7 @@ type TreeApi = Summary " Tree API"
instance
HasNodeError
ServantErr
where
_NodeError
=
prism'
mk
(
const
Nothing
)
--
$
panic "HasNodeError ServantErr: not a prism")
_NodeError
=
prism'
mk
(
const
Nothing
)
-- panic "HasNodeError ServantErr: not a prism")
where
e
=
"Gargantext NodeError: "
mk
NoListFound
=
err404
{
errBody
=
e
<>
"No list found"
}
...
...
@@ -315,7 +315,7 @@ instance HasNodeError ServantErr where
-- TODO(orphan): There should be a proper APIError data type with a case TreeError.
instance
HasTreeError
ServantErr
where
_TreeError
=
prism'
mk
(
const
Nothing
)
--
$
panic "HasTreeError ServantErr: not a prism")
_TreeError
=
prism'
mk
(
const
Nothing
)
-- panic "HasTreeError ServantErr: not a prism")
where
e
=
"TreeError: "
mk
NoRoot
=
err404
{
errBody
=
e
<>
"Root node not found"
}
...
...
src/Gargantext/API/Settings.hs
View file @
f7b357a7
...
...
@@ -71,13 +71,13 @@ data SendEmailType = SendEmailViaAws
data
Settings
=
Settings
{
_allowedOrigin
::
ByteString
-- ^
allowed origin for CORS
,
_allowedHost
::
ByteString
--
^
allowed host for CORS
{
_allowedOrigin
::
ByteString
--
allowed origin for CORS
,
_allowedHost
::
ByteString
-- allowed host for CORS
,
_appPort
::
PortNumber
,
_logLevelLimit
::
LogLevel
--
^
log level from the monad-logger package
,
_logLevelLimit
::
LogLevel
-- log level from the monad-logger package
-- , _dbServer :: Text
-- ^ this is not used yet
,
_jwtSecret
::
Jose
.
Jwk
--
^
key from the jose-jwt package
,
_jwtSecret
::
Jose
.
Jwk
-- key from the jose-jwt package
,
_sendLoginEmails
::
SendEmailType
,
_scrapydUrl
::
BaseUrl
,
_fileFolder
::
FilePath
...
...
@@ -195,22 +195,22 @@ mkRepoSaver repo_var = mkDebounce settings
settings
=
defaultDebounceSettings
{
debounceFreq
=
1000000
-- 1 second
,
debounceAction
=
withMVar
repo_var
repoSaverAction
--
^
Here this not only `readMVar` but `takeMVar`.
-- Here this not only `readMVar` but `takeMVar`.
-- Namely while repoSaverAction is saving no other change
-- can be made to the MVar.
-- This might be not efficent and thus reconsidered later.
-- However this enables to safely perform a *final* save.
-- See `cleanEnv`.
-- Future work:
--
*
Add a new MVar just for saving.
-- Add a new MVar just for saving.
}
readRepoEnv
::
IO
RepoEnv
readRepoEnv
=
do
--
|
Does file exist ? :: Bool
-- Does file exist ? :: Bool
repoFile
<-
doesFileExist
repoSnapshot
--
|
Is file not empty ? :: Bool
-- Is file not empty ? :: Bool
repoExists
<-
if
repoFile
then
(
>
0
)
<$>
getFileSize
repoSnapshot
else
pure
False
...
...
src/Gargantext/Database/Facet.hs
View file @
f7b357a7
...
...
@@ -172,7 +172,6 @@ data OrderBy = DateAsc | DateDesc
|
TitleAsc
|
TitleDesc
|
ScoreDesc
|
ScoreAsc
deriving
(
Generic
,
Enum
,
Bounded
,
Read
,
Show
)
-- | NgramCoun
instance
FromHttpApiData
OrderBy
where
...
...
src/Gargantext/Database/Flow.hs
View file @
f7b357a7
...
...
@@ -106,7 +106,7 @@ flowCorpusDebat u n l fp = do
flowCorpusFile
::
FlowCmdM
env
ServantErr
m
=>
Username
->
CorpusName
->
Limit
--
^
Limit the number of docs (for dev purpose)
->
Limit
-- Limit the number of docs (for dev purpose)
->
TermType
Lang
->
FileFormat
->
FilePath
->
m
CorpusId
flowCorpusFile
u
n
l
la
ff
fp
=
do
...
...
src/Gargantext/Database/Node/Document/Insert.hs
View file @
f7b357a7
...
...
@@ -180,10 +180,10 @@ queryInsert = [sql|
-- | When documents are inserted
-- ReturnType after insertion
data
ReturnId
=
ReturnId
{
reInserted
::
Bool
--
^
if the document is inserted (True: is new, False: is not new)
,
reId
::
NodeId
--
^
always return the id of the document (even new or not new)
data
ReturnId
=
ReturnId
{
reInserted
::
Bool
-- if the document is inserted (True: is new, False: is not new)
,
reId
::
NodeId
-- always return the id of the document (even new or not new)
-- this is the uniq id in the database
,
reUniqId
::
Text
--
^
Hash Id with concatenation of hash parameters
,
reUniqId
::
Text
-- Hash Id with concatenation of hash parameters
}
deriving
(
Show
,
Generic
)
instance
FromRow
ReturnId
where
...
...
src/Gargantext/Database/Types/Node.hs
View file @
f7b357a7
...
...
@@ -425,17 +425,20 @@ type NodeGraph = Node HyperdataGraph
type
NodePhylo
=
Node
HyperdataPhylo
type
NodeNotebook
=
Node
HyperdataNotebook
------------------------------------------------------------------------
data
NodeType
=
NodeUser
data
NodeType
=
NodeUser
|
NodeFolder
|
NodeCorpus
|
NodeCorpusV3
|
NodeDocument
|
NodeAnnuaire
|
NodeContact
-- | NodeOccurrences
|
NodeGraph
|
NodeDashboard
|
NodeChart
-- | Classification
|
NodeList
|
NodeListModel
|
NodeList
|
NodeListModel
deriving
(
Show
,
Read
,
Eq
,
Generic
,
Bounded
,
Enum
)
{-
-- | Metrics
deriving
(
Show
,
Read
,
Eq
,
Generic
,
Bounded
,
Enum
)
-- | NodeOccurrences
-- | Classification
-}
allNodeTypes
::
[
NodeType
]
allNodeTypes
=
[
minBound
..
]
...
...
src/Gargantext/Text/Terms/Multi/Lang/Fr.hs
View file @
f7b357a7
...
...
@@ -27,13 +27,13 @@ group :: [TokenTag] -> [TokenTag]
group
[]
=
[]
group
ntags
=
group2
NP
NP
$
group2
NP
VB
--
$
group2 NP IN
--
- $
group2 IN DT
-- group2 NP IN
-- group2 IN DT
$
group2
VB
NP
$
group2
JJ
NP
$
group2
NP
JJ
$
group2
JJ
JJ
--
- $
group2 JJ CC
-- group2 JJ CC
$
ntags
------------------------------------------------------------------------
...
...
src/Gargantext/Viz/Phylo/API.hs
View file @
f7b357a7
...
...
@@ -79,8 +79,8 @@ getPhylo _phyloId _lId l f b l' ms x y z ts s o d b' = do
fs'
=
maybe
(
Just
[]
)
(
\
p
->
Just
[
p
])
$
SmallBranch
<$>
(
SBParams
<$>
x
<*>
y
<*>
z
)
so
=
(,)
<$>
s
<*>
o
q
=
initPhyloQueryView
l
f
b
l'
ms
fs'
ts
so
d
b'
-- | TODO remove phylo for real data here
pure
(
toPhyloView
q
phylo
)
-- TODO remove phylo for real data here
------------------------------------------------------------------------
{-
...
...
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