Commit 89c9ae26 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[CodeType] Adding Python for reading

parent 68881fa0
...@@ -25,7 +25,7 @@ import Gargantext.Prelude ...@@ -25,7 +25,7 @@ import Gargantext.Prelude
import Gargantext.Database.Admin.Types.Hyperdata.Prelude import Gargantext.Database.Admin.Types.Hyperdata.Prelude
data CodeType = JSON | Markdown | Haskell data CodeType = JSON | Markdown | Haskell | Python
deriving (Generic, Eq) deriving (Generic, Eq)
instance ToJSON CodeType instance ToJSON CodeType
instance FromJSON CodeType instance FromJSON CodeType
...@@ -33,8 +33,9 @@ instance ToSchema CodeType ...@@ -33,8 +33,9 @@ instance ToSchema CodeType
------------------------------------------------------------------------ ------------------------------------------------------------------------
data CorpusField = MarkdownField { _cf_text :: !Text } data CorpusField = MarkdownField { _cf_text :: !Text }
| HaskellField { _cf_haskell :: !Text } | HaskellField { _cf_haskell :: !Text }
| JsonField { _cf_title :: !Text | PythonField { _cf_python :: !Text }
| JsonField { _cf_title :: !Text
, _cf_desc :: !Text , _cf_desc :: !Text
, _cf_query :: !Text , _cf_query :: !Text
, _cf_authors :: !Text , _cf_authors :: !Text
......
...@@ -13,6 +13,7 @@ Portability : POSIX ...@@ -13,6 +13,7 @@ Portability : POSIX
module Gargantext.Viz.Graph.Legend module Gargantext.Viz.Graph.Legend
where where
{-
import Data.Ord (Down(..)) import Data.Ord (Down(..))
import Gargantext.Prelude import Gargantext.Prelude
import Data.Map (Map, fromListWith, lookup, toList, mapWithKey, elems) import Data.Map (Map, fromListWith, lookup, toList, mapWithKey, elems)
...@@ -23,7 +24,6 @@ import Gargantext.Viz.Graph.Louvain (LouvainNodeId, CommunityId, comId2nodeId) ...@@ -23,7 +24,6 @@ import Gargantext.Viz.Graph.Louvain (LouvainNodeId, CommunityId, comId2nodeId)
{-
[LouvainNode] -> Map CommunityId LouvainNodeId [LouvainNode] -> Map CommunityId LouvainNodeId
[(CommunityId, [LouvainNodeId])] [(CommunityId, [LouvainNodeId])]
......
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