Commit 51da71fd authored by Loïc Chapron's avatar Loïc Chapron

Merge branch...

Merge branch '345-docs-tsv-export-import-check-and-maintain-consistency-between-export-and-import-formats' of https://gitlab.iscpif.fr/gargantext/haskell-gargantext into 345-docs-tsv-export-import-check-and-maintain-consistency-between-export-and-import-formats
parents 72a457c5 b0807fb9
......@@ -19,6 +19,9 @@ TAGS
*.swp
.dir-locals.el
# VSCode
.vscode
# UI
gui
purescript-gargantext
......@@ -45,3 +48,7 @@ devops/docker/js-cache
cabal.project.local
gargantext_profile_out.dot
dev.jwk
.psc-ide-port
logs/
\ No newline at end of file
## Version 0.0.7.1.1
* [FRONT][FEAT][[Tree search] Add possibility to share a node URL (without the username), that will redirect to the right instance and node (#548)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/548)
## Version 0.0.7.1
* [FRONT][FIX][Fix breadcrumbs (#648)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/648)
## Version 0.0.7
- [BACK/FRONT][RELEASE] OO7 Version
## Version 0.0.6.9.9.9.9.1 [RELEASE CANDIDATE 007]
* [FRONT][FIX][In Document View: show Institute field of the document (#629)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/629)
* [BACK][FIX] Cabal optim
* [BACK][FIX][duckling fork (#319)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/319)
* [BACK][FIX][haskell-opaleye fork (#317)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/317)
* [BACK][FIX][[Node type/API GQL] Extend a little the node GQL query to have an extra "node_type" (or similar) so that we can extend the Purescript Node type with the value form the backend (#336)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/336)
* [BACK][DOC][Welcome: Door To enter the project (#177)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/177)
## Version 0.0.7.1.5.3
* [FRONT][FIX][[Tree focus] Temporary HOTFIX: comment the forced focus (forest open nodes) for performances reason (#669)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/669)
* [FRONT][FIX][[Tree perfs] When the tree is opening: reduce API calls or replace with lighter calls (#670)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/670)
* [BACK][FIX][update .gitignore file (#347)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/347)
## Version 0.0.6.9.9.9.9 [RELEASE CANDIDATE 007]
## Version 0.0.7.1.5.2
* [FRONT][FIX][[Node Documents] In the settings popin, remove the upload button (and also delete button) (#634)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/634)
* [FRONT][FIX] NoList Serialization
* [FRONT][FIX][[Fonts & CSS] Internalise external calls (initiated by alternative themes) (#626)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/626)
* [BACK][FIX] Dev Prelude Refactoring
* [BACK][FIX][Test, file missing (#338)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/338)
* [BACK][FIX][boolexpr has been fixed upstream (#315)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/315)
* [BACK][FIX][[Node Corpus] Creating a corpus from an empty Notes node make a big document with HTML code instead of simple text (#333)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/333)
* [BACK][FIX][Export Data as zip for all exports (#312)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/312)
* [BACK][FIX][Sort by terms is not language-aware (#331)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/331)
* [BACK][FIX][[API search] When an external service is down (HAL or other), display a message with a more explicit text (#335)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/335)
* [BACK][FIX] Order 2 small corpus
* [FRONT][FIX][[Tree focus] Temporary HOTFIX: comment the forced focus (forest open nodes) for performances reason (#669)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/669)
## Version 0.0.6.9.9.9.8.1 [RELEASE CANDIDATE 007]
## Version 0.0.7.1.5.1
* [FRONT][FEAT][Make `esc` key close current popup window (#640)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/640)
* [FRONT][FIX][Inconsistency in naming nodes (#641)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/641)
* [FRONT][FIX][Remove All language](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/merge_requests/261)
* [FRONT][ADMIN] Dev Spago Config
* [FRONT][FIX][[Phylo] On the exported SVG file: fix the background color behind the label (#668)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/668)
## Version 0.0.6.9.9.9.8 [RELEASE CANDIDATE 007]
## Version 0.0.7.1.5
* [BACK][DEPS][wikiparsec fork (#320)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/320)
* [BACK][TEST][Output of `toPhylo` & co non-deterministic? (#329)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/329)
* [FRONT][ADM][Upgrade PureScript to 0.15.11 (#605)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/605)
* [FRONT][FIX][For graph controls, add a debounce timer (#651)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/651)
* [FRONT][FEAT][Export the phylo in JSON and dot format (#643)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/643)
* [BACK][FIX][[Node Phylo] Export the phylo in JSON and dot format (#337)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/337)
* [BACK][FIX][Consider integrating Servant named routes (#271)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/271)
## Version 0.0.6.9.9.9.7.3 [RELEASE CANDIDATE 007]
## Version 0.0.7.1.4
* [FRONT][FIX][[Forest] Tree node focus: find a way to focus on the current node in the forest layout layout (#556)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/556)
* [FRONT][DOC] Source code url
* [FRONT][FIX][Search Term in Graph Explorer: spaces (#655)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/655)
* [FRONT][ADMIN] Dev Spago next upgrade
## Version 0.0.6.9.9.9.7.2.1 [RELEASE CANDIDATE 007]
## Version 0.0.7.1.3
* [BACK][WIP][Singulars and plurals not grouped anymore (#169)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/169)
* [FRONT][FIX][[Tree (Node Graph)] (Update: remove it) - The "resync" picto no longer launch a reload - It should open the dialog box on the graph reload form confirmation (#644)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/644)
* [FRONT][FIX][Regression in terms display in phylomemy (#642)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/642)
## Version 0.0.6.9.9.9.7.2 [RELEASE CANDIDATE 007]
## Version 0.0.7.1.2
* [BACK][FIX][Error at graph O2 generation (#321)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/321)
## Version 0.0.6.9.9.9.7.1 [RELEASE CANDIDATE 007]
* [BACK][FIX][Singulars and plurals not grouped anymore (#169)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/169)
## Version 0.0.6.9.9.9.7 [RELEASE CANDIDATE 007]
* [BACK][FIX][[API search HAL] On the HAL api, launching the exact same request several times can give different results (#327)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/327)
* [FRONT][FIX][[Node phylo] Phylomemy displays terms with broken accented words (#632)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/632)
## Version 0.0.6.9.9.9.6.7.1 [RELEASE CANDIDATE 007]
* [BACK][FIX] Adding .mailmap file
* [FRONT][FIX][[Tree search] Enrich search results with the path of the node (#638)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/638)
* [FRONT][FIX][[Node type/API GQL] Accomodate an additional field in the Node (see https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/336) to be able to display the ty name of a node (#647)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/647)
* [FRONT][FIX][[Nodes layout] Minor improvements (icons in tabs, titles) (#646)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/646)
* [BACK][FIX][Singulars and plurals not grouped anymore (#169)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/169)
## Version 0.0.6.9.9.9.6.7 [RELEASE CANDIDATE 007]
* [BACK][RELATED][Singulars and plurals not grouped anymore (#169)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/169)
* [FRONT][RELATED][Machting Documents are not displayed anymore in graph (#636)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/636)
## Version 0.0.6.9.9.9.6.6 [RELEASE CANDIDATE 007]
* [BACK][FIX][[Terms] Importing JSON or CSV seems to add new terms to the old ones, rather than overwriting and replacing them all (#313)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/313)
* [BACK][FIX][Coherent Stemming interface (#324)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/324)
* [FRONT][RELATED][[Node phylo] Phylomemy displays terms with broken accented words (#632)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/632)
## Version 0.0.6.9.9.9.6.5.1 [RELEASE CANDIDATE 007]
* [FRONT][FIX][Machting Documents are not displayed anymore in graph (#636)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/636)
## Version 0.0.6.9.9.9.6.5 [RELEASE CANDIDATE 007]
* [BACK][WIP][Singulars and plurals not grouped anymore (#169)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/169)
* [BACK][FEAT][Coherent Stemming interface (#324)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/324)
* [BACK][FIX] Order 1 aligned with first implementation with tests
## Version 0.0.6.9.9.9.6.4 [RELEASE CANDIDATE 007]
* [BACK][FEAT][[Node Phylo] Change the default value of findAncestors to False (#314)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/314)
* [BACK][OPTIM][Export Data as zip for all exports (#312)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/312)
* [BACK][METRICS] SQL queries to follow the community (export to CSV)
## Version 0.0.6.9.9.9.6.3 [Release Candidate for 007]
* [BACK][OPTIM] Option to enable GHC buld with O2 option
## Version 0.0.6.9.9.9.6.2 [Release Candidate for 007]
* [BACK][FIX][Node stories insertion error (SqlError violates foreign key constraint) (#303)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/303)
* [BACK][DOC][Welcome: Door To enter the project (#177)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/177)
* [BACK][OPTIM][Improve Phylo robustness and performance (#292)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/292)
## Version 0.0.6.9.9.9.6.1
* [BACK][FEAT][Removing Order2_A and Order2_B and use Order2 only instead (#308)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/308)
## Version 0.0.6.9.9.9.6
* [BACK][FEAT][Removing Order2_A and Order2_B and use Order2 only instead (#308)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/308)
## Version 0.0.6.9.9.9.5
* [BACK][CI][Improving CI](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/merge_requests/247)
* [FRONT][ERGO][Display Phylomemy parameters (#580)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/580)
## Version 0.0.6.9.9.9.4.9.3
* [FRONT][FIX][Try to invite someone without email (#600)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/600)
## Version 0.0.6.9.9.9.4.9.2
* [FRONT][FIX][getLangs (#628)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/628)
* [FRONT][FIX][The first change in the map term is never taken into account (#622)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/622)
* [BACK][FIX][Different Logins (#302)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/302)
* [GUIDELINES][About MR] a way to better coordinate
## Version 0.0.6.9.9.9.4.9.1
* [FRONT][ERRORFORMAT][Try to invite someone without email (#600)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/600)
## Version 0.0.6.9.9.9.4.9
* [FRONT][ERRORFORMAT][Try to invite someone without email (#600)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/600)
* [BACK][CABAL][Stack2cabal install (#301)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/301)
## Version 0.0.6.9.9.9.4.8
* [BACK][GHC][Upgrade] Upgrade to 947
* [BACK][FIX][[API HAL] Remove useless first 2 characters before authors and sources: ", " (#296)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/296)
* [BACK][FIX][Add server options to obfuscate credentials from logs (#298)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/298)
* [BACK][FIX][[Corpus HAL] (Backend) Remove/comment the HAL "All" lang choice (#299)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/299)
* [FRONT][FIX][[Corpus HAL] Remove/comment the HAL "All" lang choice (#624)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/624)
## Version 0.0.6.9.9.9.4.7
* [BACK][LOGS][Add server options to obfuscate credentials from logs (#298)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/298)
* [BACK][DOC] README
## Version 0.0.6.9.9.9.4.6
* [FRONT][FIX][Try to invite someone without email (#600)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/600)
## Version 0.0.6.9.9.9.4.5
* [FRONT][FIX][The first change in the map term is never taken into account (#622)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/622)
* [BACK][FIX][[Istex import] Changes in the parser: documents sources are wrong (JSON from ZIP file) (#293)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/293)
## Version 0.0.6.9.9.9.4.4
* [FRONT][FIX][trim / deblank missing in invitations modal box (#618)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/618)
* [FRONT][FIX][[Breadcrumb] Remove unnecessary informations (#616)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/616)
## Version 0.0.6.9.9.9.4.3
* [BACK][LOGS][A consistent error format for Gargantext (#267)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/267)
* [BACK][ADM] Build Deps / test / cabal
## Version 0.0.6.9.9.9.4.2
* [BACK][FIX] Deps and build
## Version 0.0.6.9.9.9.4.1
* [BACK][FIX] Deps and build
## Version 0.0.6.9.9.9.4
* [FRONT][FIX][[Docs View] Highlight sometimes broken (#598)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/598)
* [BACK][CLEAN][Clean up XML code (#280)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/280)
* [BACK][CLEAN][TextFlow without list (CSV upload) (#287)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/287)
* [BACK][FEAT][DB obfuscation (#282)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/282)
* [BACK][FRONT][FEAT] EPO API integration
## Version 0.0.6.9.9.9.3.2
* [FRONT][FIX][[Node Documents] Frontend enhancement - highlight terms side-by-side with other terms (#615)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/615)
* [FRONT][FIX][[Node Terms] On clicking on a term association (+/-) the scroll position is lost (#546)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/546)
## Version 0.0.6.9.9.9.3.1
* [FRONT][FIX][[NGram Table] Display of all terms return blank page (#208)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/208)
* [FRONT][FIX][[Node Documents] Frontend enhancement - highlight terms side-by-side with other terms (#615)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/615)
## Version 0.0.6.9.9.9.3
* [BACK][FIX][A consistent error format for Gargantext (#267)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/267)
* [BACK][FIX][Phylo Default (#284)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/284)
## Version 0.0.6.9.9.9.2
* [BACK][REFACT][A consistent error format for Gargantext (#267)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/267)
* [FRONT][FIX][[Docs View] Highlight sometimes broken (#598)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/598)
## Version 0.0.6.9.9.9.1
* [FRONT][ERGO][[Top header & navbar] Reorganize to navbar (#569)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/569)
* [BACK][TESTS][Adding new ngrams (#281)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/281)
## Version 0.0.6.9.9.9
* [BACK][SECURITY][Post policy-manager fixups (#273)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/273)
* [BACK][SECURITY][Investigate `isDescendantOf` (#279)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/279)
* [BACK][FIX][`dateSplit` function is wrong (#275)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/275)
* [FRONT][FIX][[Breadcrumb] Limit the elements that the user is allowed to see and add links (#609)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/609)
## Version 0.0.6.9.9.8.3.4
* [FRONT][FIX][Improve global theme (#509)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/509)
* [FRONT][FIX][[Node options (flower)] Standardise upload and download buttons (order) (#587)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/587)
## Version 0.0.6.9.9.8.3.3
* [BACK][REFACT][`AuthenticatedUser` should store the `NodeId` _and_ `UserId` (#276)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/276)
* [BACK][REFACT][Extend `gargantext-prelude` with the whole of `Protolude` (#274)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/274)
* [FRONT][FIX][[Node Terms] On clicking on a term association (+/-) the scroll position is lost (#546)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/546)
## Version 0.0.6.9.9.8.3.2
* [BACK][CODE] Type Classes improvement
## Version 0.0.6.9.9.8.3.1
* [BACK][FIX] Disabling policy check
## Version 0.0.6.9.9.8.3
* [BACK][FIX][Docs Node: Score (#272)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/272)
* [BACK][FIX][Post policy-manager fixups (#273)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/273)
* [FRONT][FEAT][[Corpus Upload] Add a new ISTEX (from a zip file) option in the selectbox source field (first field below the "Browse files" button) (#603)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/603)
* [FRONT][FIX][[Tree] Change the "Hide Tree" button by a more intuitive toggle button (display the btn in the lateral bar) (#530)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/530)
## Version 0.0.6.9.9.8.2
* [FRONT][FIX][[User page] Fix the error message when the page loads (#604)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/604)
* [FRONT][FIX][[Node content] Breadcrumb: display the full path of a node, as a breadcrumb (with each clickable parent) (#568)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/568)
* [BACK][FIX][[Node content] Breadcrumb: display the full path of a node, as a breadcrumb (with each clickable parent) (#263)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/263)
* [BACK][FIX][Post policy-manager fixups (#273)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/273)
## Version 0.0.6.9.9.8.1
* [BACK][FIX][Security considerations (#259)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/259)
## Version 0.0.6.9.9.8
* [FRONT][FIX][[Docs View] Highlight sometimes broken (#598)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/598)
* [BACK][FIX] return in SQL query (instead of pure)
## Version 0.0.6.9.9.7.9
* [FRONT][FIX][Slider 'level of observation' in phylomemies (#601)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/601)
* [FRONT][FIX][[Corpus from pads] Put "EN" as default value in the import form language field (#602)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/602)
## Version 0.0.6.9.9.7.8
* [FRONT][FIX][Ngrams Table: click on terms status (#594)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/594)
* [BACK][CLEAN] make hlint happier : return -> pure
* [FRONT][WIP] removing ALL, putting EN lang by default
## Version 0.0.6.9.9.7.7
* [FIX][DOC] Link to documentation
* [BACK][FEAT][Improving search in Documents (#261)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/261)
## Version 0.0.6.9.9.7.6.4
* [FRONT][FIX][Ngrams Table: click on terms status (#594)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/594)
## Version 0.0.6.9.9.7.6.3
* [BACK][TESTS] Make a start on benchmarking, add more tests
## Version 0.0.6.9.9.7.6.2
* [BACK][FIX] CI
* [FRONT][FEAT] Restoring APIs for tests
## Version 0.0.6.9.9.7.6.1
* [BACK][API/DATA] OpenAlex connection
* [BACK][DOC][README: Add note about libraries devlopment (#260)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/260)
## Version 0.0.6.9.9.7.6
* [BACK][FIX][[ArXiv][TextFlow] Ngrams Table empty (#258)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/258)
* [BACK][FIX][[Corpus HAL API] Abstract in both languages FR+EN instead of only 1 language (#244)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/244)
* [FRONT][ERGO][API key pubmed (#593)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/593)
* [FRONT][FACTO][Tree on the right (#511)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/511)
* [FRONT][FIX][Single document upload doesn't work when abstract is empty (#592)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/592)
* [FRONT][RENDER][[Node Phylo] Form render improvements (#581)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/581)
## Version 0.0.6.9.9.7.5.1
* [BACK][FIX][[Corpus HAL API] Abstract in both languages FR+EN instead of only 1 language (#244)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/244)
* [FRONT][FIX] Commenting APIs that are not fully operational yet
## Version 0.0.6.9.9.7.5
* [BACK][FEAT][DB queries testing coverage (#226)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/226)
* [BACK][FEAT][Docs Occurence are first at 0, and must be recalculate to have a reliable value (#254)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/254)
* [FRONT][FIX] Node Corpus settings: removing download button
## Version 0.0.6.9.9.7.4
* [BOTH][BACK] Dev Guidelines
* [FRONT][FIX][[Node Doc] Annotation: select/add ngram to map terms doesn't seems to sync in frontend render (#563)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/563)
* [FRONT][FIX][Wrong date record in "add document" (#561)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/561)
* [BACK][FIX][Remove package.yaml from the project (#252)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/252)
* [BACK][FIX][Adding Chineze to GarganText (#250)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/250)
* [BACK][FIX][Job tests fail randomly (#198)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/198)
## Version 0.0.6.9.9.7.3
* [BACK][FEAT][Adding Chineze to GarganText (#250)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/250)
## Version 0.0.6.9.9.7.2
* [BACK][FIX] Cabal CI Fix
* [BACK][DOC][[Readme] Test/Reinstall project with cabal and update the readme file (#239)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/239)
* [FRONT][FIX][[Node Doc] Annotation: select/add ngram to map terms doesn't seems to sync in frontend render (#563)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/563)
## Version 0.0.6.9.9.7.1
* [FRONT][FIX][[Node Docs] On the refresh dialog set "Both" as default and on documents page remove 2 unused icons (#578)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/578)
* [FRONT][FIX][[Node Phylo] Form render improvements (#581)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/581)
* [FRONT][FIX][[Home connection] On first user connection, automatically select the current server instance on clicking the Login button (#579)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/579)
## Version 0.0.6.9.9.7
* [BACK][FIX] Phylo
* [BACK][FIX] Nix configuration
* [FRONT][FIX][[Node Docs] Popin dimensions and scroll improvement (#577)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/577)
* [FRONT][FIX][[Phylo refresh] In phylo params, add a class active on buttons (#576)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/576)
* [FRONT][FIX][Add the number of matched results in graph selection (#560)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/560)
* [FRONT][FIX][[Node Docs] On the refresh dialog set "Both" as default and on documents page remove 2 unused icons (#578)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/578)
## Version 0.0.6.9.9.6.9
* [FRONT][FIX][Search in the Tree (#506)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/506)
* [FRONT][FIX][Ngrams Table: click on Child (#565)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/565)
## Version 0.0.6.9.9.6.8
* [FRONT][FIX][Node Corpus / API search (#571)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/571)
* [BACK][FIX] Phylo (WIP)
## Version 0.0.6.9.9.6.7
* [FRONT][FIX][Node Corpus / API search (#571)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/571)
* [BACK][FIX] PhyloTypes
* [FRONT][FIX][[Node Doc] Annotation: select/add ngram to map terms doesn't seems to sync in frontend render (#563)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/563)
* [FRONT][FIX][[Graph] Rearrange the graph toolbar (#567)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/567)
## Version 0.0.6.9.9.6.6
* [BACK|FRONT][WARNING] Button to launch API corpus is broken for now
* [BACK][FEAT] Phylo is working again
* [FRONT][ERGO][[Graph] Rearrange the graph toolbar (#567)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/567)
## Version 0.0.6.9.9.6.5
* [BACK|FRONT][FIX] Order 2
* [FRONT][FIX][[Node Terms] Restore a good display the main table cols display (since adding the "show" column) (#566)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/566
)
## Version 0.0.6.9.9.6.4
* [BACK][FIX][ngrams children in `node stories` are not in the `ngrams` table (#222)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/222)
* [BACK][FIX][NodeUser json parse error (#213)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/213)
* [BACK][FEAT][Gitlab Issue Parser, ZuriHac]
* [FRONT][FIX][Doc Annotation: the selected term menu selection has disappeared (#562)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/562)
* [FRONT][FIX][Abstract almost disapear in graph's doc view when there is too much authors (#555)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/555)
* [FRONT][FIX][Ngrams Context (#547)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/547)
## Version 0.0.6.9.9.6.3
* [BACK][FIX][Boolean Query Parser (#182)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/182)
* [BACK][FEAT] Gitlab Issue Parser, Welcome Christian
## Version 0.0.6.9.9.6.2
* [BACK][FIX][Ngrams Status change (#217)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/217)
* [FRONT][FEAT][Ngrams Context (#547)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/547)
* [BACK|FRONT][DOC] Renaming NodeFrame(Write|Calc) -> Notes|Calc
## Version 0.0.6.9.9.6.1
* [FRONT][FIX] Default Node List name
* [FRONT][DESIGN][Design, improve the position of the icons (#554)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/554)
* [FRONT][DESIGN][Not Found</title>](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/559)
* [FRONT|BACKEND][FIX][Doc View, ngrams selected: children of grouped terms are not shown (#551)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/551)
* [BACK][FIX] Removing cron job
## Version 0.0.6.9.9.6
* [RELEASE CANDIDATE]
* [FRONT][FIX][Doc View, ngrams selected: children of grouped terms are not shown (#551)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/551)
* Removing cron jobs
## Version 0.0.6.9.9.5.8
* [BACK/FRONT][FIX] Reverting Notes / NodeWrite and Calc / NodeCalc change
* [FRONT][DOC][Change waiting message when selecting nodes (#557)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/557)
## Version 0.0.6.9.9.5.7
* [BACK][OPTIM/FIX][[Node terms] Random slowness on loading a page list of terms (#199)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/199)
* [BACK|FRONT][DOC] NodeFrameWrite -> Notes
* [FRONT][DOC] Node Functions order
* [FRONT][DOC] NodeFrameCalc -> Calc only
## Version 0.0.6.9.9.5.6
* [FRONT][FIX][Doc View, ngrams selected: children of grouped terms are not shown (#551)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/551)
## Version 0.0.6.9.9.5.5
* [FRONT][FEAT][Search in the Tree (#506)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/506)
* [BACK][FIX][NodeUser json parse error (#213)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/213)
* [BACK][FET][Book functions (WIP)] Used to analyze Rabelais' masterpices
## Version 0.0.6.9.9.5.4
* [BACK][FIX][Ngrams Status change (#217)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/217)
## Version 0.0.6.9.9.5.3
* [BACK][ADM/CI][Docker image with nix (#188)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/188)
* [FRONT][FEAT/ERGO][[Home instances blocks] Add a log out action and picto in each instance block header (same action that is in the log in/log out modal) (#552)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/552)
* [FRONT][FIX/REVERT][[Term table] Add term should not be suggested when term is already added (#544)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/544)
## Version 0.0.6.9.9.5.2
* [FRONT][FIX][Doc View, ngrams selected: children of grouped terms are not shown (#551)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/551)
## Version 0.0.6.9.9.5.1
* [BACK][FEAT][fonction to post to either Write or Calc (#205)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/205)
* [FRONT][FIX][[Term table] Add term should not be suggested when term is already added (#544)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/544)
* Enabling Isidore API connection for tests
## Version 0.0.6.9.9.5
* [BACK][OPTIM][[Node terms] Random slowness on loading a page list of terms (#199)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/199) Refresh index for textflow, reindex of terms list and schedule job
* [BACK][FIX][Docker image with nix (#188)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/188)
* [FRONT][FEAT][improvement Doc table : default state is stars empty, become one star after reading (#541)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/541)
## Version 0.0.6.9.9.4.6
* [BACK][FEAT][Import Corpus Docs as Json (#203)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/203)
* [BACK][OPTIM][[Node terms] Random slowness on loading a page list of terms (#199)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/199)
* Upgrade indications: run gargantext-upgrade gargantext.ini
## Version 0.0.6.9.9.4.5
* [BACK][OPTIM][[Node terms] Random slowness on loading a page list of terms (#199)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/199)
## Version 0.0.6.9.9.4.4
* [FRONT][FIX/WIP][[Term table] Add term should not be suggested when term is already added (#544)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/544)
* [FRONT][FIX] File Type vs Node Type
## Version 0.0.6.9.9.4.3
* [FRONT][FIX][APi tab not shown (#540)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/540)
* [BACK][FIX] SearX analysis needs its NodeTexts
## Version 0.0.6.9.9.4.2
* [BACK][FIX][[Node terms] Random slowness on loading a page list of terms (#199)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/199)
* [FRONT][CLEAN] Removing API that do not fully work (yet)
* [FRONT][FIX] Chat Link
## Version 0.0.6.9.9.4.1
* [FRONT][FIX][Doc annotation: space selected as ngrams issue (#458)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/458)
* [BACK][ADM][API key / user (pubmed) (#201)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/201)
## Version 0.0.6.9.9.4
* [FRONT][FIX][Doc annotation: space selected as ngrams issue (#458)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/458)
* [BACK][FEAT][API key / user (pubmed) (#201)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/201)
## Version 0.0.6.9.9.3.3
* [FRONT][CSS][Improve global theme (#509)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/509)
* [FRONT][FIX][Update chart (#536)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/536)
* [FRONT][FIX][[Node sharing] On adding a user: move the user suggestion block below the input field (rather than above the popin) (#523)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/523)
## Version 0.0.6.9.9.3.2
* [FRONT/BACK][FEAT] Not visible yet but Iramuteq parser added (needs
more data to consolidate the format).
## Version 0.0.6.9.9.3.1
* [FRONT][DESIGN][Improve global theme (#509)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/509)
## Version 0.0.6.9.9.3
* [FRONT][FIX][[Node Terms] The number of terms per page (eg. 10 by default) seems to be ramdomly wrong (#531)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/531)
## Version 0.0.6.9.9.2
* [FRONT][FIX][[Node Terms] Problem with consecutive actions on different term selections (#537)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/537)
## Version 0.0.6.9.9.1
* [BACK][FEAT] New Languages added with Spacy model, test ok (need to group ngrams though)
## Version 0.0.6.9.9
* [BACK][FEAT][Adding New Language NLP tools through gargantext.ini (postagging case) (#184)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/184)
## Version 0.0.6.9.8.7.1
* [BACK][FIX][Job tests fail randomly (#198)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/198)
* [FRONT][FIX][Improve global theme (#509)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/509) Pin icon
## Version 0.0.6.9.8.7
* [FRONT][FEAT][Pin Tree to a specific Node (#513)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/513)
* [BACK][FIX][Job tests fail randomly (#198)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/198)
## Version 0.0.6.9.8.6.2
* [BACK][TYPES][query pubmed, arxiv, istex, HAL not working anymore (#193)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/193)
* [BACK][FIX][Progress Bar (#192)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/192)
## Version 0.0.6.9.8.6.1
* [FRONT][ADM][ Do not use `master` as a revision for `easy-ps.nix`](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/merge_requests/339)
## Version 0.0.6.9.8.6
* [BACK][DOC][Welcome: Door To enter the project (#177)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/177)
* [BACK][FEAT] Adding more redundancies of Text in FrameWrite parsing (Notes)
* [BACK][FIX] Clean code for documentation haddock
* [BACK][FIX][Doc Table: count (#175)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/175)
* [BACK][FIX][Error WOS import](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/196)
* [BACK][FIX][List upload does not work any more (#191)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/191)
* [BACK][FIX][NLP parsing] Removing urls which are untokenable for Spacy
* [BACK][FIX][query pubmed, arxiv, istex, HAL not working anymore (#193)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/193)
* [FRONT][DOC][[Graph Toolbar] Add tooltips/legends on buttons (#529)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/529)
* [FRONT][FIX][Improve global theme (#509)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/509)
## Version 0.0.6.9.8.5.1
* [FRONT][FIX][Improve global theme (#509)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/509)
## Version 0.0.6.9.8.5
* [BACK][REFACT][JOBs&#39; API (#185)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/185)
## Version 0.0.6.9.8.4
* [FRONT][FIX][Improve global theme (#509)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/509)
* [BACK][FIX][query pubmed, arxiv, istex, HAL not working anymore (#193)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/193)
* [BACK][FIX] Username could be an email
## Version 0.0.6.9.8.3
* [BACK][REFACT][JOBs&#39; API (#185)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/185)
* [FRONT][CSS][Improve global theme (#509)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/509)
* [BACK][FEAT][Adding New Language NLP tools through gargantext.ini (postagging case) (#184)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/184)
## Version 0.0.6.9.8.2.2
* [FRONT][CSS][Improve global theme (#509)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/509)
## Version 0.0.6.9.8.2.1
* [BACK][FIX][FrameCalc POST method not allowed any more (#190)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/190) (cherry-pick to testing)
* [BACK][OPTIM] Quality tested and optimized Order 2 (with recursive clustering)
## Version 0.0.6.9.8.2
* [BACK][OPTIM] Back to Distri Similarity (2)
## Version 0.0.6.9.8.1
* [BACK][FEAT/ADM][Adding New Language NLP tools through gargantext.ini (postagging case) (#184)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/184)
* UPGRADE: update your gargantext ini file with the [nlp] section check the gargantext.ini_toModify file as example
* [BACK][SPACY] NLP server tested with FR lang
## Version 0.0.6.9.8
* [BACK][FRONT][FEAT] Phylo 1 click
## Version 0.0.6.9.7.6
* [BACK][UPGRADE] Igraph bindings
* [BACK][NIX][Adapt nix configuration of haskell-igraph (#187)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/187)
* [FRONT][CLEAN] Node Graph, one option only
## Version 0.0.6.9.7.5
* [FRONT][CSS][Improve global theme (#509)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/509)
* [FRONT][CSS][FA send button not available (#517)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/517)
## Version 0.0.6.9.7.4
* [FRONT][FIX] Node Settings : Main nodes (Private, Shared, Public) can not be deleted or created.
## Version 0.0.6.9.7.3
* [FRONT][FIX][[hackathon] GraphExplorer fixes (#489)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/489)
## Version 0.0.6.9.7.2
* [FRONT][FEAT][Label Shape in Graph Explorer (#501)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/501)
* [FRONT][FIX] Spatialization of Graph improved
## Version 0.0.6.9.7.1
* [BACK][FEAT] Phylo in 1 click really merged (backend only for now).
## Version 0.0.6.9.7
* [FRONT][FEAT][Label Shape in Graph Explorer (#501)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/501)
* [BACK][DOC][Welcome: Door To enter the project (#177)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/177)
## Version 0.0.6.9.6
* [BACK][FEAT] Phylo in 1 click
* [FRONT][ERGO][](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/509)
## Version 0.0.6.9.5
* [FRONT][DESIGN][Improve global theme (#509)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/509)
* [BACK][CLEAN] Removing debug info
## Version 0.0.6.9.4.9
* [BACK/FRONT][475][Issues · gargantext / purescript-gargantext · GitLab</title>](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/)
## Version 0.0.6.9.4.8
* [BACK][WIP][Doc Table: count (#175)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/175)
* [BACK][FEAT] Clustering with better granularity and structure at different levels
## Version 0.0.6.9.4.7
* [FRONT][FIX][Limite on text lenght is too small (#500)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/500)
* [BACK][FEAT] Clustering with better granularity and structure
## Version 0.0.6.9.4.6
* [FRONT][ERGO][When the progress bar is empty: say: waiting task (#503)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/503)
* [FRONT][DOC][Door to entry: Welcome! (#269)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/269)
* [FRONT][DOC] Show Text Size Limit
* [BACK][FIX] Order 2 regression fixed and clustering with more granularity
## Version 0.0.6.9.4.5
* [BACK][CLEAN] Switch to Hackage version of hstatistics
* [BACK][CLEAN] Drop unused servant-static-th
* [FRONT][CLEAN] README
* [FIX][CRALER] ArXiv API
## Version 0.0.6.9.4.4
* [BACK][Add optional Accelerate dependency on Darwin for pkgs.nix](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/merge_requests/128)
* [BACK][Crawlers] pubmed clean unused deps removed
* [BACK][CLEAN][Explore cutting down forks/extra-deps of libraries (#180)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/180)
* [BACK][DOC] README
## Version 0.0.6.9.4.3
* [BACK][DOC][Welcome: Door To enter the project (#177)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/177)
* [FRONT][DOC][Door to entry: Welcome! (#269)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/269)
* [BACK][REFACT][Doc Table: count (#175)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/175)
## Version 0.0.6.9.4.2
* [FRONT][FIX][Regression : on graph (#496)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/496)
## Version 0.0.6.9.4.1
* [FRONT][FIX][Invite many users without closing the modal (#498)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/498)
## Version 0.0.6.9.4
* [BACK][FIX] Username and email to lowerCase always. Use migration script please to avoid errors.
* [BACK][FIX][Ngrams Change insert causes Database error (#173)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/173)
* [FRONTED][CLEAN] Removing Isidore DB for now
* [BACK][FIX] WOS Parser
## Version 0.0.6.9.3
* [FRONT][FIX][[hackathon] GraphExplorer fixes (#489)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/489)
* [BACK][FIX][Corpus Analysis from Nodes FrameWrites (#164)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/164)
## Version 0.0.6.9.2
* [BACK][FIX] NodeWrite simple parsing
* [BACK][FIX] List Learning is back
* [BACK][FIX][Document rating in Doc Table is broken (#174)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/174)
* [FRONT][FIX][Document supression do not work (#495)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/495)
## Version 0.0.6.9.1
* [FRONT][FIX][terms] resolve flickering issue on children
* [FRONT][FIX] [layout] Close CTA button on graph/phylo sidebar
## Version 0.0.6.9.0
* [BACK][FIX] Advanced Bridgeness fix
* [FRONT][FEAT] Ratings in Document each
* [FRONT][FIX] Ngrams Table, removing useless columns
* [BACK][FIX] Duplicates
* [FRONT][FIX] Node Selection Indicator
* [FRONT][FIX] Just a little warning specifying a bug on <ReactTooltip>
* [FRONT][FEAT] Graph Explorer fixes (labels, Sigma JS parameters)
* [FRONT][layout] Close CTA button on graph/phylo sidebar
* [BACK][NodeWrite] Corpus easier to make with NodeWrite Frames
## Version 0.0.6.8.6
* [BACK][FIX][New Corpus, Ngrams Table Repo (#163)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/163)
* [BACK][FIX][Export List as CSV (#155)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/155)
## Version 0.0.6.8.5.9.4
* [FRONT][FIX][Editor codtype change (#145)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/145)
* [BACK][FIX][Conduit insert with batch of documents in db (#161)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/161)
* [BACK][FIX] API: HAL, PUBMED
* [BACK][FIX] API: Upload file with options
## Version 0.0.6.8.5.9.3
* [BACK][FIX][Conduit insert with batch of documents in db (#161)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/161)
* [BACK][FIX][Not Found</title>](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/441)
## Version 0.0.6.8.5.9.2
* [BACK][FIX] Incorrect count in HAL
* [FRONT][FEAT] Node Move Settings (Just a type and it changes everything)
## Version 0.0.6.8.5.9.1
* [BACK][FIX][fix to current db to update versions (#159)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/159)
## Version 0.0.6.8.5.9
* [ALL][FEAT] Text Flow with NoList built as option
* [FRONT][FIX][Adding 3th ngrams in document view breaks ngrams Table (#476)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/476)
## Version 0.0.6.8.5.8
* [FRONT][FIX][Graph Explorer Nodes (#471)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/471)
* [FRONT][FIX][[docs] Backend improvements (#443)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/443)
## Version 0.0.6.8.5.7
* [FRONT][FIX][Graph Explorer Blank Page (#465)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/465)
* [BACK][FIX] Date parser for HAL and WOS
## Version 0.0.6.8.5.6
* [BACK][FIX][Group breaks List with Backend (#156)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/156)
* [BACK][FIX] Spacy Bug if String is empty
## Version 0.0.6.8.5.5
* [FRONT][FEAT][Adding unary document: Language option (#445)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/445)
## Version 0.0.6.8.5.4
* [BACK][FIX] FIX Ngrams List building
## Version 0.0.6.8.5.3
* [BACK][FIX][Pubmed parser (#151)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/151)
## Version 0.0.6.8.5.2
* [BACK][CI][jobqueue test: tweak delay for more stable CI
results?](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/merge_requests/112)
* [FRONT][FIX][User email change doesn&#39;t work (#469)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/469)
* [FRONT][FIX][Graph Explorer Blank Page (#465)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/465)
* [FRONT][FIX][NgramsTable: user orderBy parameter (#468)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/468)
## Version 0.0.6.8.5.1
* [BACK][FIX] Indexing issue: taking all terms instead of longest of terms in case of ngrams included in others
* [FRONT][FIX][Disconnection of instance causes a blank page (#464)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/464)
* [BACK][FIX] ArXiv search in Abstracts by default
## Version 0.0.6.8.5
* [BACK][FIX][Ngrams Table, page sort / limit (#149)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/149)
* [FRONT][FIX][Security Issue with Teams (#452)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/452)
* [FRONT][FIX][Darkster Mode: when creating a node we miss informations (#461)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/461)
## Version 0.0.6.8.4
* [BACK][FEAT] Fix reindexing functions
* [FRONT][FIX][FEEDBACK ON 0.0.6.8.2 (#459)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/459)
## Version 0.0.6.8.3
* [INFO][UPGRADE] To upgrade use the 0.0.6.8.3.sql script
* [FRONT][SECU][Security Issue with Teams (#452)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/452)
* [FRONT][FEAT][Graph Explorer: disable controls when ForceAtlas is running (#451)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/451)
* [FRONT][FIX][[Doc date filter] Filter by multiple dates (#450)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/450)
* [FRONT][ERGO][[layout] Description node block hide feature (#447)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/447)
* [FRONT][ERGO][[layout] Node view additions (#448)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/448)
* [BACK][FIX][Problem at list import (#148)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/148)
* [FRONT][FIX][CSS in Graph Explorer toolbar (#460)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/460)
* [BACK][FEAT] Bridgeness with more links
## Version 0.0.6.8.2
* [FRONT][FIX][[Doc view] By default sort document from latest to oldest (#457)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/457)
* [FRONT][FIX][Regression on Documents&#39; annotation (#456)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/456)
* [FRONT][FIX][[layout] Move Cache CTA to topbar (#446)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/446)
* [FRONT][FIX][Graph Explorer: node status change to either candidates or stop (#454)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/454)
## Version 0.0.6.8.1
* [BACK][IMPROVEMENT] Ngrams Extraction without verbs and with better Parsing for French Pos.
* [BACK][FIX] SQL error disconnection, tested, the issue should be closed
## Version 0.0.6.8
* [BACK][FEAT][Flexible job queue system](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/merge_requests/109)
* [FRONT][FEAT][Doc View, Histogram click on bar -&gt; select documents by Date (#430)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/430)
* [BACK][OPTIM][Ngrams Table, queries optimization (#144)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/144)
* [FRONT][UPGRADE][Upgrade PS to 0.15 (#395)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/395)
* [FRONT][GRAPH][Filtering edge weight bring back new edges (#442)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/442)
* [FRONT][GRAPH][Louvain clustering on filtered graph (#418)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/418)
* [FRONT][GRAPH][GraphExplorer Node size slider (#215)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/215)
* [FRONT][GRAPH][Graph Explorer : link filtering does not impact spatialization (#243)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/243)
## Version 0.0.6.7.1
* [FRONT][FIX][[maplist upload] bugged modal after upload (#440)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/440)
* [BACK][OPTIM][Ngrams Table, queries optimization (#144)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/144)
* [BACK][CONFIG] gargantext.ini needs new field
BACKEND_NAME = THE INSTANCE NAME
## Version 0.0.6.7
* [GRAPH][FIX] Nodes with one edge only are removed now
* [FRONT][GRAPH] Option to chose the clustering method is not shown any more.
## Version 0.0.6.6
* [FRONT][UPGRADE][Upgrade PS to 0.15 (#395)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/395)
* SigmaJS upgrade inside
* [BACK][OPTIM] [Confluence optimization (#137)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/137)
* [FRONT][FIX][[maplist upload] bugged modal after upload (#440)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/440)
## Version 0.0.6.5.1
* [BACK][FIX] Ngrams Table concurrency issue. [Issue 143](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/143)
* [BACK][MERGE] dev-phylo branch
* [FRONT][FIX] If space are in username or password
## Version 0.0.6.5
* [BACKFRONT][FIX] APIs HAL et ISTEX
* [FRONT][FIX] Search page parameters to 0 for the result
## Version 0.0.6.4
* [FRONT][FIX] Modal closing
* [FRONT][TEAM] Show leader of the Team. [Issue 438](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/438)
* [FRONT][ADM] [Forgot password] disable input field after submit
## Version 0.0.6.3
* [BACK][FRONT][FEAT] FR NLP connection tested
* [FRONT][ERGO] click on node to get the modal actions
* [BACK][DOC] default name of folder
## Version 0.0.6.2
* [BACK][FIX] Ngrams List saved in database on halting
* [BACK][FIX] Confluence on Graph
* [BACK][FIX] HAL parser fix
* [BACK][UPGRADE] ./bin/psql gargantext.ini < devops/postgres/upgrade/0.0.6.2.sql
* [BACK][ADMIN] upgrade script, test ok
* [BACK][FIX][API] IsTex
* [BACK][ADM] Invitation script
## Version 0.0.6.1
* [BACK][FEAT] Spacy Server connection for French (and others) languages
* git clone https://gitlab.iscpif.fr/gargantext/spacy-server.git
* [BACK][FEAT] At startup, check if gargantext.init script has been activated
* [BACK][UPGRADE] Use the devops/postgres/upgrade/0.0.6.1.sql upgrade script
* [BACK][FIX] PubMed Parser with threadDelay
* [BACK][FIX] Hash to remove duplicates on filtered text
## Version 0.0.6
* [BACK][OPTIM] Ngrams Table optmization. To upgrade:
1. `./bin/psql gargantext.ini < devops/postgresql/upgrade/0.0.6.sql`
2. in `stack --nix repl` run `runCmdReplEasy $ migrateFromDirToDb`
* [FRONT][FIX] Ngrams Table next button: loads only one time instead of twice previously
* [FRONT][FIX] Resize handler on Write Node
* [FRONT][FIX] Do not highlight ngrams if maximum abstract length > 4500 characters
## Version 0.0.5.9.6
* [BACK][FIX] Nix build ok
* [BACK][OPTI] Confluence optimization
* [FRONT][GACK][FEAT] Team management
* [FRONT][FEAT] Legend for graph
## Version 0.0.5.9.5
* [FRONT][FIX] View Document List fix CSS
* [FRONT][FIX] Node Modal fix
## Version 0.0.5.9.4
* [FIX] Arxiv API fix
* [DESIGN/ERGO] Tree node position highlight
## Version 0.0.5.9.3
* [FEAT] Graph options with Links Strength
## Version 0.0.5.9.2
* [FEAT] User description field to User page
* [FIX] Ngrams Table cache on
* [FEAT] Ngrams Status change from Phylo Explorer
* [OPTIM] Graph Order 2 generation
* [FIX] Forgot password improvement
## Version 0.0.5.9.1
* [FIX] Graph self referencing nodes
* [FIX] Ngrams Table Tree CSS
* [FIX] Ngrams Table Search with enter only
* [FIX] Graph build: removing mergechildren function for tests
## Version 0.0.5.9
* [FIX] Annuaire Contact Page
* [WIP] Graph Debug (mergeNgrams enabled again)
## Version 0.0.5.8.9.9
* [FIX] Debug Graph Labels
* [FIX] schema upgraded, use 0.0.5.7.8.sql to upgrade your database
* [FEAT] Script to create and sending email to user: invitation
## Version 0.0.5.8.9.8
* [ERGO] NgramsTable, change group and search for ngrams to add
* [FIX] Board, Source Chart fix
## Version 0.0.5.8.9.7
* [FEAT] Infomap Clustering
## Version 0.0.5.8.9.6
* [FIX] IsTex crawler working with basic queries (i.e. without quotes)
## Version 0.0.5.8.9.5
* [FIX] FrontEnd maybe ParentId
* [FIX] IsTex crawler
## Version 0.0.5.8.9.4
* [FE] [FEAT] Phylo Explorer, interactions with documents
* [FE] [ERGO] Fonts in Ngrams Table
## Version 0.0.5.8.9.3
* [BE] [FIX] garg password function
* [FE] [FIX] Trees closing/opening issue
* [FE] [FIX] Viz Explorer Side Panel
## Version 0.0.5.8.9.2
* [FEAT] Lost Password
* [Phylo] More Data in API
## Version 0.0.5.8.9.1
* [FE] [DESIGN] NoteBook, UI/UX Improvements
* [FE] [FEAT] Automatic Sync when adding a new ngrams
* [FE] Frame Page
## Version 0.0.5.8.9
* [COUNTS] Chart update when docs are deleted or added
* [ERGO] Plane navigation improved
* [ERGO] Mouse misalignemnt fixed
* [FIX] Date parser WOS
* [FIX] Node names: List -> Terms
## Version 0.0.5.8.8.2
* [FE] Fix Contact Page
## Version 0.0.5.8.8.1
* [FE] Fix regression on Graph Explorer: edges color + confluence filter
## Version 0.0.5.8.8
* [FE] Fix regression on Graph Explorer for annuaire
* [FE] Graph Doc Focus
## Version 0.0.5.8.7.2
* [BE] Docker solution for codebook
## Version 0.0.5.8.7.1
* [BE] Annuaire pairing, using full first name
## Version 0.0.5.8.7
* [FE] Graph Explorer Document exploration improvements
## Version 0.0.5.8.6
* [FE] Plane navigation improvements
## Version 0.0.5.8.5.1
* [FRONT] FIX CSS Forest
## Version 0.0.5.8.5
* [FRONT] CSS + Design, Graph Toolbar and many things
* [BACK] Security FIX GQL route
* [BACK] Arxiv API connexion
## Version 0.0.5.8.4
* [BACK] GraphQL routes
* [FRONT] CSS, Forest Sidebar
* [HAL] parser back and front
## Version 0.0.5.8.3
* [CRAWLERS] HAL for organizations, example done for IMT
## Version 0.0.5.8.2
* [FIX] Regex Error on HAL Date parsing with Duckling
## Version 0.0.5.8.1
* [FIX] Folder Up button working well now, using GraphQL
## Version 0.0.5.8
* [FIX] reindex ngrams-contexts function
* [PARAM] decreasing the Candidate list
* [FEAT] enabling Notebooks for Teams
* [REFACT] Page user and email refactoring
## Version 0.0.5.7.9.1
* [FIX] Group revert + NLP French API implemented (WIP)
* Default Names of Folder and Frames simplified
## Version 0.0.5.7.9
* [FEAT] New NLP server for postagging
* [FIX] Spinglass unconnected componnent of graph
## Version 0.0.5.7.8
* [FIX] PubMed limit parser
## Version 0.0.5.7.7
* [FEAT FIX] Link Annuaire Corpus (WIP)
* [UPGRADE METHOD] ./bin/psql gargantext.ini < devops/postgres/upgrade/0.0.5.7.7.sql
## Version 0.0.5.7.6
* [FIX] Default behavior of Ngrams Table: Cache off and Desc order by score
## Version 0.0.5.7.5
* [FIX] Progress length
## Version 0.0.5.7.4
* [FIX] User Page info get/update/security
## Version 0.0.5.7.3
* [OPTIM] HAL and PubMed parsers with Conduit
* [BACK] Zip files added
## Version 0.0.5.7.2
* [FIX] Phylo default parameters on frontend side
## Version 0.0.5.7.1
* [FIX] Phylo error findBounds fixed
## Version 0.0.5.7
* [FEAT] Phylo Backend/Frontend connected for tests
## Version 0.0.5.6.7
* [BACK] fix limit with MAX_DOCS_SCRAPERS
* [FEAT] Users Password Sugar function : in repl, runCmdReplEasy $ updateUsersPassword ["user@mail.com"]
## Version 0.0.5.6.6
* [BACK] CSV List post and reindex after (for both CSV and JSON)
## Version 0.0.5.6.5
* [BACK] HAL parser with Conduit
## Version 0.0.5.6.4
* [FRONT] Forest Tooltip + Async progress bar fix
## Version 0.0.5.6.3
* [BACK][EXPORT][GEXF] node size
## Version 0.0.5.6.2
* [FRONT][FIX] Ngrams Batch change
## Version 0.0.5.6.1
* [BACK][FEAT] Confluence Method connection
## Version 0.0.5.6
* [BACK][FEAT] Phylo backend connection
* [FRONT] Editable Metadata
## Version 0.0.5.5.7
* [FRONT][FIX] NgramsTable Cache search.
## Version 0.0.5.5.6
* [BACK][FIX] ./bin/psql gargantext.ini < devops/posgres/upgrade/0.0.5.5.6.sql
* [FRONT] fix NodeType list show (Nodes options)
## Version 0.0.5.5.5
* [FORNT] fix Graph Explorer search ngrams
* [FRONT] fix NodeType list show (main Nodes)
## Version 0.0.5.5.4
* [BACK][OPTIM] NgramsTable scores
* [BACK] bin/client script to analyze backend performance and reproduce bugs
* [FRONT] Adding Language selection
## Version 0.0.5.5.3
* [BACK] Adding a Max limit for others lists.
## Version 0.0.5.5.2
* [BACK][OPTIM] Index on node_node_ngrams to seed up ngrams table score
queries. Please execute the upgrade SQL script
devops/postgres/0.0.5.5.2.sql
## Version 0.0.5.5.1
* [BACK] FIX Graph Explorer search with selected ngrams
* [FRONT] Clean CSS
## Version 0.0.5.5
* [FRONT] Visio frame removed, using a new tab instead (which is working)
* [BACK] Scores on the docs view fixed
## Version 0.0.5.3
* [FRONT] SSL local option
## Version 0.0.5.2
* [QUAL] Scores in Ngrams Table fixed during workflow and user can
refresh it if needed.
## Version 0.0.5.1
* [OPTIM] Upgrade fix with indexes and scores counts
## Version 0.0.5
* [OPTIM][DATABASE] Upgrade Schema, move conTexts in contexts table which requires a version bump.
## Version 0.0.4.9.9.6
* [BACK] PubMed parser fixed
* [FRONT] Visio Frame resized
## Version 0.0.4.9.9.5
* [FIX] Chart Sort
## Version 0.0.4.9.9.4
* [FEAT] Corpus docs download
## Version 0.0.4.9.9.3
* [BACK] Graph update with force option
## Version 0.0.4.9.9.2
* [BACK] Opaleye Upgrade
## Version 0.0.4.9.9.1
* [FRONT] 350-dev-graph-search-in-forms-not-labels
* [FRONT] 359-dev-input-with-autocomplete
## Version 0.0.4.9.9
* [FIX] Continuous Integration (CI)
## Version 0.0.4.9.8
* [FEAT] All backend routes with clients functions
## Version 0.0.4.9.7
* [FEAT] Searx API done (needs a fix for language selection)
## Version 0.0.4.9.6
* [UX] GT.query forces trees reload for async tasks
## Version 0.0.4.9.5
* [FEAT] Order 2 fixed with filtered edges
## Version 0.0.4.9.4
* [FEAT] Order 1 similarity validated and optimized
## Version 0.0.4.9.3
* [FIX] Node Calc import + more flexible delimiter for CSV parser
## Version 0.0.4.9.2
* [FEAT] Node Calc Parsing added (in tests)
## Version 0.0.4.9.1
* [FIX] Graph Screenshot
## Version 0.0.4.9
* [FEAT] Graph with order 1 and order 2 and node size
## Version 0.0.4.8.9
* BACKEND: fix psql function util without sensitive data
* FRONTEND: fix folder navigation (up link)
## Version 0.0.4.8.8
* FIX for CI
## Version 0.0.4.8.7
* FIX the graph generation (automatic/default, renewal, any distance)
## Version 0.0.4.8.6
* FIX the ngrams grouping
## Version 0.0.4.8.5
* Unary document insertion: Doc table is reloaded after upload
## Version 0.0.4.8.4
* Migration: instance dev is now dev.sub.gargantext.org
## Version 0.0.7.1.1
## Version 0.0.4.1
* Refact/code design better syntax for DataType fields
* [FRONT][FEAT][[Tree search] Add possibility to share a node URL (without the username), that will redirect to the right instance and node (#548)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/548)
## Version 0.0.4
* Fix the search in Title and abstracts.
* [UPGRADE] execute devops/postgres/upgrade/0.0.4.sql to your database to upgrade it
## Version 0.0.7.1
## Version 0.0.3.9.1
* Graph Update fix
* Document view: full text removed
* [FRONT][FIX][Fix breadcrumbs (#648)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/648)
## Version 0.0.0.2
* Fix the community detection.
* TextFlow starts to make sense
## Version 0.0.7
## Version 0.0.0.1
* Very first version (main functions ready for tests) of Haskell Version
of Gargantext. Previous versions (3) were written with another
language and another framework (Python/Javascript mainly).
- [BACK/FRONT][RELEASE] OO7 Version
#!/bin/bash
for f in bin/metrics/histo/*sql ; do
./bin/psql gargantext.ini < $f
done
#!/bin/bash
mkdir -p ~/.config/nix/
echo "experimental-features = nix-command flakes" > ~/.config/nix/nix.conf
......@@ -5,7 +5,7 @@ cabal-version: 3.4
-- see: https://github.com/sol/hpack
name: gargantext
version: 0.0.7.1.1
version: 0.0.7.1.5.3
synopsis: Search, map, share
description: Please see README.md
category: Data
......@@ -134,9 +134,29 @@ library
Gargantext.API.Node.File
Gargantext.API.Node.Share
Gargantext.API.Node.ShareURL
Gargantext.API.Node.Types
Gargantext.API.Node.Update
Gargantext.API.Prelude
Gargantext.API.Routes
Gargantext.API.Routes.Named
Gargantext.API.Routes.Named.Contact
Gargantext.API.Routes.Named.Context
Gargantext.API.Routes.Named.Corpus
Gargantext.API.Routes.Named.Count
Gargantext.API.Routes.Named.Document
Gargantext.API.Routes.Named.File
Gargantext.API.Routes.Named.FrameCalc
Gargantext.API.Routes.Named.List
Gargantext.API.Routes.Named.Metrics
Gargantext.API.Routes.Named.Node
Gargantext.API.Routes.Named.Private
Gargantext.API.Routes.Named.Public
Gargantext.API.Routes.Named.Search
Gargantext.API.Routes.Named.Share
Gargantext.API.Routes.Named.Table
Gargantext.API.Routes.Named.Tree
Gargantext.API.Routes.Named.Viz
Gargantext.API.Routes.Types
Gargantext.Core
Gargantext.Core.Mail.Types
Gargantext.Core.Methods.Similarities
......@@ -276,12 +296,13 @@ library
Gargantext.API.Node.Corpus.Searx
Gargantext.API.Node.Document.Export
Gargantext.API.Node.Document.Export.Types
Gargantext.API.Node.Phylo.Export
Gargantext.API.Node.Phylo.Export.Types
Gargantext.API.Node.DocumentUpload
Gargantext.API.Node.DocumentsFromWriteNodes
Gargantext.API.Node.FrameCalcUpload
Gargantext.API.Node.Get
Gargantext.API.Node.New
Gargantext.API.Node.Types
Gargantext.API.Public
Gargantext.API.Search
Gargantext.API.Server
......
......@@ -16,8 +16,22 @@ Count API part of Gargantext.
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DeriveAnyClass #-}
module Gargantext.API.Count
where
module Gargantext.API.Count (
CountAPI
, Scraper(..)
, QueryBool(..)
, Query(..)
, Message(..)
, Code
, Error
, Errors
, Counts(..)
, Count(..)
-- * functions
, count
, scrapers
) where
import Data.Swagger ( ToSchema(..), genericDeclareNamedSchema )
import Data.Text (pack)
......
{-# LANGUAGE TypeOperators #-}
{-|
Module : Gargantext.API.Node.Corpus.Export
Description : Corpus export
......@@ -41,7 +42,14 @@ import Gargantext.Database.Query.Table.NodeContext (selectDocNodes)
import Gargantext.Database.Schema.Context (_context_id)
import Gargantext.Prelude hiding (hash)
import Gargantext.Prelude.Crypto.Hash (hash)
import Servant (Headers, Header, addHeader)
import Servant (Headers, Header, addHeader, Summary, (:>), JSON, Get, QueryParam)
--------------------------------------------------
type API = Summary "Corpus Export"
:> "export"
:> QueryParam "listId" ListId
:> QueryParam "ngramsType" NgramsType
:> Get '[JSON] (Headers '[Servant.Header "Content-Disposition" Text] Corpus)
--------------------------------------------------
-- | Hashes are ordered by Set
......
......@@ -18,8 +18,7 @@ import Data.Swagger ( ToSchema(..), genericDeclareNamedSchema, ToParamSchema(..)
import Data.Text (Text)
import GHC.Generics (Generic)
import Gargantext.API.Node.Document.Export.Types qualified as DocumentExport
import Gargantext.Core.Text.Ngrams (NgramsType(..))
import Gargantext.Core.Types ( ListId, TODO )
import Gargantext.Core.Types ( TODO )
import Gargantext.Core.Utils.Prefix (unPrefix, unPrefixSwagger)
import Servant
......@@ -37,11 +36,4 @@ instance ToSchema Corpus where
-------
instance ToParamSchema Corpus where
toParamSchema _ = toParamSchema (Proxy :: Proxy TODO)
--------------------------------------------------
type API = Summary "Corpus Export"
:> "export"
:> QueryParam "listId" ListId
:> QueryParam "ngramsType" NgramsType
:> Get '[JSON] (Headers '[Servant.Header "Content-Disposition" Text] Corpus)
$(deriveJSON (unPrefix "_c_") ''Corpus)
......@@ -22,10 +22,9 @@ module Gargantext.API.Node.Corpus.New
import Conduit
import Control.Lens ( view, non )
import Data.Aeson ( genericParseJSON, genericToJSON )
import Data.ByteString.Base64 qualified as BSB64
import Data.Conduit.Internal (zipSources)
import Data.Swagger ( ToSchema(..), genericDeclareNamedSchema )
import Data.Swagger ( ToSchema(..) )
import Data.Text qualified as T
import Data.Text.Encoding qualified as TE
import EPO.API.Client.Types qualified as EPO
......@@ -34,17 +33,16 @@ import Gargantext.API.Admin.Types (HasSettings)
import Gargantext.API.Ngrams (commitStatePatch, Versioned(..))
import Gargantext.API.Node.Corpus.New.Types ( FileFormat(..), FileType(..) )
import Gargantext.API.Node.Corpus.Searx ( triggerSearxSearch )
import Gargantext.API.Node.Corpus.Types ( Database, Datafield(Web), database2origin )
import Gargantext.API.Node.Corpus.Types ( Datafield(Web), database2origin )
import Gargantext.API.Node.Corpus.Update (addLanguageToCorpus)
import Gargantext.API.Node.Types
import Gargantext.Core (Lang(..), withDefaultLanguage, defaultLanguage)
import Gargantext.Core (withDefaultLanguage, defaultLanguage)
import Gargantext.Core.NodeStory (HasNodeStoryImmediateSaver, HasNodeArchiveStoryImmediateSaver, currentVersion, NgramsStatePatch')
import Gargantext.API.Admin.Orchestrator.Types qualified as API
import Gargantext.Core.Text.Corpus.Query qualified as API
import Gargantext.Core.Text.Corpus.Parsers qualified as Parser (FileType(..), parseFormatC, _ParseFormatError)
import Gargantext.Core.Text.List.Social (FlowSocialListWith(..))
import Gargantext.Core.Types.Individu (User(..))
import Gargantext.Core.Utils.Prefix (unPrefix, unPrefixSwagger)
import Gargantext.Core.Utils.Prefix (unPrefix)
import Gargantext.Database.Action.Flow (flowCorpus, getDataText, flowDataText, TermType(..){-, allDataOrigins-})
import Gargantext.Database.Action.Flow.Types (FlowCmdM)
import Gargantext.Database.Action.Mail (sendMail)
......@@ -64,7 +62,6 @@ import Gargantext.Prelude.Config (gc_max_docs_parsers)
import Gargantext.System.Logging ( logLocM, LogLevel(..) )
import Gargantext.Utils.Jobs.Monad (JobHandle, MonadJobStatus(..))
import Servant ( JSON, type (:>), FormUrlEncoded, Capture, Summary )
import Servant.Job.Utils (jsonOptions)
import Test.QuickCheck.Arbitrary (Arbitrary(..))
------------------------------------------------------------------------
......@@ -136,41 +133,6 @@ info :: ApiInfo
info = ApiInfo API.externalAPIs
------------------------------------------------------------------------
------------------------------------------------------------------------
data WithQuery = WithQuery
{ _wq_query :: !API.RawQuery
, _wq_databases :: !Database
, _wq_datafield :: !(Maybe Datafield)
, _wq_lang :: !Lang
, _wq_node_id :: !Int
, _wq_flowListWith :: !FlowSocialListWith
, _wq_pubmedAPIKey :: !(Maybe Text)
, _wq_epoAPIUser :: !(Maybe Text)
, _wq_epoAPIToken :: !(Maybe Text)
}
deriving (Show, Eq, Generic)
makeLenses ''WithQuery
instance FromJSON WithQuery where
parseJSON = genericParseJSON $ jsonOptions "_wq_"
instance ToJSON WithQuery where
toJSON = genericToJSON $ jsonOptions "_wq_"
instance ToSchema WithQuery where
declareNamedSchema = genericDeclareNamedSchema (unPrefixSwagger "_wq_")
instance Arbitrary WithQuery where
arbitrary = WithQuery <$> arbitrary
<*> arbitrary
<*> arbitrary
<*> arbitrary
<*> arbitrary
<*> arbitrary
<*> arbitrary
<*> arbitrary
<*> arbitrary
------------------------------------------------------------------------
type AddWithQuery = Summary "Add with Query to corpus endpoint"
:> "corpus"
:> Capture "corpus_id" CorpusId
......
{-|
Module : Gargantext.API.Node.Phylo.Export
Description : Phylo export
Copyright : (c) CNRS, 2017-Present
License : AGPL + CECILL v3
Maintainer : team@gargantext.org
Stability : experimental
Portability : POSIX
-}
module Gargantext.API.Node.Phylo.Export
where
import Data.Aeson
import Data.Text qualified as T
import Gargantext.API.Node.Phylo.Export.Types
import Gargantext.API.Prelude (GargNoServer, GargServer)
import Gargantext.Core.Viz.Phylo.API.Tools
import Gargantext.Core.Viz.Phylo.Example (phyloCleopatre)
import Gargantext.Database.Admin.Types.Node (PhyloId, NodeId,)
import Gargantext.Prelude
import Servant
api :: NodeId
-- ^ The ID of the target user
-> PhyloId
-> GargServer API
api userNodeId dId = getPhyloJson userNodeId dId
:<|> getPhyloDot userNodeId dId
getPhyloJson :: NodeId
-- ^ The ID of the target user
-> PhyloId
-> GargNoServer (Headers '[Header "Content-Disposition" T.Text] Value)
getPhyloJson _ pId = do
maybePhyloData <- getPhyloData pId
let phyloData = fromMaybe phyloCleopatre maybePhyloData
phyloJson <- liftBase $ phylo2dot2json phyloData
pure $ addHeader (T.concat [ "attachment; filename="
, "GarganText_Phylo-"
, T.pack (show pId)
, ".json" ])
phyloJson
getPhyloDot :: NodeId
-> PhyloId
-> GargNoServer (Headers '[Header "Content-Disposition" T.Text] T.Text)
getPhyloDot _ pId = do
maybePhyloData <- getPhyloData pId
let phyloData = fromMaybe phyloCleopatre maybePhyloData
phyloDot <- liftBase $ phylo2dot phyloData
pure $ addHeader (T.concat [ "attachment; filename="
, "GarganText_Phylo-"
, T.pack (show pId)
, ".dot" ])
phyloDot
\ No newline at end of file
{-|
Module : Gargantext.API.Node.Phylo.Export.Types
Description : Types for Gargantext.API.Node.Phylo.Export
Copyright : (c) CNRS, 2017-Present
License : AGPL + CECILL v3
Maintainer : team@gargantext.org
Stability : experimental
Portability : POSIX
-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeOperators #-}
module Gargantext.API.Node.Phylo.Export.Types where
import Data.Aeson
import Data.Aeson.TH (deriveJSON)
-- import Data.Csv (DefaultOrdered(..), ToNamedRecord(..), (.=), header, namedRecord)
import Data.Swagger ( genericDeclareNamedSchema, ToParamSchema(..), ToSchema(..) )
-- import Data.Text qualified as T
-- import Data.Text.Encoding qualified as TE
import Gargantext.Core.Types ( Node, TODO )
import Gargantext.Core.Utils.Prefix (unPrefix, unPrefixSwagger)
import Gargantext.Database.Admin.Types.Hyperdata.Phylo ( HyperdataPhylo(..) )
import Gargantext.Database.Admin.Types.Node (PhyloId)
-- import Gargantext.Database.Schema.Node (NodePoly(..))
-- import Gargantext.Utils.Servant (ZIP)
-- import Gargantext.Utils.Zip (zipContentsPure)
import Protolude
import Servant ((:>), (:<|>), Get, Header, Headers(..), JSON, Summary) --, PlainText, MimeRender(..)
-- | Phylo Export
data PhyloExport =
PhyloExport { _pe_phylos :: [Phylo]
, _pe_garg_version :: Text
} deriving (Generic)
data PhyloExportDOT =
PhyloExportDOT { _ped_dexp :: PhyloExport
, _ped_doc_id :: PhyloId
} deriving (Generic)
data PhyloExportJSON =
PhyloExportJSON { _pej_pexp :: PhyloExport
, _pej_phy_id :: PhyloId
} deriving (Generic)
data Phylo =
Phylo { _p_phylo :: Node HyperdataPhylo
, _p_hash :: Hash
} deriving (Generic)
--instance Read Phylo where
-- read "" = panic "not implemented"
-- instance DefaultOrdered Phylo where
-- headerOrder _ = header ["Publication Day"
-- , "Publication Month"
-- , "Publication Year"
-- , "Authors"
-- , "Title"
-- , "Source"
-- , "Abstract"]
-- instance ToNamedRecord Phylo where
-- toNamedRecord (Phylo { _p_phylo = Node { .. }}) =
-- namedRecord
-- [ "Publication Day" .= _hd_publication_day _node_hyperdata
-- , "Publication Month" .= _hd_publication_month _node_hyperdata
-- , "Publication Year" .= _hd_publication_year _node_hyperdata
-- , "Authors" .= _hd_authors _node_hyperdata
-- , "Title" .= _hd_title _node_hyperdata
-- , "Source" .= (TE.encodeUtf8 <$> _hd_source _node_hyperdata)
-- , "Abstract" .= (TE.encodeUtf8 <$> _hd_abstract _node_hyperdata) ]
type Hash = Text
-------
instance ToSchema PhyloExport where
declareNamedSchema = genericDeclareNamedSchema (unPrefixSwagger "_pe_")
instance ToSchema PhyloExportDOT where
declareNamedSchema = genericDeclareNamedSchema (unPrefixSwagger "_ped_")
instance ToSchema Phylo where
declareNamedSchema = genericDeclareNamedSchema (unPrefixSwagger "_p_")
-------
instance ToParamSchema PhyloExport where
toParamSchema _ = toParamSchema (Proxy :: Proxy TODO)
instance ToParamSchema PhyloExportDOT where
toParamSchema _ = toParamSchema (Proxy :: Proxy TODO)
instance ToParamSchema Phylo where
toParamSchema _ = toParamSchema (Proxy :: Proxy TODO)
--------------------------------------------------
type API = Summary "Phylo Export"
:> "export"
:> ( "json"
:> Get '[JSON] (Headers '[Servant.Header "Content-Disposition" Text] Value)
:<|> "dot"
:> Get '[JSON] (Headers '[Servant.Header "Content-Disposition" Text] Text)
)
-- type API = Summary "Phylo Export"
-- :> "export"
-- :> Get '[JSON,DOT] (Headers '[Servant.Header "Content-Disposition" Text] Value)
$(deriveJSON (unPrefix "_p_") ''Phylo)
$(deriveJSON (unPrefix "_pe_") ''PhyloExport)
------
-- Needs to be here because of deriveJSON TH above
-- pedFileName :: PhyloExportDOT -> Text
-- pedFileName (PhyloExportDOT { .. }) = "GarganText_DocsList-" <> show _ped_doc_id <> ".dot"
-- instance MimeRender ZIP PhyloExportDOT where
-- mimeRender _ dexpz@(PhyloExportDOT { .. }) =
-- zipContentsPure (T.unpack $ pedFileName dexpz) (encode _ped_dexp)
......@@ -19,12 +19,15 @@ import Data.ByteString.Base64 qualified as BSB64
import Data.Swagger
import Data.Text qualified as T
import Gargantext.API.Node.Corpus.New.Types (FileType, FileFormat)
import Gargantext.API.Node.Corpus.Types
import Gargantext.Core (Lang(..))
import Gargantext.Core.Text.Corpus.Query qualified as API
import Gargantext.Core.Text.List.Social (FlowSocialListWith)
import Gargantext.Core.Utils.Prefix (unPrefixSwagger)
import Gargantext.Database.GargDB qualified as GargDB
import Gargantext.Prelude
import Servant.Job.Utils (jsonOptions)
import Test.QuickCheck
import Web.FormUrlEncoded (FromForm, ToForm)
-------------------------------------------------------
......@@ -77,3 +80,36 @@ instance GargDB.SaveFile NewWithFile where
--instance GargDB.ReadFile NewWithFile where
-- readFile' = TIO.readFile
data WithQuery = WithQuery
{ _wq_query :: !API.RawQuery
, _wq_databases :: !Database
, _wq_datafield :: !(Maybe Datafield)
, _wq_lang :: !Lang
, _wq_node_id :: !Int
, _wq_flowListWith :: !FlowSocialListWith
, _wq_pubmedAPIKey :: !(Maybe Text)
, _wq_epoAPIUser :: !(Maybe Text)
, _wq_epoAPIToken :: !(Maybe Text)
}
deriving (Show, Eq, Generic)
makeLenses ''WithQuery
instance FromJSON WithQuery where
parseJSON = genericParseJSON $ jsonOptions "_wq_"
instance ToJSON WithQuery where
toJSON = genericToJSON $ jsonOptions "_wq_"
instance ToSchema WithQuery where
declareNamedSchema = genericDeclareNamedSchema (unPrefixSwagger "_wq_")
instance Arbitrary WithQuery where
arbitrary = WithQuery <$> arbitrary
<*> arbitrary
<*> arbitrary
<*> arbitrary
<*> arbitrary
<*> arbitrary
<*> arbitrary
<*> arbitrary
<*> arbitrary
......@@ -16,6 +16,7 @@ Portability : POSIX
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-} -- instance HasSwagger (WithCustomErrorScheme GargAPI)
module Gargantext.API.Routes
where
......@@ -29,7 +30,6 @@ import Gargantext.API.Admin.FrontEnd (FrontEndAPI)
import Gargantext.API.Auth.PolicyCheck
import Gargantext.API.Context
import Gargantext.API.Count (CountAPI, count, Query)
import Gargantext.API.Errors (GargErrorScheme (..))
import Gargantext.API.Errors.Types
import Gargantext.API.GraphQL qualified as GraphQL
import Gargantext.API.Members (MembersAPI, members)
......@@ -39,13 +39,15 @@ import Gargantext.API.Node
import Gargantext.API.Node.Contact qualified as Contact
import Gargantext.API.Node.Corpus.Annuaire qualified as Annuaire
import Gargantext.API.Node.Corpus.Export qualified as CorpusExport
import Gargantext.API.Node.Corpus.Export.Types qualified as CorpusExport
import Gargantext.API.Node.Corpus.New qualified as New
import Gargantext.API.Node.Document.Export qualified as DocumentExport
import Gargantext.API.Node.Document.Export.Types qualified as DocumentExport
import Gargantext.API.Node.Phylo.Export qualified as PhyloExport
import Gargantext.API.Node.Phylo.Export.Types qualified as PhyloExport
import Gargantext.API.Node.ShareURL qualified as ShareURL
import Gargantext.API.Prelude
import Gargantext.API.Public qualified as Public
import Gargantext.API.Routes.Types
import Gargantext.Core.Types.Individu (User(..))
import Gargantext.Core.Viz.Graph.API
import Gargantext.Database.Admin.Types.Hyperdata
......@@ -54,41 +56,17 @@ import Gargantext.Database.Prelude (HasConfig(..))
import Gargantext.Prelude
import Gargantext.Prelude.Config (gc_max_docs_scrapers)
import Gargantext.Utils.Jobs (serveJobsAPI, MonadJobStatus(..))
import Network.Wai (requestHeaders)
import Servant
import Servant.Auth as SA
import Servant.Auth.Swagger ()
import Servant.Ekg
import Servant.Server.Internal.Delayed
import Servant.Server.Internal.DelayedIO
import Servant.Swagger
import Servant.Swagger.UI
import qualified Data.List as L
data WithCustomErrorScheme a
instance (HasServer subApi ctx) => HasServer (WithCustomErrorScheme subApi) ctx where
type ServerT (WithCustomErrorScheme subApi) m = GargErrorScheme -> ServerT subApi m
hoistServerWithContext _ pc nt s = hoistServerWithContext (Proxy :: Proxy subApi) pc nt . s
route Proxy ctx d = route (Proxy :: Proxy subApi) ctx (d `addHeaderCheck` getErrorScheme)
where
getErrorScheme :: DelayedIO GargErrorScheme
getErrorScheme = withRequest $ \rq -> do
let hdrs = requestHeaders rq
in case L.lookup "X-Garg-Error-Scheme" hdrs of
Nothing -> pure GES_old
Just "new" -> pure GES_new
Just _ -> pure GES_old
type GargAPI = MkGargAPI (GargAPIVersion GargAPI')
instance HasSwagger (WithCustomErrorScheme GargAPI) where
toSwagger _ = toSwagger (Proxy :: Proxy GargAPI)
instance HasEndpoint sub => HasEndpoint (WithCustomErrorScheme sub) where
getEndpoint _ = getEndpoint (Proxy :: Proxy sub)
enumerateEndpoints _ = enumerateEndpoints (Proxy :: Proxy sub)
type GargAPI = MkGargAPI (GargAPIVersion GargAPI')
type MkGargAPI sub = "api" :> Summary "API " :> sub
--- | TODO :<|> Summary "Latest API" :> GargAPI'
......@@ -181,6 +159,9 @@ type GargPrivateAPI' =
:<|> "texts" :> Capture "node_id" DocId
:> DocumentExport.API
:<|> "phylo" :> Capture "node_id" DocId
:> PhyloExport.API
-- :<|> "counts" :> Stream GET NewLineFraming '[JSON] Count :> CountAPI
-- TODO-SECURITY
:<|> "count" :> Summary "Count endpoint"
......@@ -196,6 +177,10 @@ type GargPrivateAPI' =
:> Capture "graph_id" NodeId
:> GraphAPI
-- :<|> "phylo" :> Summary "Phylo endpoint"
-- :> Capture "pylo_id" NodeId
-- :>
-- TODO move to NodeAPI?
-- Tree endpoint
:<|> "tree" :> Summary "Tree endpoint"
......@@ -282,6 +267,8 @@ serverPrivateGargAPI' authenticatedUser@(AuthenticatedUser userNodeId userId)
:<|> DocumentExport.api userNodeId
:<|> PhyloExport.api userNodeId
:<|> count -- TODO: undefined
-- :<|> withAccess (Proxy :: Proxy (Search.API Search.SearchResult)) Proxy uid
......
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DeriveGeneric #-}
module Gargantext.API.Routes.Named where
import Data.Text (Text)
import GHC.Generics
import Gargantext.API.Admin.Auth (ForgotPasswordAsyncParams)
import Gargantext.API.Admin.Auth.Types
import Gargantext.API.Admin.Orchestrator.Types
import Gargantext.API.Routes.Named.Public
import Gargantext.API.Routes.Named.Private
import Servant.API ((:>), (:-), JSON, ReqBody, Post, Get, QueryParam)
import Servant.API.Description (Summary)
import Servant.API.NamedRoutes
type GargAPI = NamedRoutes (MkGargAPI (GargAPIVersion GargAPI'))
data MkGargAPI sub mode = MkGargAPI
{ mkGargAPI :: mode :- "api" :> Summary "API " :> NamedRoutes sub
} deriving Generic
data GargAPIVersion sub mode = GargAPIVersion
{ gargAPIVersion :: mode :- "v1.0" :> Summary "Garg API Version " :> NamedRoutes sub
} deriving Generic
data GargAPI' mode = GargAPI'
{ gargAuthAPI :: mode :- NamedRoutes AuthAPI
, gargForgotPasswordAPI :: mode :- "forgot-password" :> NamedRoutes ForgotPasswordAPI
, gargForgotPasswordAsyncAPI :: mode :- "async" :> "forgot-password" :> NamedRoutes ForgotPasswordAsyncAPI
, gargVersionAPI :: mode :- NamedRoutes GargVersion
, gargPrivateAPI :: mode :- NamedRoutes GargPrivateAPI
, gargPublicAPI :: mode :- "public" :> NamedRoutes GargPublicAPI
} deriving Generic
data AuthAPI mode = AuthAPI
{ authEp :: mode :- "auth" :> Summary "AUTH API"
:> ReqBody '[JSON] AuthRequest
:> Post '[JSON] AuthResponse
} deriving Generic
data ForgotPasswordAPI mode = ForgotPasswordAPI
{ forgotPasswordPostEp :: mode :- Summary "Forgot password POST API"
:> ReqBody '[JSON] ForgotPasswordRequest
:> Post '[JSON] ForgotPasswordResponse
, forgotPasswordGetEp :: mode :- Summary "Forgot password GET API"
:> QueryParam "uuid" Text
:> Get '[JSON] ForgotPasswordGet
} deriving Generic
data ForgotPasswordAsyncAPI mode = ForgotPasswordAsyncAPI
{ forgotPasswordAsyncEp :: mode :- Summary "Forgot password asnc"
:> AsyncJobs JobLog '[JSON] ForgotPasswordAsyncParams JobLog
} deriving Generic
data GargVersion mode = GargVersion
{ gargVersionEp :: "version" :> Summary "Backend version" :> Get '[JSON] Text
} deriving Generic
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DeriveGeneric #-}
module Gargantext.API.Routes.Named.Contact (
-- * Routes types
ContactAPI(..)
, ContactAsyncAPI(..)
-- * API types (appears in the routes)
, AddContactParams(..)
) where
import Data.Text (Text)
import GHC.Generics
import Gargantext.API.Admin.Orchestrator.Types
import Gargantext.API.Routes.Named.Node (NodeNodeAPI(..))
import Gargantext.Database.Admin.Types.Hyperdata.Contact
import Gargantext.Database.Admin.Types.Node
import Servant
data ContactAPI mode = ContactAPI
{ contactAsyncAPI :: mode :- "contact" :> Summary "Contact endpoint" :> NamedRoutes ContactAsyncAPI
, getContactEp :: mode :- Capture "contact_id" NodeId :> NamedRoutes (NodeNodeAPI HyperdataContact)
} deriving Generic
newtype ContactAsyncAPI mode = ContactAsyncAPI
{ addContactAsyncEp :: mode :- AsyncJobs JobLog '[JSON] AddContactParams JobLog
} deriving Generic
data AddContactParams = AddContactParams { firstname :: !Text, lastname :: !Text }
| AddContactParamsAdvanced { firstname :: !Text
, lastname :: !Text
-- TODO add others fields
}
deriving Generic
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DeriveGeneric #-}
module Gargantext.API.Routes.Named.Context where
import GHC.Generics
import Gargantext.Database.Admin.Types.Node
import Servant
data ContextAPI mode a = ContextAPI
{ getNodeEp :: mode :- Get '[JSON] (Node a)
} deriving Generic
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DeriveGeneric #-}
module Gargantext.API.Routes.Named.Corpus (
-- * Routes types
CorpusExportAPI(..)
, AddWithForm(..)
, AddWithQuery(..)
) where
import Data.Text (Text)
import GHC.Generics
import Gargantext.API.Admin.Orchestrator.Types
import Gargantext.API.Node.Corpus.Annuaire hiding (AddWithForm)
import Gargantext.API.Node.Corpus.Export.Types
import Gargantext.API.Node.Types
import Gargantext.Core.Text.Ngrams (NgramsType(..))
import Gargantext.Database.Admin.Types.Node
import Servant
--------------------------------------------------
newtype CorpusExportAPI mode = CorpusExportAPI
{ corpusExportEp :: mode :- Summary "Corpus Export"
:> "export"
:> QueryParam "listId" ListId
:> QueryParam "ngramsType" NgramsType
:> Get '[JSON] (Headers '[Servant.Header "Content-Disposition" Text] Corpus)
} deriving Generic
newtype AddWithForm mode = AddWithForm
{ addWithFormEp :: mode :- Summary "Add with FormUrlEncoded to annuaire endpoint"
:> "annuaire"
:> Capture "annuaire_id" AnnuaireId
:> "add"
:> "form"
:> "async"
:> AsyncJobs JobLog '[FormUrlEncoded] AnnuaireWithForm JobLog
} deriving Generic
newtype AddWithQuery mode = AddWithQuery
{ addWithQueryEp :: mode :- Summary "Add with Query to corpus endpoint"
:> "corpus"
:> Capture "corpus_id" CorpusId
:> "query"
:> AsyncJobs JobLog '[JSON] WithQuery JobLog
} deriving Generic
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DeriveGeneric #-}
module Gargantext.API.Routes.Named.Count (
-- * Routes types
CountAPI(..)
-- * Re-exports
, module X
) where
import GHC.Generics
import Servant
import Gargantext.API.Count as X hiding (CountAPI)
newtype CountAPI mode = CountAPI
{ postCountsEp :: mode :- Post '[JSON] X.Counts
} deriving Generic
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeOperators #-}
module Gargantext.API.Routes.Named.Document (
-- * Routes types
DocumentsFromWriteNodesAPI(..)
, DocumentUploadAPI(..)
, DocumentExportAPI(..)
-- * API types
, Params(..)
, DocumentUpload(..)
-- * functions and lenses
, du_title
, du_sources
, du_language
, du_date
, du_authors
, du_abstract
) where
import Control.Lens
import Data.Aeson
import Data.Swagger hiding (fieldLabelModifier)
import Data.Text (Text)
import GHC.Generics
import Gargantext.API.Admin.Orchestrator.Types
import Gargantext.API.Node.Document.Export.Types
import Gargantext.Core
import Gargantext.Core.Text.List.Social
import Gargantext.Core.Utils.Prefix
import Gargantext.Utils.Servant (ZIP)
import Prelude
import Servant
newtype DocumentExportAPI mode = DocumentExportAPI
{ documentExportAPI ::
mode :- Summary "Document Export"
:> "export"
:> ( "json"
:> Get '[JSON] (Headers '[Servant.Header "Content-Disposition" Text] DocumentExport)
:<|> "json.zip"
:> Get '[ZIP] (Headers '[Servant.Header "Content-Disposition" Text] DocumentExportZIP)
:<|> "csv"
:> Get '[PlainText] (Headers '[Servant.Header "Content-Disposition" Text] Text) )
} deriving Generic
newtype DocumentsFromWriteNodesAPI mode = DocumentsFromWriteNodesAPI
{ docFromWriteNodesEp :: mode :- Summary " Documents from Write nodes."
:> AsyncJobs JobLog '[JSON] Params JobLog
} deriving Generic
newtype DocumentUploadAPI mode = DocumentUploadAPI
{ uploadDocAsyncEp :: mode :- Summary " Document upload"
:> "document"
:> "upload"
:> "async"
:> AsyncJobs JobLog '[JSON] DocumentUpload JobLog
} deriving Generic
data Params = Params
{ id :: Int
, paragraphs :: Text
, lang :: Lang
, selection :: FlowSocialListWith
}
deriving (Generic, Show)
data DocumentUpload = DocumentUpload
{ _du_abstract :: Text
, _du_authors :: Text
, _du_sources :: Text
, _du_title :: Text
, _du_date :: Text
, _du_language :: Text
}
deriving Generic
--
-- instances
--
instance FromJSON Params where
parseJSON = genericParseJSON defaultOptions
instance ToJSON Params where
toJSON = genericToJSON defaultOptions
instance ToSchema Params
$(makeLenses ''DocumentUpload)
instance ToSchema DocumentUpload
instance FromJSON DocumentUpload
where
parseJSON = genericParseJSON
( defaultOptions { sumEncoding = ObjectWithSingleField
, fieldLabelModifier = unCapitalize . dropPrefix "_du_"
, omitNothingFields = True
}
)
instance ToJSON DocumentUpload
where
toJSON = genericToJSON
( defaultOptions { sumEncoding = ObjectWithSingleField
, fieldLabelModifier = unCapitalize . dropPrefix "_du_"
, omitNothingFields = True
}
)
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
module Gargantext.API.Routes.Named.File (
-- * Routes types
FileAPI(..)
, FileAsyncAPI(..)
) where
import Data.Text (Text)
import GHC.Generics
import Gargantext.API.Admin.Orchestrator.Types
import Gargantext.API.Node.File
import Gargantext.API.Node.Types
import Servant
data FileAPI mode = FileAPI
{ fileDownloadEp :: mode :- Summary "File download"
:> "download"
:> Get '[RESPONSE] (Headers '[Servant.Header "Content-Type" Text] BSResponse)
} deriving Generic
data FileAsyncAPI mode = FileAsyncAPI
{ addFileAsyncEp :: mode :- Summary "File Async Api"
:> "file"
:> "add"
:> AsyncJobs JobLog '[FormUrlEncoded] NewWithFile JobLog
} deriving Generic
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DeriveGeneric #-}
module Gargantext.API.Routes.Named.FrameCalc where
import Servant
import GHC.Generics
import Gargantext.API.Node.FrameCalcUpload (FrameCalcUpload)
import Gargantext.API.Admin.Orchestrator.Types
data FrameCalcAPI mode = FrameCalcAPI
{ frameCalcUploadEp :: mode :- Summary " FrameCalc upload"
:> "add"
:> "framecalc"
:> "async"
:> AsyncJobs JobLog '[JSON] FrameCalcUpload JobLog
} deriving Generic
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DeriveGeneric #-}
module Gargantext.API.Routes.Named.List where
import Data.Text (Text)
import GHC.Generics
import Gargantext.API.Admin.Orchestrator.Types
import Gargantext.API.Ngrams.List.Types
import Gargantext.API.Ngrams.Types
import Gargantext.API.Types (HTML)
import Gargantext.Database.Admin.Types.Node
import Gargantext.Utils.Servant qualified as GUS
import Servant
newtype GETAPI mode = GETAPI
{ getListEp :: mode :- Summary "Get List"
:> "lists"
:> Capture "listId" ListId
:> ( "json"
:> Get '[JSON, HTML] (Headers '[Header "Content-Disposition" Text] NgramsList)
:<|> "json.zip"
:> Get '[GUS.ZIP] (Headers '[Header "Content-Disposition" Text] NgramsListZIP)
:<|> "csv"
:> Get '[GUS.CSV] (Headers '[Header "Content-Disposition" Text] NgramsTableMap) )
} deriving Generic
newtype JSONAPI mode = JSONAPI
{ updateListJSONEp :: mode :- Summary "Update List"
:> "lists"
:> Capture "listId" ListId
:> "add"
:> "form"
:> "async"
:> AsyncJobs JobLog '[FormUrlEncoded] WithJsonFile JobLog
} deriving Generic
newtype CSVAPI mode = CSVAPI
{ updateListCSVEp :: mode :- Summary "Update List (legacy v3 CSV)"
:> "lists"
:> Capture "listId" ListId
:> "csv"
:> "add"
:> "form"
:> "async"
:> AsyncJobs JobLog '[FormUrlEncoded] WithTextFile JobLog
} deriving Generic
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DeriveGeneric #-}
module Gargantext.API.Routes.Named.Metrics (
-- * Routes types
TreeAPI(..)
, ScatterAPI(..)
, ChartAPI(..)
, PieAPI(..)
) where
import Data.Text (Text)
import Data.Time
import Data.Vector
import GHC.Generics
import Gargantext.API.HashedResponse
import Gargantext.API.Ngrams.NgramsTree
import Gargantext.API.Ngrams.Types
import Gargantext.Core.Types.Main
import Gargantext.Core.Types.Query (Limit)
import Gargantext.Core.Viz.Types
import Gargantext.Database.Admin.Types.Metrics
import Gargantext.Database.Admin.Types.Node
import Servant
data TreeAPI mode = TreeAPI
{ treeChartEp :: mode :- Summary " Tree API"
:> QueryParam "from" UTCTime
:> QueryParam "to" UTCTime
:> QueryParam "list" ListId
:> QueryParamR "ngramsType" TabType
:> QueryParamR "listType" ListType
:> Get '[JSON] (HashedResponse (ChartMetrics (Vector NgramsTree)))
, treeChartUpdateEp :: mode :- Summary "Tree Chart update"
:> QueryParam "list" ListId
:> QueryParamR "ngramsType" TabType
:> QueryParamR "listType" ListType
:> Post '[JSON] ()
, treeHashEp :: mode :- "hash"
:> Summary "Tree Hash"
:> QueryParam "list" ListId
:> QueryParamR "ngramsType" TabType
:> QueryParamR "listType" ListType
:> Get '[JSON] Text
} deriving Generic
data ScatterAPI mode = ScatterAPI
{ sepGenEp :: mode :- Summary "SepGen IncExc metrics"
:> QueryParam "list" ListId
:> QueryParamR "ngramsType" TabType
:> QueryParam "limit" Limit
:> Get '[JSON] (HashedResponse Metrics)
, scatterUpdateEp :: mode :- Summary "Scatter update"
:> QueryParam "list" ListId
:> QueryParamR "ngramsType" TabType
:> QueryParam "limit" Limit
:> Post '[JSON] ()
, scatterHashEp :: mode :- "hash"
:> Summary "Scatter Hash"
:> QueryParam "list" ListId
:> QueryParamR "ngramsType" TabType
:> Get '[JSON] Text
} deriving Generic
data PieAPI mode = PieAPI
{ getPieChartEp :: mode :- Summary "Pie Chart"
:> QueryParam "from" UTCTime
:> QueryParam "to" UTCTime
:> QueryParam "list" ListId
:> QueryParamR "ngramsType" TabType
:> Get '[JSON] (HashedResponse (ChartMetrics Histo))
, pieChartUpdateEp :: mode :- Summary "Pie Chart update"
:> QueryParam "list" ListId
:> QueryParamR "ngramsType" TabType
:> QueryParam "limit" Limit
:> Post '[JSON] ()
, pieHashEp :: mode :- "hash"
:> Summary "Pie Hash"
:> QueryParam "list" ListId
:> QueryParamR "ngramsType" TabType
:> Get '[JSON] Text
} deriving Generic
data ChartAPI mode = ChartAPI
{ getChartEp :: mode :- Summary " Chart API"
:> QueryParam "from" UTCTime
:> QueryParam "to" UTCTime
:> QueryParam "list" ListId
:> QueryParamR "ngramsType" TabType
:> Get '[JSON] (HashedResponse (ChartMetrics Histo))
, updateChartEp :: mode :- Summary "Chart update"
:> QueryParam "list" ListId
:> QueryParamR "ngramsType" TabType
:> QueryParam "limit" Limit
:> Post '[JSON] ()
, chartHashEp :: mode :- "hash"
:> Summary "Chart Hash"
:> QueryParam "list" ListId
:> QueryParamR "ngramsType" TabType
:> Get '[JSON] Text
} deriving Generic
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DeriveGeneric #-}
module Gargantext.API.Routes.Named.Node (
-- * Routes types
NodeAPI(..)
, RenameAPI(..)
, PostNodeAPI(..)
, ChildrenAPI(..)
, NodeNodeAPI(..)
, PostNodeAsync(..)
, CatAPI(..)
, UpdateAPI(..)
, MoveAPI(..)
, PairingAPI(..)
, PairWith(..)
, Pairs(..)
, Roots(..)
, NodesAPI(..)
-- * API types (might appear in the routes)
, Charts(..)
, Granularity(..)
, Method(..)
, NodesToCategory(..)
, PostNode(..)
, RenameNode(..)
, UpdateNodeParams(..)
) where
import Data.Aeson
import Data.Swagger
import Data.Text (Text)
import GHC.Generics
import Gargantext.API.Admin.Orchestrator.Types (JobLog(..), AsyncJobs)
import Gargantext.API.Auth.PolicyCheck ( PolicyChecked )
import Gargantext.API.Ngrams.Types (TabType(..))
import Gargantext.API.Routes.Named.Document
import Gargantext.API.Routes.Named.File
import Gargantext.API.Routes.Named.FrameCalc
import Gargantext.API.Routes.Named.Metrics
import Gargantext.API.Routes.Named.Viz
import Gargantext.API.Routes.Named.Search
import Gargantext.API.Routes.Named.Share as Share
import Gargantext.API.Routes.Named.Table
import Gargantext.API.Routes.Named.Tree
import Gargantext.Core.Methods.Similarities
import Gargantext.Core.Text.Ngrams
import Gargantext.Core.Types
import Gargantext.Core.Types.Query
import Gargantext.Core.Viz.Graph.Tools
import Gargantext.Core.Viz.Graph.Types hiding (Node)
import Gargantext.Core.Viz.Phylo (PhyloSubConfigAPI(..))
import Gargantext.Database.Admin.Types.Hyperdata.User ( HyperdataUser )
import Gargantext.Database.Query.Facet.Types ( FacetDoc, OrderBy(..) )
import Prelude
import Servant
import Test.QuickCheck
import Web.FormUrlEncoded (FromForm, ToForm)
-------------------------------------------------------------------
-- | Node API Types management
-- TODO-ACCESS : access by users
-- No ownership check is needed if we strictly follow the capability model.
--
-- CanGetNode (Node, Children, TableApi, TableNgramsApiGet, PairingApi, ChartApi,
-- SearchAPI)
-- CanRenameNode (or part of CanEditNode?)
-- CanCreateChildren (PostNodeApi)
-- CanEditNode / CanPutNode TODO not implemented yet
-- CanDeleteNode
-- CanPatch (TableNgramsApi)
-- CanFavorite
-- CanMoveToTrash
data NodeAPI mode a = NodeAPI
{ nodeNodeAPI :: mode :- PolicyChecked (NamedRoutes (NodeNodeAPI a))
, renameAPI :: mode :- "rename" :> NamedRoutes RenameAPI
, postNodeAPI :: mode :- NamedRoutes PostNodeAPI -- TODO move to children POST
, postNodeAsync :: mode :- NamedRoutes PostNodeAsync
, frameCalcUploadAPI :: mode :- NamedRoutes FrameCalcAPI
, putEp :: mode :- ReqBody '[JSON] a :> Put '[JSON] Int
, updateAPI :: mode :- "update" :> NamedRoutes UpdateAPI
, deleteEp :: mode :- Delete '[JSON] Int
, childrenAPI :: mode :- "children" :> NamedRoutes (ChildrenAPI a)
, tableAPI :: mode :- "table" :> NamedRoutes TableAPI
, tableNgramsAPI :: mode :- "ngrams" :> NamedRoutes TableNgramsAPI
, catAPI :: mode :- "category" :> NamedRoutes CatAPI
, scoreAPI :: mode :- "score" :> NamedRoutes ScoreAPI
, searchAPI :: mode :- "search" :> NamedRoutes (SearchAPI SearchResult)
, shareAPI :: mode :- "share" :> NamedRoutes ShareNode
-- Pairing utilities
, pairWithEp :: mode :- "pairwith" :> NamedRoutes PairWith
, pairsEp :: mode :- "pairs" :> NamedRoutes Pairs
, pairingEp :: mode :- "pairing" :> NamedRoutes PairingAPI
-- VIZ
, scatterAPI :: mode :- "metrics" :> NamedRoutes ScatterAPI
, charAPI :: mode :- "chart" :> NamedRoutes ChartAPI
, pieAPI :: mode :- "pie" :> NamedRoutes PieAPI
, treeAPI :: mode :- "tree" :> NamedRoutes NodeTreeAPI
, phyloAPI :: mode :- "phylo" :> NamedRoutes PhyloAPI
, moveAPI :: mode :- "move" :> NamedRoutes MoveAPI
, unpublishEp :: mode :- "unpublish" :> NamedRoutes Share.Unpublish
, fileAPI :: mode :- "file" :> NamedRoutes FileAPI
, fileAsyncAPI :: mode :- "async" :> NamedRoutes FileAsyncAPI
, dfwnAPI :: mode :- "documents-from-write-nodes" :> NamedRoutes DocumentsFromWriteNodesAPI
, documentUploadAPI :: mode :- NamedRoutes DocumentUploadAPI
} deriving Generic
-- TODO-ACCESS: check userId CanRenameNode nodeId
-- TODO-EVENTS: NodeRenamed RenameNode or re-use some more general NodeEdited...
newtype RenameAPI mode = RenameAPI
{ renameEp :: mode :- Summary " Rename Node"
:> ReqBody '[JSON] RenameNode
:> Put '[JSON] [Int]
} deriving Generic
newtype PostNodeAPI mode = PostNodeAPI
{ postWithParentEp :: mode :- Summary " PostNode Node with ParentId as {id}"
:> ReqBody '[JSON] PostNode
:> Post '[JSON] [NodeId]
} deriving Generic
newtype ChildrenAPI a mode = ChildrenAPI
{ summaryChildrenEp :: Summary " Summary children"
:> QueryParam "type" NodeType
:> QueryParam "offset" Offset
:> QueryParam "limit" Limit
:> Get '[JSON] (NodeTableResult a)
} deriving Generic
newtype NodeNodeAPI a mode = NodeNodeAPI
{ getNodeEp :: mode :- Get '[JSON] (Node a)
} deriving Generic
newtype PostNodeAsync mode = PostNodeAsync
{ postNodeAsyncEp :: mode :- Summary "Post Node"
:> "async"
:> AsyncJobs JobLog '[FormUrlEncoded] PostNode JobLog
} deriving Generic
newtype CatAPI mode = CatAPI
{ categoriseEp :: mode :- Summary " To Categorize NodeNodes: 0 for delete, 1/null neutral, 2 favorite"
:> ReqBody '[JSON] NodesToCategory
:> Put '[JSON] [Int]
} deriving Generic
newtype UpdateAPI mode = UpdateAPI
{ updateNodeEp :: mode :- Summary " Update node according to NodeType params"
:> AsyncJobs JobLog '[JSON] UpdateNodeParams JobLog
} deriving Generic
newtype MoveAPI mode = MoveAPI
{ moveNodeEp :: mode :- Summary "Move Node endpoint" :> Capture "parent_id" ParentId :> Put '[JSON] [Int]
} deriving Generic
-- TODO adapt FacetDoc -> ListDoc (and add type of document as column)
-- Pairing utilities to move elsewhere
newtype PairingAPI mode = PairingAPI
{ getPairingEp :: mode :- Summary " Pairing API"
:> QueryParam "view" TabType
-- TODO change TabType -> DocType (CorpusId for pairing)
:> QueryParam "offset" Offset
:> QueryParam "limit" Limit
:> QueryParam "order" OrderBy
:> Get '[JSON] [FacetDoc]
} deriving Generic
newtype Pairs mode = Pairs
{ pairsListEp :: mode :- Summary "List of Pairs" :> Get '[JSON] [AnnuaireId]
} deriving Generic
newtype PairWith mode = PairWith
{ pairCorpusAnnuaireEp :: mode :- Summary "Pair a Corpus with an Annuaire"
:> "annuaire"
:> Capture "annuaire_id" AnnuaireId
:> QueryParam "list_id" ListId
:> Post '[JSON] [Int]
} deriving Generic
data ScoreAPI mode = ScoreAPI
{ scoreNodesEp :: mode :- Summary " To Score NodeNodes"
:> ReqBody '[JSON] NodesToScore
:> Put '[JSON] [Int]
} deriving Generic
data Roots mode = Roots
{ getRootsEp :: mode :- Get '[JSON] [Node HyperdataUser]
, putRootsEp :: mode :- Put '[JSON] Int -- TODO
} deriving Generic
newtype NodesAPI mode = NodesAPI
{ deleteNodeEp :: mode :- Delete '[JSON] Int
} deriving Generic
--
-- API types (might appears in the routes)
--
newtype RenameNode = RenameNode { r_name :: Text }
deriving Generic
data NodesToCategory = NodesToCategory
{ ntc_nodesId :: [NodeId]
, ntc_category :: Int
} deriving Generic
data PostNode = PostNode
{ pn_name :: Text
, pn_typename :: NodeType
} deriving Generic
data UpdateNodeParams = UpdateNodeParamsList { methodList :: !Method }
| UpdateNodeParamsGraph { methodGraphMetric :: !GraphMetric
, methodGraphClustering :: !PartitionMethod
, methodGraphBridgeness :: !BridgenessMethod
, methodGraphEdgesStrength :: !Strength
, methodGraphNodeType1 :: !NgramsType
, methodGraphNodeType2 :: !NgramsType
}
| UpdateNodeParamsTexts { methodTexts :: !Granularity }
| UpdateNodeParamsBoard { methodBoard :: !Charts }
| LinkNodeReq { nodeType :: !NodeType
, id :: !NodeId }
| UpdateNodePhylo { config :: !PhyloSubConfigAPI }
deriving Generic
data Method = Basic | Advanced | WithModel
deriving (Generic, Eq, Ord, Enum, Bounded)
data Granularity = NewNgrams | NewTexts | Both
deriving (Generic, Eq, Ord, Enum, Bounded)
data Charts = Sources | Authors | Institutes | Ngrams | All
deriving (Generic, Eq, Ord, Enum, Bounded)
data NodesToScore = NodesToScore { nts_nodesId :: [NodeId]
, nts_score :: Int
}
deriving (Generic)
--
-- Instances
--
-- TODO unPrefix "pn_" FromJSON, ToJSON, ToSchema, adapt frontend.
instance FromJSON PostNode
instance ToJSON PostNode
instance ToSchema PostNode
instance FromForm PostNode
instance ToForm PostNode
instance Arbitrary PostNode where
arbitrary = elements [PostNode "Node test" NodeCorpus]
-- TODO unPrefix "ntc_" FromJSON, ToJSON, ToSchema, adapt frontend.
instance FromJSON NodesToScore
instance ToJSON NodesToScore
instance ToSchema NodesToScore
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DeriveGeneric #-}
module Gargantext.API.Routes.Named.Private (
-- * Routes types
GargPrivateAPI
, GargPrivateAPI'(..)
, GargAdminAPI(..)
, NodeEndpoint(..)
, MembersAPI(..)
) where
import Data.Text (Text)
import GHC.Generics
import Gargantext.API.Admin.Auth.Types
import Gargantext.API.Auth.PolicyCheck
import Gargantext.API.Routes.Named.Contact
import Gargantext.API.Routes.Named.Context
import Gargantext.API.Routes.Named.Corpus
import Gargantext.API.Routes.Named.Count
import Gargantext.API.Routes.Named.Document
import Gargantext.API.Routes.Named.Metrics
import Gargantext.API.Routes.Named.Node
import Gargantext.API.Routes.Named.List qualified as List
import Gargantext.API.Routes.Named.Share
import Gargantext.API.Routes.Named.Tree
import Gargantext.API.Routes.Named.Table
import Gargantext.API.Routes.Named.Viz
import Gargantext.Database.Admin.Types.Hyperdata.Any
import Gargantext.Database.Admin.Types.Hyperdata.Corpus
import Gargantext.Database.Admin.Types.Node
import Servant.API
import Servant.Auth qualified as SA
type MkProtectedAPI private = SA.Auth '[SA.JWT, SA.Cookie] AuthenticatedUser :> private
newtype GargPrivateAPI mode = GargPrivateAPI
{ mkPrivateAPI :: mode :- MkProtectedAPI (NamedRoutes GargPrivateAPI')
} deriving Generic
data GargPrivateAPI' mode = GargPrivateAPI'
{ gargAdminAPI :: mode :- NamedRoutes GargAdminAPI
, nodeEp :: mode :- NamedRoutes NodeEndpoint
, contextEp :: mode :- "context" :> Summary "Node endpoint"
:> Capture "node_id" ContextId
:> NamedRoutes (ContextAPI HyperdataAny)
, corpusNodeAPI :: mode :- "corpus" :> Summary "Corpus endpoint"
:> Capture "corpus_id" CorpusId
:> NamedRoutes (NodeAPI HyperdataCorpus)
, corpusNodeNodeAPI :: mode :- "corpus" :> Summary "Corpus endpoint"
:> Capture "node1_id" NodeId
:> "document"
:> Capture "node2_id" NodeId
:> NamedRoutes (NodeNodeAPI HyperdataAny)
, corpusExportAPI :: mode :- "corpus" :> Capture "node_id" CorpusId
:> NamedRoutes CorpusExportAPI
, annuaireEp :: mode :- "annuaire" :> Summary "Annuaire endpoint"
:> Capture "annuaire_id" AnnuaireId
:> NamedRoutes (NodeAPI HyperdataAnnuaire)
, contactAPI :: mode :- "annuaire" :> Summary "Contact endpoint"
:> Capture "annuaire_id" NodeId
:> NamedRoutes ContactAPI
, tableNgramsAPI :: mode :- "document" :> Summary "Document endpoint"
:> Capture "doc_id" DocId
:> "ngrams"
:> NamedRoutes TableNgramsAPI
, documentExportAPI :: mode :- "texts" :> Capture "node_id" DocId
:> NamedRoutes DocumentExportAPI
, countAPI :: mode :- "count" :> Summary "Count endpoint"
:> ReqBody '[JSON] Query
:> NamedRoutes CountAPI
, graphAPI :: mode :- "graph" :> Summary "Graph endpoint"
:> Capture "graph_id" NodeId
:> NamedRoutes GraphAPI
, treeAPI :: mode :- "tree" :> Summary "Tree endpoint"
:> Capture "tree_id" NodeId
:> PolicyChecked (NamedRoutes TreeAPI)
, treeFlatAPI :: mode :- "treeflat" :> Summary "Flat tree endpoint"
:> Capture "tree_id" NodeId
:> NamedRoutes TreeFlatAPI
, membersAPI :: mode :- "members" :> Summary "Team node members" :> NamedRoutes MembersAPI
, addWithFormEp :: mode :- NamedRoutes AddWithForm
, addWithQueryEp :: mode :- NamedRoutes AddWithQuery
, listGetAPI :: mode :- NamedRoutes List.GETAPI
, listJsonAPI :: mode :- NamedRoutes List.JSONAPI
, listCsvAPI :: mode :- NamedRoutes List.CSVAPI
, shareUrlEp :: mode :- "shareurl" :> NamedRoutes ShareURL
} deriving Generic
data GargAdminAPI mode = GargAdminAPI
{ rootsEp :: mode :- "user" :> Summary "First user endpoint" :> NamedRoutes Roots
, adminNodesAPI :: mode :- "nodes" :> Summary "Nodes endpoint"
:> ReqBody '[JSON] [NodeId]
:> NamedRoutes NodesAPI
} deriving Generic
data NodeEndpoint mode = NodeEndpoint
{ nodeEndpointAPI :: mode :- "node" :> Summary "Node endpoint"
:> Capture "node_id" NodeId
:> NamedRoutes (NodeAPI HyperdataAny)
} deriving Generic
data MembersAPI mode = MembersAPI
{ getMembersEp :: mode :- Get '[JSON] [Text]
}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
module Gargantext.API.Routes.Named.Public where
import GHC.Generics
import Gargantext.API.Public qualified as Public
import Gargantext.API.Routes.Named.File
import Gargantext.Database.Admin.Types.Node ( NodeId )
import Servant.API
data GargPublicAPI mode = GargPublicAPI
{ publicHomeAPI :: mode :- NamedRoutes HomeAPI
, publicNodeAPI :: mode :- NamedRoutes NodeAPI
} deriving Generic
data HomeAPI mode = HomeAPI
{ homeEp :: mode :- Summary "Public Home API" :> Get '[JSON] [Public.PublicData]
} deriving Generic
data NodeAPI mode = NodeAPI
{ nodeEp :: mode :- Summary "Public Node API" :> Capture "node" NodeId :> "file" :> NamedRoutes FileAPI
} deriving Generic
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DeriveGeneric #-}
module Gargantext.API.Routes.Named.Search (
-- * Routes types
SearchAPI(..)
-- * API types (appears in the routes)
, SearchType(..)
, SearchQuery(..)
, SearchResult(..)
, SearchResultTypes(..)
) where
import Data.Aeson
import Data.Swagger
import Data.Text (Text)
import GHC.Generics
import Gargantext.Core.Text.Corpus.Query (RawQuery (..))
import Gargantext.Core.Types.Query (Limit, Offset)
import Gargantext.Core.Types.Search
import Gargantext.Core.Utils.Prefix (unPrefixSwagger)
import Gargantext.Database.Query.Facet
import Prelude
import Servant
import Test.QuickCheck
-- TODO-ACCESS: CanSearch? or is it part of CanGetNode
-- TODO-EVENTS: No event, this is a read-only query.
data SearchAPI results mode = SearchAPI
{ searchEp :: mode :- Summary "Search endpoint"
:> ReqBody '[JSON] SearchQuery
:> QueryParam "offset" Offset
:> QueryParam "limit" Limit
:> QueryParam "order" OrderBy
:> Post '[JSON] results
} deriving Generic
data SearchType = SearchDoc | SearchContact | SearchDocWithNgrams
deriving Generic
data SearchQuery = SearchQuery
{ query :: !RawQuery
, expected :: !SearchType
} deriving Generic
newtype SearchResult =
SearchResult { result :: SearchResultTypes }
deriving Generic
data SearchResultTypes =
SearchResultDoc { docs :: ![Row] }
| SearchResultContact { contacts :: ![Row] }
| SearchNoResult { message :: !Text }
deriving Generic
--
-- instances
--
instance FromJSON SearchResult where
parseJSON = genericParseJSON defaultOptions
instance ToJSON SearchResult where
toJSON = genericToJSON defaultOptions
instance ToSchema SearchResult
instance Arbitrary SearchResult where
arbitrary = SearchResult <$> arbitrary
instance FromJSON SearchResultTypes where
parseJSON = genericParseJSON (defaultOptions { sumEncoding = defaultTaggedObject })
instance ToJSON SearchResultTypes where
toJSON = genericToJSON (defaultOptions { sumEncoding = defaultTaggedObject })
instance Arbitrary SearchResultTypes where
arbitrary = do
srd <- SearchResultDoc <$> arbitrary
src <- SearchResultContact <$> arbitrary
srn <- pure $ SearchNoResult "No result because.."
elements [srd, src, srn]
instance ToSchema SearchResultTypes where
declareNamedSchema = genericDeclareNamedSchema (unPrefixSwagger "")
instance FromJSON SearchQuery where
parseJSON = genericParseJSON defaultOptions
instance ToJSON SearchQuery where
toJSON = genericToJSON defaultOptions
instance ToSchema SearchQuery
instance Arbitrary SearchQuery where
arbitrary = elements [SearchQuery (RawQuery "electrodes") SearchDoc]
instance FromJSON SearchType where
parseJSON = genericParseJSON (defaultOptions { sumEncoding = ObjectWithSingleField })
instance ToJSON SearchType where
toJSON = genericToJSON (defaultOptions { sumEncoding = ObjectWithSingleField })
instance ToSchema SearchType
instance Arbitrary SearchType where
arbitrary = elements [SearchDoc, SearchContact]
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DeriveGeneric #-}
module Gargantext.API.Routes.Named.Share (
-- * Routes types
ShareNode(..)
, Unpublish(..)
, ShareURL(..)
-- * API types (which appears in the routes)
, ShareNodeParams(..)
) where
import Data.Aeson
import Data.Swagger
import Data.Text (Text)
import GHC.Generics
import Gargantext.Database.Admin.Types.Node
import Gargantext.Utils.Aeson qualified as GUA
import Prelude
import Servant
import Test.QuickCheck
newtype ShareURL mode = ShareURL
{ shareUrlEp :: mode :- Summary "Fetch URL for sharing a node"
:> QueryParam "type" NodeType
:> QueryParam "id" NodeId
:> Get '[JSON] Text
} deriving Generic
newtype ShareNode mode = ShareNode
{ shareNodeEp :: mode :- Summary " Share Node with username"
:> ReqBody '[JSON] ShareNodeParams
:> Post '[JSON] Int
} deriving Generic
newtype Unpublish mode = Unpublish
{ unpublishEp :: mode :- Summary " Unpublish Node" :> Capture "node_id" NodeId :> Put '[JSON] Int
} deriving Generic
--
-- API Types
--
data ShareNodeParams = ShareTeamParams { username :: Text }
| SharePublicParams { node_id :: NodeId }
deriving (Generic)
--
-- Instances
--
-- TODO unPrefix "pn_" FromJSON, ToJSON, ToSchema, adapt frontend.
instance FromJSON ShareNodeParams where
parseJSON = genericParseJSON (defaultOptions { sumEncoding = GUA.defaultTaggedObject })
instance ToJSON ShareNodeParams where
toJSON = genericToJSON (defaultOptions { sumEncoding = GUA.defaultTaggedObject })
instance ToSchema ShareNodeParams
instance Arbitrary ShareNodeParams where
arbitrary = elements [ ShareTeamParams "user1"
, SharePublicParams (UnsafeMkNodeId 1)
]
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeOperators #-}
module Gargantext.API.Routes.Named.Table (
-- * Routes types
TableAPI(..)
, TableNgramsAPI(..)
, TableNgramsApiGet(..)
, TableNgramsApiPut(..)
, RecomputeScoresNgramsApiGet(..)
, TableNgramsApiGetVersion(..)
, TableNgramsAsyncAPI(..)
-- * API types (appears in the routes)
, TableQuery(..)
, FacetTableResult
) where
import Data.Aeson.TH
import Data.Swagger
import Data.Text (Text)
import GHC.Generics
import Gargantext.API.Admin.Orchestrator.Types
import Gargantext.API.HashedResponse
import Gargantext.API.Ngrams.Types (TabType(..), UpdateTableNgramsCharts, Version, QueryParamR, Versioned, VersionedWithCount, NgramsTable, NgramsTablePatch)
import Gargantext.Core.Text.Corpus.Query (RawQuery)
import Gargantext.Core.Types (TableResult(..))
import Gargantext.Core.Types.Main (ListType)
import Gargantext.Core.Types.Query
import Gargantext.Core.Utils.Prefix (unPrefix, unPrefixSwagger)
import Gargantext.Database.Admin.Types.Node (ListId)
import Gargantext.Database.Query.Facet.Types
import Prelude
import Servant
import Test.QuickCheck
data TableAPI mode = TableAPI
{ getTableEp :: mode :- Summary "Table API"
:> QueryParam "tabType" TabType
:> QueryParam "limit" Limit
:> QueryParam "offset" Offset
:> QueryParam "orderBy" OrderBy
:> QueryParam "query" RawQuery
:> QueryParam "year" Text
:> Get '[JSON] (HashedResponse FacetTableResult)
, postTableEp :: mode :- Summary "Table API (POST)"
:> ReqBody '[JSON] TableQuery
:> Post '[JSON] FacetTableResult
, hashTableEp :: mode :- "hash"
:> Summary "Hash Table"
:> QueryParam "tabType" TabType
:> Get '[JSON] Text
} deriving Generic
data TableNgramsAPI mode = TableNgramsAPI
{ tableNgramsGetAPI :: mode :- NamedRoutes TableNgramsApiGet
, tableNgramsPutAPI :: mode :- NamedRoutes TableNgramsApiPut
, recomputeScoresEp :: mode :- NamedRoutes RecomputeScoresNgramsApiGet
, tableNgramsGetVersionEp :: mode :- "version" :> NamedRoutes TableNgramsApiGetVersion
, tableNgramsAsyncAPI :: mode :- NamedRoutes TableNgramsAsyncAPI
} deriving Generic
data TableNgramsApiGet mode = TableNgramsApiGet
{ getNgramsTableEp :: mode :- Summary " Table Ngrams API Get"
:> QueryParamR "ngramsType" TabType
:> QueryParamR "list" ListId
:> QueryParamR "limit" Limit
:> QueryParam "offset" Offset
:> QueryParam "listType" ListType
:> QueryParam "minTermSize" MinSize
:> QueryParam "maxTermSize" MaxSize
:> QueryParam "orderBy" OrderBy
:> QueryParam "search" Text
:> Get '[JSON] (VersionedWithCount NgramsTable)
} deriving Generic
data TableNgramsApiPut mode = TableNgramsApiPut
{ putNgramsTableEp :: mode :- Summary " Table Ngrams API Change"
:> QueryParamR "ngramsType" TabType
:> QueryParamR "list" ListId
:> ReqBody '[JSON] (Versioned NgramsTablePatch)
:> Put '[JSON] (Versioned NgramsTablePatch)
} deriving Generic
data RecomputeScoresNgramsApiGet mode = RecomputeScoresNgramsApiGet
{ recomputeNgramsEp :: mode :- Summary " Recompute scores for ngrams table"
:> QueryParamR "ngramsType" TabType
:> QueryParamR "list" ListId
:> "recompute" :> Post '[JSON] Int
} deriving Generic
data TableNgramsApiGetVersion mode = TableNgramsApiGetVersion
{ getTableNgramsVersion :: mode :- Summary " Table Ngrams API Get Version"
:> QueryParamR "ngramsType" TabType
:> QueryParamR "list" ListId
:> Get '[JSON] Version
} deriving Generic
data TableNgramsAsyncAPI mode = TableNgramsAsyncAPI
{ updateTableNgramsChartsEp :: mode :- Summary "Table Ngrams Async API"
:> "async"
:> "charts"
:> "update"
:> AsyncJobs JobLog '[JSON] UpdateTableNgramsCharts JobLog
} deriving Generic
data TableQuery = TableQuery
{ tq_offset :: Offset
, tq_limit :: Limit
, tq_orderBy :: OrderBy
, tq_view :: TabType
, tq_query :: RawQuery
} deriving Generic
type FacetTableResult = TableResult FacetDoc
--
-- instances
--
$(deriveJSON (unPrefix "tq_") ''TableQuery)
instance ToSchema TableQuery where
declareNamedSchema = genericDeclareNamedSchema (unPrefixSwagger "tq_")
instance Arbitrary TableQuery where
arbitrary = elements [TableQuery { tq_offset = 0
, tq_limit = 10
, tq_orderBy = DateAsc
, tq_view = Docs
, tq_query = "electrodes" }]
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DeriveGeneric #-}
module Gargantext.API.Routes.Named.Tree (
-- * Routes types
NodeTreeAPI(..)
, TreeFlatAPI(..)
) where
import Data.Text (Text)
import GHC.Generics
import Gargantext.Core.Types.Main
import Gargantext.Database.Admin.Types.Node
import Servant
data NodeTreeAPI mode = NodeTreeAPI
{ nodeTreeEp :: mode :- QueryParams "type" NodeType :> Get '[JSON] (Tree NodeTree)
, firstLevelEp :: mode :- "first-level" :> QueryParams "type" NodeType :> Get '[JSON] (Tree NodeTree)
} deriving Generic
data TreeFlatAPI mode = TreeFlatAPI
{ getNodesEp :: mode :- QueryParams "type" NodeType :> QueryParam "query" Text :> Get '[JSON] [NodeTree]
} deriving Generic
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DeriveGeneric #-}
module Gargantext.API.Routes.Named.Viz (
-- * Routes types
PhyloAPI(..)
, GetPhylo(..)
, PostPhylo(..)
, GraphAPI(..)
, GraphAsyncAPI(..)
, GraphVersionsAPI(..)
-- * API types (appears in the routes)
, PhyloData(..)
, GraphVersions(..)
) where
import Data.Aeson
import Data.Swagger
import Data.Text (Text)
import GHC.Generics
import Gargantext.API.Admin.Orchestrator.Types ( JobLog )
import Gargantext.Core.Types
import Gargantext.Core.Types.Phylo
import Gargantext.Core.Viz.Graph.Types
import Gargantext.Core.Viz.LegacyPhylo (Level)
import Gargantext.Core.Viz.Phylo
import Gargantext.Core.Viz.Phylo.Legacy.LegacyMain (MinSizeBranch)
import Prelude
import Servant
import Servant.Job.Async (AsyncJobsAPI)
import Servant.XML.Conduit (XML)
import Test.QuickCheck
data PhyloAPI mode = PhyloAPI
{ getPhyloEp :: mode :- Summary "Phylo API" :> NamedRoutes GetPhylo
, postPhyloEp :: mode :- NamedRoutes PostPhylo
} deriving Generic
newtype GetPhylo mode = GetPhylo
{ getPhyloDataEp :: mode :- QueryParam "listId" ListId
:> QueryParam "level" Level
:> QueryParam "minSizeBranch" MinSizeBranch
:> Get '[JSON] PhyloData
} deriving Generic
newtype PostPhylo mode = PostPhylo
{ postPhyloByListIdEp :: mode :- QueryParam "listId" ListId :> (Post '[JSON] NodeId)
} deriving Generic
data GraphAPI mode = GraphAPI
{ getGraphEp :: mode :- Get '[JSON] HyperdataGraphAPI
, getGraphAsyncEp :: mode :- "async" :> NamedRoutes GraphAsyncAPI
, cloneGraphEp :: mode :- "clone" :> ReqBody '[JSON] HyperdataGraphAPI :> Post '[JSON] NodeId
, gexfEp :: mode :- "gexf" :> Get '[XML] (Headers '[Servant.Header "Content-Disposition" Text] Graph)
, graphVersionsAPI :: mode :- "versions" :> NamedRoutes GraphVersionsAPI
} deriving Generic
newtype GraphAsyncAPI mode = GraphAsyncAPI
{ recomputeGraphEp :: mode :- Summary "Recompute graph"
:> "recompute"
:> AsyncJobsAPI JobLog () JobLog
} deriving Generic
data GraphVersionsAPI mode = GraphVersionsAPI
{ getGraphVersionsEp :: mode :- Summary "Graph versions" :> Get '[JSON] GraphVersions
, recomputeGraphVersionEp :: mode :- Summary "Recompute graph version" :> Post '[JSON] Graph
} deriving Generic
data PhyloData = PhyloData { pd_corpusId :: NodeId
, pd_listId :: NodeId
, pd_data :: GraphData
, pd_config :: PhyloConfig
}
deriving (Generic, Show, Eq)
data GraphVersions = GraphVersions
{ gv_graph :: Maybe Int
, gv_repo :: Int
} deriving (Show, Generic)
--
-- instances
--
instance ToJSON PhyloData where
toJSON PhyloData{..} =
object [
"pd_corpusId" .= toJSON pd_corpusId
, "pd_listId" .= toJSON pd_listId
, "pd_data" .= toJSON pd_data
, "pd_config" .= toJSON pd_config
]
instance FromJSON PhyloData where
parseJSON = withObject "PhyloData" $ \o -> do
pd_corpusId <- o .: "pd_corpusId"
pd_listId <- o .: "pd_listId"
pd_data <- o .: "pd_data"
pd_config <- o .: "pd_config"
pure $ PhyloData{..}
instance Arbitrary PhyloData where
arbitrary = PhyloData <$> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary
instance ToSchema PhyloData
instance FromJSON GraphVersions
instance ToJSON GraphVersions
instance ToSchema GraphVersions
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Gargantext.API.Routes.Types where
import Data.List qualified as L
import Data.Proxy
import Gargantext.API.Errors
import Prelude
import Servant.Ekg
import Servant.Server
import Servant.Server.Internal.DelayedIO
import Servant.Server.Internal.Delayed
import Network.Wai
data WithCustomErrorScheme a
instance (HasServer subApi ctx) => HasServer (WithCustomErrorScheme subApi) ctx where
type ServerT (WithCustomErrorScheme subApi) m = GargErrorScheme -> ServerT subApi m
hoistServerWithContext _ pc nt s = hoistServerWithContext (Proxy :: Proxy subApi) pc nt . s
route Proxy ctx d = route (Proxy :: Proxy subApi) ctx (d `addHeaderCheck` getErrorScheme)
where
getErrorScheme :: DelayedIO GargErrorScheme
getErrorScheme = withRequest $ \rq -> do
let hdrs = requestHeaders rq
in case L.lookup "X-Garg-Error-Scheme" hdrs of
Nothing -> pure GES_old
Just "new" -> pure GES_new
Just _ -> pure GES_old
instance HasEndpoint sub => HasEndpoint (WithCustomErrorScheme sub) where
getEndpoint _ = getEndpoint (Proxy :: Proxy sub)
enumerateEndpoints _ = enumerateEndpoints (Proxy :: Proxy sub)
......@@ -204,7 +204,8 @@ logDistributional' n m' = trace ("logDistributional'") result
-- m_{i,j} = 0 if n_{i,j} = 0 or i = j,
-- m_{i,j} = log(to * n_{i,j} / s_{i,j}) otherwise.
mi = (.*) (matrixEye n)
(map (lift1 (\x -> let x' = x * to in cond (x' < 1) 0 (log x'))) ((./) m ss))
(map (lift1 (\x -> let x' = x * to in cond (x' < 0.5) 0 (log x'))) ((./) m ss))
-- (map (lift1 (\x -> let x' = x * to in cond (x' < 1) 0 (log x'))) ((./) m ss))
-- mi_nnz :: Int
-- mi_nnz = flip indexArray Z . run $
-- foldAll (+) 0 $ map (\a -> ifThenElse (abs a < 10^(-6 :: Exp Int)) 0 1) mi
......
......@@ -66,7 +66,7 @@ class Collage sup inf where
instance Collage Texte Paragraphe where
dec (Texte t) = map Paragraphe $ DT.splitOn "\n" t
inc = Texte . DT.intercalate "\n" . map (\(Paragraphe t) -> t)
inc = Texte . DT.unlines . map (\(Paragraphe t) -> t)
instance Collage Paragraphe Phrase where
dec (Paragraphe t) = map Phrase $ sentences t
......@@ -78,7 +78,7 @@ instance Collage Phrase MultiTerme where
instance Collage MultiTerme Mot where
dec (MultiTerme mt) = map Mot $ DT.words mt
inc = MultiTerme . DT.intercalate " " . map (\(Mot m) -> m)
inc = MultiTerme . DT.unwords . map (\(Mot m) -> m)
-------------------------------------------------------------------
-- Contexts of text
......@@ -92,7 +92,7 @@ isCharStop :: Char -> Bool
isCharStop c = c `elem` ['.','?','!']
unsentences :: [Text] -> Text
unsentences txts = DT.intercalate " " txts
unsentences txts = DT.unwords txts
-- | Ngrams size
size :: Text -> Int
......
......@@ -71,7 +71,7 @@ isidoreToDoc lang (IsidoreDoc t a d u s as) = do
langText :: LangText -> Text
langText (LangText _l t1) = t1
langText (OnlyText t2 ) = t2
langText (ArrayText ts ) = Text.intercalate " " $ map langText ts
langText (ArrayText ts ) = Text.unwords $ map langText ts
let mDateS = maybe (Just $ Text.pack $ show Defaults.year) Just d
let (utcTime, (pub_year, pub_month, pub_day)) = Date.mDateSplit mDateS
......
......@@ -247,7 +247,7 @@ text2titleParagraphs n = catMaybes
n' = n + (round $ (fromIntegral n) / (2 :: Double))
doTitle :: [Text] -> Maybe (Text, Text)
doTitle (t:ts) = Just (t, DT.intercalate " " ts)
doTitle (t:ts) = Just (t, DT.unwords ts)
doTitle [] = Nothing
......
......@@ -58,6 +58,11 @@ isStopTerm (StopSize n) x = Text.length x < n || any isStopChar (Text.unpack x)
-}
-- | Good value from users' requests and anthropological analysis
goodMapListSize :: Int
goodMapListSize = 350
-- | TODO improve grouping functions of Authors, Sources, Institutes..
buildNgramsLists :: ( HasNodeStory env err m
, HasNLPServer env
......@@ -71,7 +76,7 @@ buildNgramsLists :: ( HasNodeStory env err m
-> GroupParams
-> m (Map NgramsType [NgramsElement])
buildNgramsLists user uCid mCid mfslw gp = do
ngTerms <- buildNgramsTermsList user uCid mCid mfslw gp (NgramsTerms, MapListSize 350)
ngTerms <- buildNgramsTermsList user uCid mCid mfslw gp (NgramsTerms, MapListSize goodMapListSize)
othersTerms <- mapM (buildNgramsOthersList user uCid mfslw GroupIdentity)
[ (Authors , MapListSize 9, MaxListSize 1000)
, (Sources , MapListSize 9, MaxListSize 1000)
......@@ -179,22 +184,23 @@ buildNgramsTermsList user uCid mCid mfslw groupParams (nt, MapListSize mapListSi
)
-- printDebug "[buildNgramsTermsList: Flow Social List / end]" nt
let !ngramsKeys = HashSet.fromList
$ List.take mapListSize
$ HashSet.toList
$ HashMap.keysSet allTerms
let !allKeys = HashMap.keysSet allTerms
-- printDebug "[buildNgramsTermsList: ngramsKeys]" (HashSet.size ngramsKeys)
!groupParams' <- getGroupParams groupParams (HashSet.map (text2ngrams . unNgramsTerm) ngramsKeys)
!groupParams' <- getGroupParams groupParams (HashSet.map (text2ngrams . unNgramsTerm) allKeys)
let
!socialLists_Stemmed = addScoreStem groupParams' ngramsKeys socialLists
!socialLists_Stemmed = addScoreStem groupParams' allKeys socialLists
!groupedWithList = toGroupedTree socialLists_Stemmed allTerms
!(stopTerms, candidateTerms) = HashMap.partition ((== Just StopTerm) . viewListType)
$ HashMap.fromList
$ List.take mapListSize
$ HashMap.toList
$ HashMap.filter (\g -> view gts'_score g > 1)
$ view flc_scores groupedWithList
-- | Split candidateTerms into mono-terms and multi-terms.
!(groupedMono, groupedMult) = HashMap.partitionWithKey (\(NgramsTerm t) _v -> size t < 2) candidateTerms
-- void $ panicTrace $ "groupedWithList: " <> show groupedWithList
......@@ -211,6 +217,7 @@ buildNgramsTermsList user uCid mCid mfslw groupParams (nt, MapListSize mapListSi
!monoSize = 0.4 :: Double
!multSize = 1 - monoSize
-- | Splits given hashmap into 2 pieces, based on score
splitAt' n' ns = both (HashMap.fromListWith (<>))
$ List.splitAt (round $ n' * listSizeGlobal)
$ List.sortOn (viewScore . snd)
......@@ -254,8 +261,7 @@ buildNgramsTermsList user uCid mCid mfslw groupParams (nt, MapListSize mapListSi
]
where
mapStemNodeIds = HashMap.toList
$ HashMap.map viewScores
$ groupedTreeScores_SetNodeId
$ HashMap.map viewScores groupedTreeScores_SetNodeId
let
-- computing scores
mapScores f = HashMap.fromList
......
......@@ -69,7 +69,7 @@ groupWith :: GroupParams
groupWith GroupIdentity t = identity t
groupWith (GroupParams { unGroupParams_lang = l }) t =
NgramsTerm
$ Text.intercalate " "
$ Text.unwords
$ map (stem l PorterAlgorithm)
-- . take n
$ List.sort
......
......@@ -14,14 +14,15 @@ TFICF is a generalization of [TFIDF](https://en.wikipedia.org/wiki/Tf%E2%80%93id
-}
module Gargantext.Core.Text.Metrics.TFICF ( TFICF
module Gargantext.Core.Text.Metrics.TFICF
( TFICF
, TficfContext(..)
, Total(..)
, Count(..)
, tficf
, sortTficf
)
where
where
import Data.List qualified as List
import Data.Map.Strict (toList)
......@@ -34,12 +35,19 @@ path = "[G.T.Metrics.TFICF]"
type TFICF = Double
-- https://www.researchgate.net/publication/221226686_TF-ICF_A_New_Term_Weighting_Scheme_for_Clustering_Dynamic_Data_Streams
-- TficfSupra n m
-- - m is the total number of documents in the corpus
-- - n is the number of documents, where given term occured more than once
-- TficfInfra n m
-- -
data TficfContext n m = TficfInfra n m
| TficfSupra n m
deriving (Show)
data Total = Total {unTotal :: !Double}
data Count = Count {unCount :: !Double}
newtype Total = Total { unTotal :: Double }
newtype Count = Count { unCount :: Double }
tficf :: TficfContext Count Total
-> TficfContext Count Total
......@@ -50,7 +58,11 @@ tficf (TficfInfra (Count ic) (Total it) )
| otherwise = panicTrace
$ "[ERR]"
<> path
<> " Frequency impossible"
<> " Frequency impossible: "
<> "ic = " <> show ic
<> ", it = " <> show it
<> ", sc = " <> show sc
<> ", st = " <> show st
tficf _ _ = panicTrace $ "[ERR]" <> path <> "Undefined for these contexts"
......
......@@ -92,7 +92,8 @@ instance Hashable Ngrams
makeLenses ''Ngrams
instance PGS.ToRow Ngrams where
toRow (UnsafeNgrams t s) = [toField t, toField s]
toRow (UnsafeNgrams { .. }) = [ toField _ngramsTerms
, toField _ngramsSize ]
------------------------------------------------------------------------
-------------------------------------------------------------------------
......
......@@ -50,7 +50,7 @@ data Paragraph = Uniform Grain | AuthorLike
-- Grain: number of Sentences by block of Text
-- Step : overlap of sentence between connex block of Text
groupUniform :: Grain -> [Text] -> [Text]
groupUniform g ts = map (Text.intercalate " ")
groupUniform g ts = map Text.unwords
$ chunkAlong g g
$ sentences
$ Text.concat ts
......
......@@ -52,7 +52,7 @@ import Gargantext.Core.Text.Terms.Mono (monoTerms)
import Gargantext.Core.Text.Terms.Mono.Stem (stem, StemmingAlgorithm(..))
import Gargantext.Core.Text.Terms.Mono.Token.En (tokenize)
import Gargantext.Core.Text.Terms.Multi (multiterms)
import Gargantext.Core.Types ( TermsCount, POS, Terms(Terms), TermsWithCount )
import Gargantext.Core.Types ( TermsCount, POS, Terms(..), TermsWithCount )
import Gargantext.Core.Utils (groupWithCounts)
import Gargantext.Database.Prelude (DBCmd)
import Gargantext.Database.Query.Table.Ngrams (insertNgrams)
......@@ -60,6 +60,7 @@ import Gargantext.Database.Query.Table.NgramsPostag (NgramsPostag(..), insertNgr
import Gargantext.Database.Schema.Ngrams (text2ngrams, NgramsId)
import Gargantext.Prelude
data TermType lang
= Mono { _tt_lang :: !lang }
| Multi { _tt_lang :: !lang }
......@@ -86,7 +87,7 @@ extractTerms ncs (Unsupervised {..}) xs = mapM (terms ncs (Unsupervised { _tt_mo
where
m' = case _tt_model of
Just m''-> m''
Nothing -> newTries _tt_windowSize (Text.intercalate " " xs)
Nothing -> newTries _tt_windowSize (Text.unwords xs)
extractTerms ncs termTypeLang xs = mapM (terms ncs termTypeLang) xs
......@@ -124,15 +125,15 @@ class ExtractNgramsT h
-> DBCmd err (HashMap ExtractedNgrams (Map NgramsType Int, TermsCount))
------------------------------------------------------------------------
enrichedTerms :: Lang -> PosTagAlgo -> POS -> Terms -> NgramsPostag
enrichedTerms l pa po (Terms ng1 ng2) =
enrichedTerms l pa po (Terms { .. }) =
NgramsPostag { _np_lang = l
, _np_algo = pa
, _np_postag = po
, _np_form = form
, _np_lem = lem }
where
form = text2ngrams $ Text.intercalate " " ng1
lem = text2ngrams $ Text.intercalate " " $ Set.toList ng2
form = text2ngrams $ Text.unwords _terms_label
lem = text2ngrams $ Text.unwords $ Set.toList _terms_stem
------------------------------------------------------------------------
cleanNgrams :: Int -> Ngrams -> Ngrams
......
......@@ -114,7 +114,7 @@ extractTermsWithList' pats = map (concat . map concat . replaceTerms KeepAll pat
--------------------------------------------------------------------------
addSpaces :: Text -> Text
addSpaces = (Text.intercalate " ") . (Text.chunksOf 1)
addSpaces = Text.unwords . (Text.chunksOf 1)
--------------------------------------------------------------------------
......
......@@ -68,7 +68,7 @@ data Terms = Terms { _terms_label :: Label
, _terms_stem :: Stems
} deriving (Ord, Show)
instance Eq Terms where
(==) (Terms _ s1) (Terms _ s2) = s1 == s2
(==) (Terms { _terms_stem = s1 }) (Terms { _terms_stem = s2 }) = s1 == s2
type TermsCount = Int
......
......@@ -151,6 +151,6 @@ instance ToHyperdataRow HyperdataContact where
toHyperdataRow (HyperdataContact { _hc_who = Just (ContactWho _ fn ln _ _ _), _hc_where = ou} ) =
HyperdataRowContact (fromMaybe "FirstName" fn) (fromMaybe "LastName" ln) ou'
where
ou' = maybe "CNRS" (Text.intercalate " " . _cw_organization) (head ou)
ou' = maybe "CNRS" (Text.unwords . _cw_organization) (head ou)
toHyperdataRow (HyperdataContact {}) =
HyperdataRowContact "FirstName" "LastName" "Labs"
......@@ -118,7 +118,7 @@ cooc2graphWith' _doPartitions _bridgenessMethod multi similarity threshold stren
partitions <- if (Map.size distanceMap > 0)
then recursiveClustering' (spinglass' 1) distanceMap
else panic $ Text.intercalate " " [ "I can not compute the graph you request"
else panic $ Text.unwords [ "I can not compute the graph you request"
, "because either the quantity of documents"
, "or the quantity of terms"
, "are lacking."
......
......@@ -76,7 +76,8 @@ phylo2dot2json phylo = do
fileDot = dirPath </> "phylo.dot"
fileToJson = dirPath </> "output.json"
dotToFile fileFrom (toPhyloExport phylo)
phyloContent <- phylo2dot phylo
writeFile fileFrom phyloContent
-- parsing a file can be done with:
-- runParser' (Data.GraphViz.Parsing.parse :: Parse (Data.GraphViz.DotGraph Text)) $ TL.fromStrict f
......@@ -91,6 +92,20 @@ phylo2dot2json phylo = do
Just v -> pure v
phylo2dot :: Phylo -> IO Text
phylo2dot phylo = do
withTempDirectory "/tmp" "phylo" $ \dirPath -> do
let fileFrom = dirPath </> "phyloFrom.dot"
dotToFile fileFrom (toPhyloExport phylo)
value <- readFile fileFrom
case value of
"" -> panic "[G.C.V.Phylo.API.phylo2dot] Error no file"
_ -> pure value
flowPhyloAPI :: (HasNodeStory env err m, HasNodeError err, MonadLogger m)
=> PhyloConfig -> CorpusId -> m Phylo
flowPhyloAPI config cId = do
......
......@@ -185,12 +185,13 @@ selectNgramsOccurrencesOnlyByContextUser_withSample cId int nt tms =
( int
, toDBid NodeDocument
, cId
, Values fields ((DPS.Only . unNgramsTerm) <$> (List.take 10000 tms))
-- , Values fields ((DPS.Only . unNgramsTerm) <$> (List.take 10000 tms))
, DPS.In (unNgramsTerm <$> (List.take 10000 tms))
, cId
, toDBid nt
)
where
fields = [QualifiedIdentifier Nothing "text"]
-- where
-- fields = [QualifiedIdentifier Nothing "text"]
queryNgramsOccurrencesOnlyByContextUser_withSample :: DPS.Query
queryNgramsOccurrencesOnlyByContextUser_withSample = [sql|
......@@ -198,18 +199,42 @@ queryNgramsOccurrencesOnlyByContextUser_withSample = [sql|
JOIN nodes_contexts nn ON n.id = nn.context_id
WHERE n.typename = ?
AND nn.node_id = ?),
input_rows(terms) AS (?)
SELECT ng.terms, COUNT(cng.context_id) FROM context_node_ngrams cng
JOIN ngrams ng ON cng.ngrams_id = ng.id
JOIN input_rows ir ON ir.terms = ng.terms
input_rows AS (
SELECT id, terms
FROM ngrams
WHERE terms IN ?
)
SELECT ir.terms, COUNT(cng.context_id) FROM context_node_ngrams cng
JOIN input_rows ir ON cng.ngrams_id = ir.id
JOIN nodes_contexts nn ON nn.context_id = cng.context_id
JOIN nodes_sample n ON nn.context_id = n.id
WHERE nn.node_id = ? -- CorpusId
AND cng.ngrams_type = ? -- NgramsTypeId
AND nn.category > 0
GROUP BY cng.node_id, ng.terms
GROUP BY cng.node_id, ir.terms
|]
-- queryNgramsOccurrencesOnlyByContextUser_withSample :: DPS.Query
-- queryNgramsOccurrencesOnlyByContextUser_withSample = [sql|
-- WITH nodes_sample AS (SELECT c.id FROM contexts c TABLESAMPLE SYSTEM_ROWS (?)
-- JOIN nodes_contexts nc ON c.id = nc.context_id
-- WHERE c.typename = ?
-- AND nc.node_id = ?),
-- input_rows(terms) AS (?)
-- SELECT ng.terms, COUNT(cng.context_id) FROM context_node_ngrams cng
-- JOIN ngrams ng ON cng.ngrams_id = ng.id
-- JOIN input_rows ir ON ir.terms = ng.terms
-- JOIN nodes_contexts nc ON nc.context_id = cng.context_id
-- JOIN nodes_sample ns ON nc.context_id = ns.id
-- WHERE nc.node_id = ? -- CorpusId
-- AND cng.ngrams_type = ? -- NgramsTypeId
-- AND nc.category > 0
-- -- AND nc.context_id IN (SELECT id FROM nodes_sample)
-- GROUP BY cng.node_id, ng.terms
-- |]
selectNgramsOccurrencesOnlyByContextUser_withSample' :: HasDBid NodeType
=> CorpusId
-> Int
......
......@@ -70,6 +70,9 @@ getTficf_withSample cId mId nt = do
<$> getOccByNgramsOnlyFast_withSample mId countGlobal nt
(HM.keys mapTextDoubleLocal)
printDebug "[getTficf_withSample] mapTextDoubleLocal: " mapTextDoubleLocal
printDebug "[getTficf_withSample] mapTextDoubleGlobal: " mapTextDoubleGlobal
--printDebug "getTficf_withSample" (mapTextDoubleLocal, mapTextDoubleGlobal, countLocal, countGlobal)
pure $ HM.mapWithKey (\t n ->
tficf (TficfInfra (Count n )
......
......@@ -207,7 +207,7 @@ fromField' field mb = do
valueToHyperdata v = case fromJSON v of
Success a -> pure a
Error _err -> returnError ConversionFailed field
$ DL.intercalate " " [ "cannot parse hyperdata for JSON: "
$ DL.unwords [ "cannot parse hyperdata for JSON: "
, show v
]
......
......@@ -28,7 +28,7 @@ import Data.HashMap.Strict qualified as HashMap
import Data.List qualified as List
import Data.Map.Strict qualified as Map
import Database.PostgreSQL.Simple qualified as PGS
import Gargantext.Core.Text.Ngrams (Ngrams, NgramsType)
import Gargantext.Core.Text.Ngrams (Ngrams(..), NgramsType)
import Gargantext.Database.Admin.Types.Node ( pgNodeId, CorpusId, ListId, DocId )
import Gargantext.Database.Prelude (runOpaQuery, formatPGSQuery, runPGSQuery, DBCmd)
import Gargantext.Database.Query.Join (leftJoin3)
......@@ -79,14 +79,15 @@ insertNgrams ns =
-- TODO-ACCESS: access must not be checked here but when insertNgrams' is called.
insertNgrams' :: [Ngrams] -> DBCmd err [Indexed Int Text]
insertNgrams' ns = runPGSQuery queryInsertNgrams (PGS.Only $ Values fields ns)
insertNgrams' ns = runPGSQuery queryInsertNgrams (PGS.Only $ Values fields ns')
where
fields = map (\t -> QualifiedIdentifier Nothing t) ["text", "int4"]
ns' = (\n -> (_ngramsTerms n, _ngramsSize n)) <$> ns
fields = map (QualifiedIdentifier Nothing) ["text", "int4"]
_insertNgrams_Debug :: [(Text, Size)] -> DBCmd err ByteString
_insertNgrams_Debug ns = formatPGSQuery queryInsertNgrams (PGS.Only $ Values fields ns)
where
fields = map (\t -> QualifiedIdentifier Nothing t) ["text", "int4"]
fields = map (QualifiedIdentifier Nothing) ["text", "int4"]
----------------------
queryInsertNgrams :: PGS.Query
......
......@@ -53,14 +53,14 @@ type NgramsPostagInsert = ( Int
)
toInsert :: NgramsPostag -> NgramsPostagInsert
toInsert (NgramsPostag l a p form lem) =
( toDBid l
, toDBid a
, show p
, view ngramsTerms form
, view ngramsSize form
, view ngramsTerms lem
, view ngramsSize lem
toInsert (NgramsPostag { .. }) =
( toDBid _np_lang
, toDBid _np_algo
, show _np_postag
, view ngramsTerms _np_form
, view ngramsSize _np_form
, view ngramsTerms _np_lem
, view ngramsSize _np_lem
)
insertNgramsPostag :: [NgramsPostag] -> DBCmd err (HashMap Text NgramsId)
......@@ -154,17 +154,18 @@ SELECT terms,id FROM ins_form_ret
-- TODO add lang and postag algo
-- TODO remove when form == lem in insert
selectLems :: Lang -> NLPServerConfig -> [Ngrams] -> DBCmd err [(Form, Lem)]
selectLems l (NLPServerConfig { server }) ns = runPGSQuery querySelectLems (PGS.In (map _ngramsTerms ns), toDBid l, toDBid server)
selectLems l (NLPServerConfig { server }) ns =
runPGSQuery querySelectLems (PGS.In (_ngramsTerms <$> ns), toDBid l, toDBid server)
----------------------
querySelectLems :: PGS.Query
querySelectLems = [sql|
WITH
trms
AS (SELECT id, terms, n
AS (SELECT id, terms
FROM ngrams
WHERE terms IN ?)
, input_rows(lang_id, algo_id, terms,n)
AS (SELECT ? as lang_id, ? as algo_id, terms, n, id
, input_rows
AS (SELECT ? as lang_id, ? as algo_id, terms, id
FROM trms)
, lems AS ( select ir.terms as t1, n2.terms as t2, sum(np.score) as score from input_rows ir
JOIN ngrams_postag np ON np.ngrams_id = ir.id
......@@ -179,29 +180,29 @@ querySelectLems = [sql|
|]
-- | This is the same as 'selectLems', but slower.
selectLems' :: Lang -> NLPServerConfig -> [Ngrams] -> DBCmd err [(Form, Lem)]
selectLems' l (NLPServerConfig { server }) ns = runPGSQuery querySelectLems' (PGS.Only $ Values fields datas)
where
fields = map (QualifiedIdentifier Nothing) ["int4","int4","text", "int4"]
datas = map (\d -> [toField $ toDBid l, toField $ toDBid server] <> toRow d) ns
querySelectLems' :: PGS.Query
querySelectLems' = [sql|
WITH input_rows(lang_id, algo_id, terms,n)
AS (?) -- ((VALUES ('automata' :: "text")))
, lems AS ( select n1.terms as t1 ,n2.terms as t2 ,sum(np.score) as score from input_rows ir
JOIN ngrams n1 ON ir.terms = n1.terms
JOIN ngrams_postag np ON np.ngrams_id = n1.id
JOIN ngrams n2 ON n2.id = np.lemm_id
WHERE np.lang_id = ir.lang_id
AND np.algo_id = ir.algo_id
GROUP BY n1.terms, n2.terms
ORDER BY score DESC
)
SELECT t1,t2 from lems
|]
-- selectLems' :: Lang -> NLPServerConfig -> [Ngrams] -> DBCmd err [(Form, Lem)]
-- selectLems' l (NLPServerConfig { server }) ns = runPGSQuery querySelectLems' (PGS.Only $ Values fields datas)
-- where
-- fields = map (QualifiedIdentifier Nothing) ["int4","int4","text", "int4"]
-- datas = map (\d -> [toField $ toDBid l, toField $ toDBid server] <> toRow d) ns
-- querySelectLems' :: PGS.Query
-- querySelectLems' = [sql|
-- WITH input_rows(lang_id, algo_id, terms,n)
-- AS (?) -- ((VALUES ('automata' :: "text")))
-- , lems AS ( select n1.terms as t1 ,n2.terms as t2 ,sum(np.score) as score from input_rows ir
-- JOIN ngrams n1 ON ir.terms = n1.terms
-- JOIN ngrams_postag np ON np.ngrams_id = n1.id
-- JOIN ngrams n2 ON n2.id = np.lemm_id
-- WHERE np.lang_id = ir.lang_id
-- AND np.algo_id = ir.algo_id
-- GROUP BY n1.terms, n2.terms
-- ORDER BY score DESC
-- )
-- SELECT t1,t2 from lems
-- |]
-- | Insert Table
createTable_NgramsPostag :: DBCmd err [Int]
......
......@@ -317,6 +317,15 @@ nodeContextsScore inputData = map (\(PGS.Only a) -> a)
------------------------------------------------------------------------
-- | Counts the number of documents in a corpus.
-- Also applies filter for category to be at least 1 (i.e. not in trash).
-- select count(*)
-- from contexts c
-- join nodes_contexts nc on c.id = nc.context_id
-- where
-- nc.node_id = 88
-- and nc.category >= 1
-- and c.typename = 4
selectCountDocs :: HasDBid NodeType => CorpusId -> DBCmd err Int
selectCountDocs cId = runCountOpaQuery (queryCountDocs cId)
where
......
......@@ -39,6 +39,10 @@ import Gargantext.Prelude
type NgramsId = Int
type Size = Int
-- | Ngrams table
-- 'n' is the size, see G.D.Q.T.Ngrams -> insertNgrams'
-- function. I.e. ngrams with 1 term are of size 1, ngrams with 2
-- terms are of size 2 etc.
data NgramsPoly id terms n = NgramsDB { _ngrams_id :: !id
, _ngrams_terms :: !terms
, _ngrams_n :: !n
......@@ -90,7 +94,8 @@ instance PGS.ToRow Text where
toRow t = [toField t]
text2ngrams :: Text -> Ngrams
text2ngrams txt = UnsafeNgrams txt' $ length $ splitOn " " txt'
text2ngrams txt = UnsafeNgrams { _ngramsTerms = txt'
, _ngramsSize = length $ splitOn " " txt' }
where
txt' = strip txt
......
......@@ -21,7 +21,9 @@ import Gargantext.Database.Schema.Prelude
import Gargantext.Prelude
-- | Index memory of any type in Gargantext
-- | Index memory of any type in Gargantext.
-- I.e. given entity 'a', we use this type to mark that it has a DB id of type 'i'.
-- An un-indexed entity 'a' might not have been INSERT-ed yet to the DB.
data Indexed i a =
Indexed { _index :: !i
, _unIndex :: !a
......
......@@ -7,22 +7,22 @@
module Test.Offline.JSON (tests) where
import Data.Aeson
import Data.ByteString qualified as B
import Data.ByteString.Lazy.Char8 qualified as C8
import Data.Either
import Gargantext.API.Errors
import Gargantext.API.Node.Corpus.New
import Gargantext.API.Node.Corpus.Types
import Gargantext.API.Node.Types
import Gargantext.Core.Types.Phylo
import Gargantext.Core.Viz.Phylo.API
import Gargantext.Database.Admin.Types.Node
import Paths_gargantext
import Prelude
import Test.Tasty
import Test.Tasty.HUnit
import Test.Tasty.QuickCheck
import Text.RawString.QQ
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy.Char8 as C8
import Paths_gargantext
import Gargantext.Database.Admin.Types.Node
jsonRoundtrip :: (Show a, FromJSON a, ToJSON a, Eq a) => a -> Property
jsonRoundtrip a =
......
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