Commit b345bfe0 authored by PIOLLE's avatar PIOLLE

fixed circular import

parent 88578ece
......@@ -124,7 +124,7 @@ def search(
# complete with full path name if required
if fullpath:
datastore = FileLocator(configfile)
datastore = FileLocator(config)
for granule in res['data']:
granule.granule = datastore.get_full_path(granule.granule, name)
......
......@@ -11,9 +11,6 @@ Class to locate granules indexed in Naiad
.. codeauthor:: Jeff Piolle <jfpiolle@ifremer.fr>
"""
from pathlib import Path
from dateutil import parser
from naiad import config_file
class FileLocator(object):
......@@ -26,8 +23,8 @@ class FileLocator(object):
NAIAD_HOME env variable or by default in the default
``.naiad/search.yaml`` file in the user home directory.
"""
def __init__(self, config: str = None):
self.config = config_file(config)
def __init__(self, config):
self.config = config
def get_full_path(self, granule, dataset_id):
try:
......
......@@ -40,7 +40,8 @@ setup(
install_requires=[
'colorama',
'python-dateutil',
'elasticsearch<7'
'elasticsearch<7',
'pyproj'
],
package_data={'naiad/utils': ['datastore.cfg', 'toolstore.cfg']},
)
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