[README] fix some AI formatting again

parent 6612b915
Pipeline #7091 passed with stages
in 65 minutes and 57 seconds
......@@ -91,24 +91,30 @@ Provide master user credentials when prompted.
### Running Gargantext
To run Gargantext, execute from `haskell-gargantext/`:
```bash
./bin/run
```
## Use Cases <a name="use-cases"></a>
### Start Multi-User GUI (Server Mode)
`cabal v2-run gargantext -- server start -m Prod`
```bash
cabal v2-run gargantext -- server start -m Prod
```
Log in as `user1` / `1resu`.
Start server and all workers:
`cabal v2-run gargantext -- server start-all -m Prod`
```bash
cabal v2-run gargantext -- server start-all -m Prod
```
### Command Line Mode tools
#### Compute and Index Cooccurrences
`cabal v2-run gargantext -- filter-terms CorpusFromGarg.csv ListFromGarg.csv Ouput.json`
```bash
cabal v2-run gargantext -- filter-terms CorpusFromGarg.csv ListFromGarg.csv Ouput.json
```
### Analyzing the ngrams table repo
......@@ -142,7 +148,8 @@ as the source of truth. Ouf ot that, we generate the `stack.yaml` file
for those who prefer to use Stack.
Upgrading packages can be a pain sometimes, with cabal.
`cat repos/repo.cbor.v5 | stack exec gargantext-cbor2json | jq .`
``` shell
cat repos/repo.cbor.v5 | stack exec gargantext-cbor2json | jq .
```
### Build Documentation
- Manually remove entries from your `cabal.project.freeze` to make the
......@@ -173,7 +180,7 @@ Occasionally build with `stack build` to identify stack LTS discrepancies, promp
### Running Tests
Issues may arise from `allow-newer: *` in `cabal.project`. To resolve, use:
`cabal v2-build --constraint hashable==1.4.3.0`
```
(This is due to `allow-newer: *`. We prefer strict constraints in `gargantext.cabal`).
Use `stack ls dependencies` to identify compatible packages.
For detailed build info, run:
......@@ -186,12 +193,15 @@ The CI is on gitlab and is controlled by the `.gitlab-ci.yml` file.
### Run Tests
From Nix shell:
`n$ cabal v2-test --test-show-details=streaming`
``` shell
docker build -t cgenie/gargantext:9.4.8 -f ./devops/docker/Dockerfile .
```
Or, outside Nix shell:
`$ nix-shell --run "cabal v2-test --test-show-details=streaming"`
```shell
nix-shell --run "cabal v2-test --test-show-details=streaming"
mkdir _build
```
To run specific tests with Tasty:
`cabal v2-test garg-test-tasty --test-show-details=streaming --test-option=--pattern='/job status update and tracking/`
......@@ -231,15 +241,16 @@ Playground is located at http://localhost:8008/gql
#### List details about a type in GraphQL
```
### Upgrading with Nix <a name="nix-upgrade"></a>
Nix builds from multiple sources. `nix/sources.json` serves as a Sitemap for SBT plugins, Scala/Java libraries, etc., and is loaded by `nix/sources.nix`.
To upgrade dependencies or tools in `nix/sources.json`, run:
type {
`nix-shell --run "niv update"`
```shell
nix-shell --run "niv update"
```
To add a new dependency:
`niv add repo/name`
}
```shell
niv add repo/name
```
Niv maintains `nix/sources.json`, and it can be edited manually.
If issues occur, clean the cache with:
`nix-shell --run "nix-collect-garbage"`
......@@ -248,13 +259,12 @@ If issues occur, clean the cache with:
https://www.cloudytuts.com/tutorials/docker/how-to-upgrade-postgresql-in-docker-and-kubernetes/
To build only `gargbase`:
`$ cabal v2-build gargbase`
```
To test changes in `packages/gargbase`, run:
`n$ cabal v2-test testutils --test-show-details=streaming`
$ docker-compose rm postgres
If issues arise, run the full test suite to check other packages:
`n$ cabal v2-test --test-show-details=streaming`
```shell
### Troubleshooting
If Haddock or interactive tests cause freezes, try:
`n$ cabal clean`
......@@ -278,8 +288,6 @@ $ psql < gargandb.dump
## Conclusion
You now have the instructions to manage Gargantext development and use. Contributions for areas not covered are welcome!
You now have the instructions to manage Gargantext development and daily use. Contributions for areas not covered are welcome!
```
## Running the tests <a name="running-tests"></a>
......@@ -310,6 +318,7 @@ golden reference). To do so, it's enough to run the testsuite passing the `--acc
```hs
cabal v2-test garg-test-tasty --test-show-details=streaming --flags 'test-crypto no-phylo-debug-logs' --test-option=--pattern='/Phylo/' --test-option=--accept"
```
## `haskell-language-server` <a name="haskell-language-server"></a>
......@@ -317,6 +326,8 @@ If you want to use `haskell-language-server` for GHC 9.4.7, install it
with `ghcup`:
```shell
ghcup compile hls --version 2.7.0.0 --ghc 9.4.7
```
### `haskell-language-server` Installation
If you want to use `haskell-language-server` for GHC 9.4.7, install it with `ghcup`:
......
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