Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
humanities
gargantext
Commits
d35dd88e
Commit
d35dd88e
authored
Jun 08, 2016
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removing debug comments
parent
1ad5151d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
ngramlists.py
gargantext/views/api/ngramlists.py
+12
-12
No files found.
gargantext/views/api/ngramlists.py
View file @
d35dd88e
...
@@ -206,9 +206,9 @@ class GroupChange(APIView):
...
@@ -206,9 +206,9 @@ class GroupChange(APIView):
# the others params are links to change
# the others params are links to change
couples
=
self
.
links_to_couples
(
params
)
couples
=
self
.
links_to_couples
(
params
)
#
£
debug
# debug
print
(
"==couples from url =================================++++="
)
#
print("==couples from url =================================++++=")
print
(
couples
)
#
print(couples)
# local version of "insert if not exists" -------------------->8--------
# local version of "insert if not exists" -------------------->8--------
# (1) check already existing elements
# (1) check already existing elements
...
@@ -224,18 +224,18 @@ class GroupChange(APIView):
...
@@ -224,18 +224,18 @@ class GroupChange(APIView):
for
synonyms
in
check_query
.
all
():
for
synonyms
in
check_query
.
all
():
existing
[(
synonyms
.
ngram1_id
,
synonyms
.
ngram2_id
)]
=
True
existing
[(
synonyms
.
ngram1_id
,
synonyms
.
ngram2_id
)]
=
True
#
£
debug
# debug
print
(
"==existing"
)
#
print("==existing")
print
(
existing
)
#
print(existing)
# (2) compute difference locally
# (2) compute difference locally
couples_to_add
=
[(
mform
,
sform
)
for
(
mform
,
sform
)
couples_to_add
=
[(
mform
,
sform
)
for
(
mform
,
sform
)
in
couples
in
couples
if
(
mform
,
sform
)
not
in
existing
]
if
(
mform
,
sform
)
not
in
existing
]
#
£
debug
# debug
print
(
"== couples_to_add =================================++++="
)
#
print("== couples_to_add =================================++++=")
print
(
couples_to_add
)
#
print(couples_to_add)
# (3) add new groupings
# (3) add new groupings
...
@@ -268,9 +268,9 @@ class GroupChange(APIView):
...
@@ -268,9 +268,9 @@ class GroupChange(APIView):
# the others params are links to change
# the others params are links to change
couples_to_remove
=
self
.
links_to_couples
(
params
)
couples_to_remove
=
self
.
links_to_couples
(
params
)
#
£
debug
# debug
print
(
"==couples_to_remove=================================dd="
)
#
print("==couples_to_remove=================================dd=")
print
(
couples_to_remove
)
#
print(couples_to_remove)
# remove selectively group_couples
# remove selectively group_couples
# using IN is correct in this case: list of ids is short and external
# using IN is correct in this case: list of ids is short and external
...
...
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