Commit 73fd9a9b authored by delanoe's avatar delanoe

[CLEAN] Common tools in tools folder please.

parent 4f29821a
......@@ -37,15 +37,6 @@ NODETYPES = [
'TFIDF-GLOBAL', # 14
]
# TODO find somewhere else than constants.py for function
import datetime
import dateutil
def convert_to_date(date):
if isinstance(date, (int, float)):
return datetime.datetime.timestamp(date)
else:
return dateutil.parser.parse(date)
INDEXED_HYPERDATA = {
# TODO use properties during toolchain.hyperdata_indexing
# (type, convert_to_db, convert_from_db)
......
import os
from gargantext.settings import MEDIA_ROOT
import datetime
import dateutil
def convert_to_date(date):
if isinstance(date, (int, float)):
return datetime.datetime.timestamp(date)
else:
return dateutil.parser.parse(date)
def ensure_dir(user):
'''
......
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