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
12bde11b
Commit
12bde11b
authored
Nov 04, 2016
by
delanoe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] Import List scheduled.
parent
0b3d2e61
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
settings.py
gargantext/settings.py
+1
-0
ngramlists.py
gargantext/views/api/ngramlists.py
+10
-9
No files found.
gargantext/settings.py
View file @
12bde11b
...
...
@@ -43,6 +43,7 @@ CELERY_IMPORTS = (
"graph.graph"
,
"moissonneurs.pubmed"
,
"moissonneurs.istex"
,
"gargantext.util.ngramlists_tools"
,
)
...
...
gargantext/views/api/ngramlists.py
View file @
12bde11b
...
...
@@ -7,13 +7,14 @@ API views for advanced operations on ngrams and ngramlists
- modify NodeNgramNgram groups (PUT/DEL a list of groupings like {"767[]":[209,640],"779[]":[436,265,385]}")
"""
from
gargantext.util.http
import
APIView
,
get_parameters
,
JsonHttpResponse
,
\
ValidationException
,
Http404
,
HttpResponse
from
gargantext.util.db
import
session
,
aliased
,
bulk_insert
from
gargantext.util.db_cache
import
cache
from
sqlalchemy
import
tuple_
from
gargantext.models
import
Ngram
,
NodeNgram
,
NodeNodeNgram
,
NodeNgramNgram
,
Node
from
gargantext.util.lists
import
UnweightedList
,
Translations
from
gargantext.util.http
import
APIView
,
get_parameters
,
JsonHttpResponse
,
\
ValidationException
,
Http404
,
HttpResponse
from
gargantext.util.db
import
session
,
aliased
,
bulk_insert
from
gargantext.util.db_cache
import
cache
from
sqlalchemy
import
tuple_
from
gargantext.models
import
Ngram
,
NodeNgram
,
NodeNodeNgram
,
NodeNgramNgram
,
Node
from
gargantext.util.lists
import
UnweightedList
,
Translations
from
gargantext.util.scheduling
import
scheduled
# useful subroutines
from
gargantext.util.ngramlists_tools
import
query_list
,
export_ngramlists
,
\
...
...
@@ -21,7 +22,6 @@ from gargantext.util.ngramlists_tools import query_list, export_ngramlists, \
import_and_merge_ngramlists
from
gargantext.util.group_tools
import
query_grouped_ngrams
class
List
(
APIView
):
"""
see already available API query api/nodes/<list_id>?fields[]=ngrams
...
...
@@ -89,7 +89,8 @@ class CSVLists(APIView):
# import the csv
# try:
log_msg
=
import_and_merge_ngramlists
(
csv_contents
,
log_msg
=
"Async generation"
scheduled
(
import_and_merge_ngramlists
)(
csv_contents
,
onto_corpus_id
=
corpus_node
.
id
)
return
JsonHttpResponse
({
'log'
:
log_msg
,
...
...
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