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
200
Issues
200
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
6418cb27
Verified
Commit
6418cb27
authored
Aug 26, 2025
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[phylo] minutely phylo works now
parent
d3692c15
Pipeline
#7834
failed with stages
in 15 minutes and 2 seconds
Changes
5
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
28 deletions
+39
-28
Common.hs
bin/gargantext-cli/CLI/Phylo/Common.hs
+7
-6
Context.hs
src/Gargantext/API/Context.hs
+1
-3
Phylo.hs
src/Gargantext/Core/Viz/Phylo.hs
+4
-0
Tools.hs
src/Gargantext/Core/Viz/Phylo/API/Tools.hs
+11
-7
PhyloTools.hs
src/Gargantext/Core/Viz/Phylo/PhyloTools.hs
+16
-12
No files found.
bin/gargantext-cli/CLI/Phylo/Common.hs
View file @
6418cb27
...
...
@@ -176,6 +176,7 @@ timeToLabel config = case (timeUnit config) of
Week
p
s
f
->
(
"time_weeks"
<>
"_"
<>
(
show
p
)
<>
"_"
<>
(
show
s
)
<>
"_"
<>
(
show
f
))
Day
p
s
f
->
(
"time_days"
<>
"_"
<>
(
show
p
)
<>
"_"
<>
(
show
s
)
<>
"_"
<>
(
show
f
))
Hour
_p
_s
_f
->
panicTrace
"hours not implemented"
Minute
_p
_s
_f
->
panicTrace
"minutes not implemented"
seaToLabel
::
PhyloConfig
->
[
Char
]
...
...
src/Gargantext/API/Context.hs
View file @
6418cb27
...
...
@@ -10,8 +10,6 @@ Portability : POSIX
-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeOperators #-}
module
Gargantext.API.Context
where
...
...
@@ -21,7 +19,7 @@ import Gargantext.API.Admin.Auth.Types (PathId(..), AuthenticatedUser)
import
Gargantext.API.Prelude
(
IsGargServer
)
import
Gargantext.API.Routes.Named.Context
qualified
as
Named
import
Gargantext.Database.Admin.Types.Node
(
ContextId
,
contextId2NodeId
)
import
Gargantext.Database.Prelude
import
Gargantext.Database.Prelude
(
JSONB
,
runDBQuery
)
import
Gargantext.Database.Query.Table.Context
(
getContextWith
)
import
Gargantext.Prelude
import
Servant.Server.Generic
(
AsServerT
)
...
...
src/Gargantext/Core/Viz/Phylo.hs
View file @
6418cb27
...
...
@@ -139,6 +139,10 @@ data TimeUnit =
{
_hour_period
::
Int
,
_hour_step
::
Int
,
_hour_matchingFrame
::
Int
}
|
Minute
{
_minute_period
::
Int
,
_minute_step
::
Int
,
_minute_matchingFrame
::
Int
}
deriving
(
Show
,
Generic
,
Eq
,
NFData
,
ToExpr
)
instance
ToSchema
TimeUnit
where
...
...
src/Gargantext/Core/Viz/Phylo/API/Tools.hs
View file @
6418cb27
...
...
@@ -207,7 +207,10 @@ toDays y m d = fromIntegral
$
diffDays
(
fromGregorian
y
m
d
)
(
fromGregorian
0001
1
1
)
toHours
::
UTCTimeR
->
Date
toHours
utcTimeR
=
floor
diffSeconds
`
div
`
3600
toHours
utcTimeR
=
toMinutes
utcTimeR
`
div
`
60
toMinutes
::
UTCTimeR
->
Date
toMinutes
utcTimeR
=
floor
diffSeconds
`
div
`
60
where
diffSeconds
=
diffUTCTime
(
toUTCTime
utcTimeR
)
(
toUTCTime
defUTCTimeR
)
...
...
@@ -219,6 +222,7 @@ toPhyloDate utcTimeR@(UTCTimeR { .. }) tu = case tu of
Week
{}
->
div
(
toDays
(
Prelude
.
toInteger
year
)
month
day
)
7
Day
{}
->
toDays
(
Prelude
.
toInteger
year
)
month
day
Hour
{}
->
toHours
utcTimeR
Minute
{}
->
toMinutes
utcTimeR
_
->
panic
"[G.C.V.P.API.Tools] toPhyloDate"
toPhyloDate'
::
UTCTimeR
->
TimeUnit
->
Text
...
...
src/Gargantext/Core/Viz/Phylo/PhyloTools.hs
View file @
6418cb27
...
...
@@ -176,6 +176,7 @@ getTimeScale p = case timeUnit $ getConfig p of
Week
{}
->
"week"
Day
{}
->
"day"
Hour
{}
->
"hour"
Minute
{}
->
"minute"
-- | Get a regular & ascendante timeScale from a given list of dates
...
...
@@ -193,6 +194,7 @@ getTimeStep time = case time of
Week
{
..
}
->
_week_step
Day
{
..
}
->
_day_step
Hour
{
..
}
->
_hour_step
Minute
{
..
}
->
_minute_step
getTimePeriod
::
TimeUnit
->
Int
getTimePeriod
time
=
case
time
of
...
...
@@ -202,6 +204,7 @@ getTimePeriod time = case time of
Week
{
..
}
->
_week_period
Day
{
..
}
->
_day_period
Hour
{
..
}
->
_hour_period
Minute
{
..
}
->
_minute_period
getTimeFrame
::
TimeUnit
->
Int
getTimeFrame
time
=
case
time
of
...
...
@@ -211,6 +214,7 @@ getTimeFrame time = case time of
Week
{
..
}
->
_week_matchingFrame
Day
{
..
}
->
_day_matchingFrame
Hour
{
..
}
->
_hour_matchingFrame
Minute
{
..
}
->
_minute_matchingFrame
-------------
-- | Fis | --
...
...
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