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