Commit 333956ba authored by Alexandre Delanoë's avatar Alexandre Delanoë

Merge branch 'dev' into dev-ngrams-groups

parents 3da16377 77e8f7af
......@@ -18,6 +18,16 @@ progress. Please report and improve this documentation if you encounter issues.
### Build Core Code
NOTE: Default build (with optimizations) requires large amounts of RAM (16GB at least). To avoid heavy compilation times and swapping out your machine, it is recommended to `stack build` with the `--fast-` flag, i.e.:
``` sh
stack --docker build --fast
```
or
``` sh
stack --nix build --fast
```
This might be related to the [broken Swagger `-O2` issue](https://github.com/haskell-servant/servant/issues/986).
#### Docker
``` sh
......
name: gargantext
version: '0.0.2.4'
version: '0.0.2.5'
synopsis: Search, map, share
description: Please see README.md
category: Data
......
......@@ -72,7 +72,7 @@ api userInviting nId (ShareTeamParams user') = do
username' <- getUsername userInviting
_ <- case List.elem username' arbitraryUsername of
True -> do
printDebug "[G.A.N.Share.api]" ("demo users are not allowed to invite" :: Text)
printDebug "[G.A.N.Share.api]" ("Demo users are not allowed to invite" :: Text)
pure ()
False -> do
-- TODO better analysis of the composition of what is shared
......
......@@ -57,10 +57,10 @@ emailWith server model =
email_to :: MailModel -> (EmailAddress, Name)
email_to (Invitation user) = email_to' user
email_to (PassUpdate user) = email_to' user
email_to (MailInfo n m) = (m, n)
email_to (MailInfo u m) = (m, u)
email_to' :: NewUser GargPassword -> (EmailAddress, Name)
email_to' (NewUser u m _) = (u,m)
email_to' (NewUser u m _) = (m,u)
------------------------------------------------------------------------
bodyWith :: ServerAddress -> MailModel -> [Text]
......
......@@ -48,6 +48,7 @@ findNodes' r Private = do
findNodes' r Shared = findNodes r Shared $ [NodeFolderShared, NodeTeam] <> commonNodes
findNodes' r SharedDirect = findNodes r Shared $ [NodeFolderShared, NodeTeam] <> commonNodes
findNodes' r Public = findNodes r Public $ [NodeFolderPublic ] <> commonNodes
findNodes' r PublicDirect = findNodes r Public $ [NodeFolderPublic ] <> commonNodes
commonNodes:: [NodeType]
commonNodes = [NodeFolder, NodeCorpus, NodeList, NodeFolderShared, NodeTeam]
......@@ -62,6 +62,7 @@ newUsers' address us = do
r <- insertUsers $ map toUserWrite us'
_ <- mapM getOrMkRoot $ map (\u -> UserName (_nu_username u)) us
_ <- liftBase $ mapM (\u -> mail address (Invitation u)) us
printDebug "newUsers'" us
pure r
------------------------------------------------------------------------
......
......@@ -92,12 +92,13 @@ data HyperdataCorpus =
defaultHyperdataCorpus :: HyperdataCorpus
defaultHyperdataCorpus =
HyperdataCorpus [ HyperdataField JSON
"Mandatory fields"
(JsonField "Title" "Descr" "Bool query" "Authors")
, HyperdataField Markdown
"Optional Text"
HyperdataCorpus [ HyperdataField Markdown
"Corpus analysis"
(MarkdownField "# title\n## subtitle")
, HyperdataField JSON
"Metadata (Experts only)"
(JsonField "Title" "Descr" "Bool query" "Authors")
]
------------------------------------------------------------------------
......
......@@ -133,7 +133,7 @@ tree_first_level r nodeTypes = do
-- , s ]
mainRoot <- findNodes r Private nodeTypes
-- printDebug (rPrefix "mainRoot") mainRoot
publicRoots <- findNodes r Public nodeTypes
publicRoots <- findNodes r PublicDirect nodeTypes
-- printDebug (rPrefix "publicRoots") publicRoots
sharedRoots <- findNodes r SharedDirect nodeTypes
-- printDebug (rPrefix "sharedRoots") sharedRoots
......@@ -142,7 +142,7 @@ tree_first_level r nodeTypes = do
pure ret
------------------------------------------------------------------------
data NodeMode = Private | Shared | Public | SharedDirect
data NodeMode = Private | Shared | Public | SharedDirect | PublicDirect
findNodes :: (HasTreeError err, HasNodeError err)
=> RootId
......@@ -153,6 +153,7 @@ findNodes r Private nt = dbTree r nt
findNodes r Shared nt = findShared r NodeFolderShared nt sharedTreeUpdate
findNodes r SharedDirect nt = findSharedDirect r NodeFolderShared nt sharedTreeUpdate
findNodes r Public nt = findShared r NodeFolderPublic nt publicTreeUpdate
findNodes r PublicDirect nt = findSharedDirect r NodeFolderPublic nt publicTreeUpdate
------------------------------------------------------------------------
-- | Collaborative Nodes in the Tree
......
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