Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
155
Issues
155
List
Board
Labels
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
3f8ab4b7
Commit
3f8ab4b7
authored
Jan 29, 2025
by
Yoelis Acourt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: remove pTrace from the build
parent
9d00b73f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
6 deletions
+2
-6
TSV.hs
src/Gargantext/Core/Text/Corpus/Parsers/TSV.hs
+2
-4
Insert.hs
src/Gargantext/Database/Query/Table/Node/Document/Insert.hs
+0
-2
No files found.
src/Gargantext/Core/Text/Corpus/Parsers/TSV.hs
View file @
3f8ab4b7
...
@@ -28,7 +28,6 @@ import Data.Vector qualified as V
...
@@ -28,7 +28,6 @@ import Data.Vector qualified as V
import
Gargantext.Database.Admin.Types.Hyperdata.Document
(
HyperdataDocument
(
..
)
)
import
Gargantext.Database.Admin.Types.Hyperdata.Document
(
HyperdataDocument
(
..
)
)
import
Gargantext.Prelude
hiding
(
length
,
show
)
import
Gargantext.Prelude
hiding
(
length
,
show
)
import
Protolude
import
Protolude
import
Debug.Pretty.Simple
data
TsvGargV3
=
TsvGargV3
data
TsvGargV3
=
TsvGargV3
...
@@ -245,11 +244,10 @@ testCorrectFile bs =
...
@@ -245,11 +244,10 @@ testCorrectFile bs =
-- use a map to remove \r that sometimes appear at the end of a line
-- use a map to remove \r that sometimes appear at the end of a line
testAllHeadersPresence
::
[
Text
]
->
Either
Text
[
Text
]
testAllHeadersPresence
::
[
Text
]
->
Either
Text
[
Text
]
testAllHeadersPresence
headers
=
pTraceShow
(
"CALL: "
++
show
headers
)
$
do
testAllHeadersPresence
headers
=
do
let
listHeaders
=
filter
(`
notElem
`
(
map
(
T
.
replace
(
T
.
pack
"
\r
"
)
(
T
.
pack
""
))
headers
))
[
"Publication Day"
,
"Publication Month"
,
"Publication Year"
,
"Authors"
,
"Title"
,
"Source"
,
"Abstract"
,
"From Country"
]
let
listHeaders
=
filter
(`
notElem
`
(
map
(
T
.
replace
(
T
.
pack
"
\r
"
)
(
T
.
pack
""
))
headers
))
[
"Publication Day"
,
"Publication Month"
,
"Publication Year"
,
"Authors"
,
"Title"
,
"Source"
,
"Abstract"
,
"From Country"
]
let
toto
=
if
null
listHeaders
then
Right
headers
else
Left
((
pack
" Missing column : "
)
<>
T
.
intercalate
", "
listHeaders
)
if
null
listHeaders
then
Right
headers
else
Left
((
pack
" Missing column : "
)
<>
T
.
intercalate
", "
listHeaders
)
pTraceShow
(
"RETURN TOTO"
++
show
toto
)
$
toto
getHeaders
::
[
BL
.
ByteString
]
->
Delimiter
->
Either
Text
[
Text
]
getHeaders
::
[
BL
.
ByteString
]
->
Delimiter
->
Either
Text
[
Text
]
getHeaders
bl
del
=
do
getHeaders
bl
del
=
do
...
...
src/Gargantext/Database/Query/Table/Node/Document/Insert.hs
View file @
3f8ab4b7
...
@@ -73,7 +73,6 @@ import Gargantext.Database.Schema.Node (NodePoly(..))
...
@@ -73,7 +73,6 @@ import Gargantext.Database.Schema.Node (NodePoly(..))
import
Gargantext.Defaults
qualified
as
Defaults
import
Gargantext.Defaults
qualified
as
Defaults
import
Gargantext.Prelude
hiding
(
hash
,
toLower
)
import
Gargantext.Prelude
hiding
(
hash
,
toLower
)
import
Gargantext.Prelude.Crypto.Hash
(
hash
)
import
Gargantext.Prelude.Crypto.Hash
(
hash
)
import
Debug.Pretty.Simple
{-| To Print result query
{-| To Print result query
import Data.ByteString.Internal (ByteString)
import Data.ByteString.Internal (ByteString)
import Database.PostgreSQL.Simple (formatQuery)
import Database.PostgreSQL.Simple (formatQuery)
...
@@ -102,7 +101,6 @@ insertDb userId parentId items =
...
@@ -102,7 +101,6 @@ insertDb userId parentId items =
sqlValues
=
Values
fields
preparedItems
sqlValues
=
Values
fields
preparedItems
in
in
pTraceShow
(
"LOOK"
,
preparedItems
)
$
runPGSQuery
queryInsert
(
Only
sqlValues
)
runPGSQuery
queryInsert
(
Only
sqlValues
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment