Verified Commit d428ae72 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

Merge branch 'dev' into dev-openalex

parents aa827322 53424dfd
Pipeline #4328 failed with stages
in 89 minutes and 22 seconds
......@@ -2,9 +2,6 @@
*lock
# Cabal
*.cabal
# Profiling
*.prof
profiling
......
......@@ -2,7 +2,7 @@
# https://vadosware.io/post/zero-to-continuous-integrated-testing-a-haskell-project-with-gitlab/
#
#
image: adinapoli/gargantext:v1
image: adinapoli/gargantext:v2
variables:
STACK_ROOT: "${CI_PROJECT_DIR}/.stack-root"
......@@ -13,13 +13,13 @@ variables:
#- apt-get install make xz-utils
stages:
- deps
- stack
- cabal
- test
- docs
- cabal
deps:
stage: deps
stack:
stage: stack
cache:
# cache per branch name
# key: ${CI_COMMIT_REF_SLUG}
......@@ -29,8 +29,7 @@ deps:
- target
script:
- echo "Building the project from '$CI_PROJECT_DIR'"
- hpack
- nix-shell --run "LC_ALL=C.UTF-8 stack build --no-terminal --haddock --no-haddock-deps --only-dependencies --fast"
- nix-shell --run "stack build --no-terminal --haddock --no-haddock-deps --only-dependencies --fast --dry-run"
docs:
stage: docs
......@@ -42,8 +41,7 @@ docs:
- .stack-work/
- target
script:
- hpack
- nix-shell --run "LC_ALL=C.UTF-8 stack build --no-terminal --haddock --no-haddock-deps --fast"
- nix-shell --run "stack build --no-terminal --haddock --no-haddock-deps --fast --dry-run"
- cp -R "$(stack path --local-install-root)"/doc ./output
artifacts:
paths:
......@@ -51,24 +49,22 @@ docs:
expire_in: 1 week
allow_failure: true
test:
stage: test
cabal:
stage: cabal
cache:
# cache per branch name
# key: ${CI_COMMIT_REF_SLUG}
paths:
- .stack-root/
- .stack-work/
- dist-newstyle/
- target
script:
- hpack
- nix-shell --run "stack test --no-terminal --fast"
# TOOO
- nix-shell --run "./bin/update-cabal-project && cabal v2-build"
allow_failure: false
cabal:
# FIXME(adinapoli) A temporary hack until we switch to cabal 3.10.1.0 properly
stage: cabal
test:
stage: test
cache:
# cache per branch name
# key: ${CI_COMMIT_REF_SLUG}
......@@ -78,7 +74,5 @@ cabal:
- dist-newstyle/
- target
script:
- hpack
- nix-shell --run "./bin/update-cabal-project && cabal v2-build --dry-run"
allow_failure: false
- nix-shell --run "cabal v2-test --test-show-details=streaming"
......@@ -47,7 +47,7 @@ cd haskell-gargantext
#### 1. Installation
This project can be built with either Stack or Cabal. For historical
reasons, we generate a `cabal.project` from the `package.yaml`, and
reasons, we generate a `cabal.project` from the `stack.yaml`, and
we do not commit the former to the repo, to have a single "source of truth".
However, it's always possible to generate a `cabal.project` thanks
to [stack2cabal](https://hackage.haskell.org/package/stack2cabal).
......
#!/usr/bin/env bash
cabal v2-update 'hackage.haskell.org,2023-06-25T00:00:00Z'
cabal v2-install hpack-0.35.0 --overwrite-policy=always
cabal v2-install stack2cabal-1.0.14 --overwrite-policy=always
stack2cabal --no-run-hpack -p '2023-06-25'
......@@ -18,84 +18,40 @@ sudo apt upgrade
# Tmux to avoid disconnections during the installation process
# Htop for visual monitoring
sudo apt install tmux htop
sudo apt install tmux htop git iptables curl
########################################################################
sudo sed -i "s/stretch/buster/g" /etc/apt/sources.list
sudo sed -i "s/bullseye/bookworm/g" /etc/apt/sources.list
sudo apt update
sudo apt dist-upgrade
# sudo reboot #recommended
########################################################################
#sudo apt update
sudo apt install liblzma-dev libpcre3-dev libblas-dev liblapack-dev pkg-config libgsl-dev libbz2-dev postgresql postgresql-server-dev-11 nginx libigraph0-dev libgfortran-9-dev
sudo apt install postgresql postgresql-server-dev-15
sudo apt install git
#git config --global user.email "contact@gargantext.org"
#git config --global user.name "Gargantua"
########################################################################
echo "Which user?"
#read USER
USER="gargantua"
sudo adduser --disabled-password --gecos "" $USER
########################################################################
#cd /home
#sudo mv -if /home/$USER /srv/
#sudo ln -s /srv/$USER
curl -sSL https://get.haskellstack.org/ | sh
sudo apt install curl
sudo su $USER
stack update
stack upgrade
#git clone https://gitlab.iscpif.fr/gargantext/haskell-gargantext.git
#cd haskell-gargantext
##########
if [[ ! -d "purescript-gargantext" ]]; then
./devops/debian/install-purescript
fi
#########################################################################
# stack install should be enough but all process is the following steps
stack setup && stack build && stack install
echo "Installing Nix"
sh <(curl -L https://nixos.org/nix/install) --daemon
#########################################################################
# build deps
if [[ ! -d "deps" ]]; then
mkdir -v deps
cd deps
sudo apt install default-jdk
if [[ ! -f "coreNLP.tar.bz2" ]]; then
wget https://dl.gargantext.org/coreNLP.tar.bz2
fi
if [[ ! -d "home" ]]; then
tar xvjf coreNLP.tar.bz2
fi
# CoreNLP needs to be started
# ./startServer.sh
cd ..
fi
#######################################################################
# Get the Sources
git clone https://gitlab.iscpif.fr/gargantext/haskell-gargantext.git
cd haskell-gargantext
git clone https://gitlab.iscpif.fr/gargantext/purescript-gargantext.git
# Specific to our servers
#### Configure timezone and locale ###################################
# todo sync dates
#echo "########### LOCALES & TZ #################"
#echo "Europe/Paris" > /etc/timezone
#dpkg-reconfigure --frontend=noninteractive tzdata
#sudo dpkg-reconfigure --frontend=noninteractive tzdata
##ENV TZ "Europe/Paris"
#
#sed -i -e 's/# en_GB.UTF-8 UTF-8/en_GB.UTF-8 UTF-8/' /etc/locale.gen && \
......@@ -109,13 +65,12 @@ fi
# Database configuration
# CREATE USER gargantua WITH PASSWORD $(grep DB_PASS gargantext.ini)
# GRANT ALL PRIVILEGES ON DATABASE gargandbV4 to gargantua
# sudo su postgres
# createdb gargandb
#######################################################################
## POSTGRESQL DATA (as ROOT)
#######################################################################
./devops/debian/install-postgres
# configure the database with script in devops/postgres
# edit gargantext.ini
......@@ -4,9 +4,16 @@ ARG DEBIAN_FRONTEND=noninteractive
ARG GHC=8.10.7
ARG STACK=2.7.3
ARG CABAL=3.10.1.0
COPY ./shell.nix /builds/gargantext/shell.nix
COPY ./nix/pkgs.nix /builds/gargantext/nix/pkgs.nix
COPY ./nix/pinned-22.05.nix /builds/gargantext/nix/pinned-22.05.nix
COPY ./shell.nix /builds/gargantext/shell.nix
COPY ./nix/pkgs.nix /builds/gargantext/nix/pkgs.nix
COPY ./nix/pinned-22.05.nix /builds/gargantext/nix/pinned-22.05.nix
COPY ./nix/overlays/Cabal-3.10.1.0.nix /builds/gargantext/nix/overlays/Cabal-3.10.1.0.nix
COPY ./nix/overlays/cabal-install-3.10.1.0.nix /builds/gargantext/nix/overlays/cabal-install-3.10.1.0.nix
COPY ./nix/overlays/cabal-install-solver-3.10.1.0.nix /builds/gargantext/nix/overlays/cabal-install-solver-3.10.1.0.nix
COPY ./nix/overlays/Cabal-syntax-3.10.1.0.nix /builds/gargantext/nix/overlays/Cabal-syntax-3.10.1.0.nix
COPY ./nix/overlays/directory-1.3.7.0.nix /builds/gargantext/nix/overlays/directory-1.3.7.0.nix
COPY ./nix/overlays/hackage-security-0.6.2.3.nix /builds/gargantext/nix/overlays/hackage-security-0.6.2.3.nix
COPY ./nix/overlays/process-1.6.15.0.nix /builds/gargantext/nix/overlays/process-1.6.15.0.nix
ENV TZ=Europe/Rome
RUN apt-get update && \
......@@ -61,19 +68,7 @@ ENV PATH=/root/.nix-profile/bin:$PATH
RUN . $HOME/.bashrc && nix-env --version
RUN \
curl https://downloads.haskell.org/~ghcup/x86_64-linux-ghcup > /usr/bin/ghcup && \
chmod +x /usr/bin/ghcup && \
ghcup config set gpg-setting GPGLax && \
ghcup -v install ghc --force ${GHC} && \
ghcup -v install cabal --force ${CABAL} && \
ghcup -v install stack --force ${STACK}
ENV PATH=/root/.ghcup/bin:$PATH
ENV PATH=/root/.local/bin:$PATH
RUN cd /builds/gargantext && nix-shell
RUN ghcup set 8.10.7 && cabal v2-update && cabal v2-install hpack --overwrite-policy=always
WORKDIR "/builds/gargantext/"
cabal-version: 1.12
-- This file has been generated from package.yaml by hpack version 0.35.1.
--
-- see: https://github.com/sol/hpack
name: gargantext
version: 0.0.6.9.9.7
synopsis: Search, map, share
......@@ -59,12 +55,13 @@ library
Gargantext.Core.Text.Context
Gargantext.Core.Text.Corpus.API
Gargantext.Core.Text.Corpus.API.Arxiv
Gargantext.Core.Text.Corpus.API.Pubmed
Gargantext.Core.Text.Corpus.API.OpenAlex
Gargantext.Core.Text.Corpus.API.Pubmed
Gargantext.Core.Text.Corpus.Query
Gargantext.Core.Text.Corpus.Parsers
Gargantext.Core.Text.Corpus.Parsers.CSV
Gargantext.Core.Text.Corpus.Parsers.Date.Parsec
Gargantext.Core.Text.Corpus.Parsers.JSON
Gargantext.Core.Text.List.Formats.CSV
Gargantext.Core.Text.Metrics
Gargantext.Core.Text.Metrics.CharByChar
......@@ -203,7 +200,6 @@ library
Gargantext.Core.Text.Corpus.Parsers.GrandDebat
Gargantext.Core.Text.Corpus.Parsers.Iramuteq
Gargantext.Core.Text.Corpus.Parsers.Isidore
Gargantext.Core.Text.Corpus.Parsers.JSON
Gargantext.Core.Text.Corpus.Parsers.Json2Csv
Gargantext.Core.Text.Corpus.Parsers.RIS
Gargantext.Core.Text.Corpus.Parsers.RIS.Presse
......
name: gargantext
# +------------ Layer 3
# | +--+------- Layer 2
# | | +-------- Layer 1 : New versions with API changes
# | | | +----- Layers * : New versions with API additions
# | | | | +--- Layers * : New versions without API breaking changes
# | | | | |
version: '0.0.6.9.9.7'
synopsis: Search, map, share
description: Please see README.md
category: Data
author: Gargantext Team
maintainer: team@gargantext.org
copyright:
- ! 'Copyright: (c) 2017-Present: see git logs and README'
license: AGPL-3
homepage: https://gargantext.org
ghc-options:
- -Wall
dependencies:
- extra
- text
default-extensions:
- DataKinds
- DeriveGeneric
- FlexibleContexts
- FlexibleInstances
- GADTs
- GeneralizedNewtypeDeriving
- MultiParamTypeClasses
- NamedFieldPuns
- NoImplicitPrelude
- OverloadedStrings
- RankNTypes
- RecordWildCards
- StrictData
data-files:
- ekg-assets/index.html
- ekg-assets/monitor.js
- ekg-assets/monitor.css
- ekg-assets/jquery.flot.min.js
- ekg-assets/jquery-1.6.4.min.js
- ekg-assets/bootstrap-1.4.0.min.css
- ekg-assets/chart_line_add.png
- ekg-assets/cross.png
- test-data/ngrams/GarganText_NgramsTerms-QuantumComputing.json
- test-data/phylo/bpa_phylo_test.json
- test-data/phylo/open_science.json
- .clippy.dhall
library:
source-dirs: src
ghc-options:
- -Wincomplete-uni-patterns
- -Wincomplete-record-updates
- -Wmissing-signatures
- -Wunused-binds
- -Wunused-imports
- -Werror
- -freduction-depth=300
- -fplugin=Clippy
exposed-modules:
- Gargantext
- Gargantext.API
- Gargantext.API.Admin.Auth.Types
- Gargantext.API.Admin.EnvTypes
- Gargantext.API.Admin.Settings
- Gargantext.API.Admin.Orchestrator.Types
- Gargantext.API.Admin.Types
- Gargantext.API.Dev
- Gargantext.API.HashedResponse
- Gargantext.API.Ngrams
- Gargantext.API.Ngrams.Prelude
- Gargantext.API.Ngrams.Tools
- Gargantext.API.Ngrams.Types
- Gargantext.API.Node
- Gargantext.API.Node.Corpus.New
- Gargantext.API.Node.Corpus.Types
- Gargantext.API.Node.File
- Gargantext.API.Node.Share
- Gargantext.API.Prelude
- Gargantext.Core
- Gargantext.Core.NLP
- Gargantext.Core.Methods.Similarities
- Gargantext.Core.NodeStory
- Gargantext.Core.Text
- Gargantext.Core.Text.Context
- Gargantext.Core.Text.Corpus.API
- Gargantext.Core.Text.Corpus.API.Arxiv
- Gargantext.Core.Text.Corpus.API.Pubmed
- Gargantext.Core.Text.Corpus.API.OpenAlex
- Gargantext.Core.Text.Corpus.Query
- Gargantext.Core.Text.Corpus.Parsers
- Gargantext.Core.Text.Corpus.Parsers.CSV
- Gargantext.Core.Text.Corpus.Parsers.Date.Parsec
- Gargantext.Core.Text.List.Formats.CSV
- Gargantext.Core.Text.Metrics
- Gargantext.Core.Text.Metrics.CharByChar
- Gargantext.Core.Text.Metrics.Count
- Gargantext.Core.Text.Metrics.TFICF
- Gargantext.Core.Text.Prepare
- Gargantext.Core.Text.Search
- Gargantext.Core.Text.Terms
- Gargantext.Core.Text.Terms.Eleve
- Gargantext.Core.Text.Terms.Mono
- Gargantext.Core.Text.Terms.Multi
- Gargantext.Core.Text.Terms.Multi.Lang.En
- Gargantext.Core.Text.Terms.Multi.Lang.Fr
- Gargantext.Core.Text.Terms.Multi.RAKE
- Gargantext.Core.Text.Terms.WithList
- Gargantext.Core.Types
- Gargantext.Core.Types.Individu
- Gargantext.Core.Types.Main
- Gargantext.Core.Types.Query
- Gargantext.Core.Types.Phylo
- Gargantext.Core.Utils
- Gargantext.Core.Utils.Prefix
- Gargantext.Core.Viz.Graph
- Gargantext.Core.Viz.Graph.Index
- Gargantext.Core.Viz.Graph.Tools
- Gargantext.Core.Viz.Graph.Tools.IGraph
- Gargantext.Core.Viz.Graph.Types
- Gargantext.Core.Viz.Phylo
- Gargantext.Core.Viz.Phylo.API
- Gargantext.Core.Viz.Phylo.API.Tools
- Gargantext.Core.Viz.Phylo.PhyloExport
- Gargantext.Core.Viz.Phylo.PhyloMaker
- Gargantext.Core.Viz.Phylo.PhyloTools
- Gargantext.Core.Viz.Phylo.SynchronicClustering
- Gargantext.Core.Viz.Types
- Gargantext.Database.Action.Flow
- Gargantext.Database.Action.Flow.Types
- Gargantext.Database.Action.User.New
- Gargantext.Database.Admin.Config
- Gargantext.Database.Admin.Trigger.Init
- Gargantext.Database.Admin.Types.Hyperdata
- Gargantext.Database.Admin.Types.Node
- Gargantext.Database.Prelude
- Gargantext.Database.Query.Table.NgramsPostag
- Gargantext.Database.Query.Table.Node
- Gargantext.Database.Query.Table.Node.UpdateOpaleye
- Gargantext.Database.Query.Table.User
- Gargantext.Database.Schema.Ngrams
- Gargantext.Defaults
- Gargantext.Utils.Jobs
- Gargantext.Utils.Jobs.Internal
- Gargantext.Utils.Jobs.Map
- Gargantext.Utils.Jobs.Monad
- Gargantext.Utils.Jobs.Queue
- Gargantext.Utils.Jobs.Settings
- Gargantext.Utils.Jobs.State
- Gargantext.Utils.SpacyNLP
- Gargantext.Utils.Tuple
dependencies:
- HSvm
- KMP
- MissingH
- MonadRandom
- QuickCheck
- Unique
- accelerate
- accelerate-arithmetic
- accelerate-llvm-native
- accelerate-utility
- aeson
- aeson-lens
- aeson-pretty
- array
- async
- attoparsec
- auto-update
- base >=4.7 && <5
- base16-bytestring
- base64-bytestring
- blaze-html
- blaze-markup
- blaze-svg
- boolexpr
- bytestring
- case-insensitive
- cassava
- cereal # (IGraph)
- cborg
- ghc-clippy-plugin
- conduit
- conduit-extra
- containers
- contravariant
- crawlerArxiv
- crawlerHAL
- crawlerISTEX
- crawlerIsidore
- crawlerPubMed
- cron
- cryptohash
- data-time-segment
- deepseq
- directory
- duckling
- ekg-core
- ekg-json
- exceptions
- fast-logger
- fclabels
- fgl
- filelock
- filepath
- formatting
- full-text-search
- fullstop
- gargantext-prelude
- gargantext-graph >= 0.1.0.0
- graphviz
- hashable
- haskell-igraph
- hlcm
- hsinfomap
- hsparql
- hstatistics
- http-api-data
- http-client
- http-client-tls
- http-conduit
- http-media
- http-types
- hxt
- ihaskell
- ini
- insert-ordered-containers
- jose
- json-stream
- lens
- lifted-base
- listsafe
- located-base
- logging-effect
- matrix
- monad-control
- monad-logger
- morpheus-graphql
- morpheus-graphql-app
- morpheus-graphql-core
- morpheus-graphql-subscriptions
- mtl
- natural-transformation
- network-uri
- opaleye
- openalex
- pandoc
- parallel
- parsec
- patches-class
- patches-map
- path
- path-io
- postgresql-simple
- pretty-simple
- probability
- process
- product-profunctors
- profunctors
- protolude
- pureMD5
- quickcheck-instances
- rake
- random
- rdf4h
- replace-attoparsec
- regex-compat
- regex-tdfa
- resource-pool
- resourcet
- safe
- scientific
- semigroups
- serialise
- servant
- servant-auth
- servant-auth-client
- servant-auth-server >= 0.4.4.0
- servant-auth-swagger
- servant-blaze
- servant-cassava
- servant-client
- servant-ekg
- servant-flatten
- servant-job
- servant-mock
- servant-multipart
- servant-server
- servant-swagger
- servant-swagger-ui
- servant-xml
- simple-reflect
- singletons # (IGraph)
- split
- stemmer
- stm
- swagger2
- taggy-lens
- tagsoup
- template-haskell
- temporary
- text-conversions
- text-metrics
- time
- time-locale-compat
- timezone-series
- transformers
- transformers-base
- tuple
- unordered-containers
- utf8-string
- uuid
- uri-encode
- validity
- vector
- wai
- wai-app-static
- wai-cors
- wai-extra
- wai-websockets
- warp
- wikiparsec
- websockets
- wreq
- xml-conduit
- xml-types
- xmlbf
- yaml
- zip
- zlib
executables:
gargantext-server:
main: Main.hs
source-dirs: bin/gargantext-server
ghc-options:
- -O2
- -Wcompat
- -Wmissing-signatures
- -rtsopts
- -threaded
- -with-rtsopts=-N
- -with-rtsopts=-T
- -fprof-auto
dependencies:
- base
- cassava
- containers
- full-text-search
- gargantext
- gargantext-prelude
- ini
- optparse-generic
- postgresql-simple
- unordered-containers
- vector
gargantext-cli:
main: Main.hs
source-dirs: bin/gargantext-cli
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
- -O2
- -Wmissing-signatures
dependencies:
- aeson
- async
- base
- bytestring
- containers
- gargantext
- gargantext-prelude
- vector
- cassava
- ini
- optparse-generic
- split
- unordered-containers
- full-text-search
gargantext-phylo:
main: Main.hs
source-dirs: bin/gargantext-phylo
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
- -O2
- -Wmissing-signatures
dependencies:
- aeson
- async
- base
- bytestring
- containers
- directory
- gargantext
- gargantext-prelude
- vector
- parallel
- cassava
- ini
- optparse-generic
- split
- unordered-containers
- cryptohash
- time
gargantext-import:
main: Main.hs
source-dirs: bin/gargantext-import
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
- -O2
- -Wmissing-signatures
dependencies:
- gargantext
- gargantext-prelude
- base
- servant-server
gargantext-init:
main: Main.hs
source-dirs: bin/gargantext-init
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
- -O2
- -Wmissing-signatures
dependencies:
- gargantext
- gargantext-prelude
- base
- cron
gargantext-invitations:
main: Main.hs
source-dirs: bin/gargantext-invitations
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
- -O2
- -Wmissing-signatures
dependencies:
- gargantext
- gargantext-prelude
- base
gargantext-upgrade:
main: Main.hs
source-dirs: bin/gargantext-upgrade
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
- -O2
- -Wmissing-signatures
dependencies:
- gargantext
- gargantext-prelude
- base
- postgresql-simple
- cron
gargantext-admin:
main: Main.hs
source-dirs: bin/gargantext-admin
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
- -O2
- -Wmissing-signatures
dependencies:
- gargantext
- gargantext-prelude
- base
gargantext-cbor2json:
main: Main.hs
source-dirs: bin/gargantext-cbor2json
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
- -O2
- -Wmissing-signatures
dependencies:
- gargantext
- gargantext-prelude
- base
- bytestring
- aeson
- serialise
tests:
garg-test:
main: Main.hs
source-dirs: src-test
default-extensions:
- DataKinds
- DeriveGeneric
- FlexibleContexts
- FlexibleInstances
- GeneralizedNewtypeDeriving
- MultiParamTypeClasses
- NoImplicitPrelude
- OverloadedStrings
- RankNTypes
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
dependencies:
- QuickCheck
- aeson
- async
- base
- boolexpr
- bytestring
- conduit
- containers
- crawlerArxiv
- duckling
- gargantext
- gargantext-prelude
- hspec
- http-client
- http-client-tls
- mtl
- parsec
- patches-class
- patches-map
- duckling
- quickcheck-instances
- raw-strings-qq
- servant-job
- stm
- tasty
- tasty-hspec
- tasty-hunit
- tasty-quickcheck
- text
- time
- unordered-containers
- validity
# garg-doctest:
# main: Main.hs
# source-dirs: src-doctest
# ghc-options:
# - -O2
# - -Wcompat
# - -Wmissing-signatures
# - -rtsopts
# - -threaded
# - -with-rtsopts=-N
# dependencies:
# - doctest
# - Glob
# - QuickCheck
# - base
# - gargantext
# default-extensions:
# - DataKinds
# - DeriveGeneric
# - FlexibleContexts
# - FlexibleInstances
# - GeneralizedNewtypeDeriving
# - MultiParamTypeClasses
# - NoImplicitPrelude
# - OverloadedStrings
# - RankNTypes
#
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