Skip to content

Commit

Permalink
1. move the StorageEngine outof __init__ file
Browse files Browse the repository at this point in the history
2. Add dependency
  • Loading branch information
xzdandy committed Oct 23, 2020
1 parent a4a6265 commit f914c47
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 14 deletions.
9 changes: 5 additions & 4 deletions api-docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@
import os
import sys

sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(0, os.path.abspath('../src2/'))
sys.path.insert(0, os.path.abspath('../src/'))
sys.path.append(os.path.abspath('.'))
sys.path.append(os.path.abspath('../'))

#sys.path.insert(0, os.path.abspath('../src2/'))
#sys.path.insert(0, os.path.abspath('../src/'))

print('Sys paths:')
for pathx in sys.path:
Expand Down
2 changes: 2 additions & 0 deletions script/install/conda_eva_environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ dependencies:
- mock
- pytest-asyncio
- flake8
- sphinx
- sphinx_rtd_theme
- pip:
- antlr4-python3-runtime==4.8
- petastorm
Expand Down
2 changes: 1 addition & 1 deletion src/executor/create_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from src.planner.create_plan import CreatePlan
from src.executor.abstract_executor import AbstractExecutor
from src.utils.generic_utils import generate_file_path
from src.storage import StorageEngine
from src.storage.storage_engine import StorageEngine


class CreateExecutor(AbstractExecutor):
Expand Down
2 changes: 1 addition & 1 deletion src/executor/insert_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from src.catalog.column_type import ColumnType
from src.planner.insert_plan import InsertPlan
from src.executor.abstract_executor import AbstractExecutor
from src.storage import StorageEngine
from src.storage.storage_engine import StorageEngine
from src.utils.logging_manager import LoggingLevel
from src.utils.logging_manager import LoggingManager

Expand Down
2 changes: 1 addition & 1 deletion src/executor/load_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

from src.planner.load_data_plan import LoadDataPlan
from src.executor.abstract_executor import AbstractExecutor
from src.storage import StorageEngine
from src.storage.storage_engine import StorageEngine
from src.readers.opencv_reader import OpenCVReader


Expand Down
2 changes: 1 addition & 1 deletion src/executor/storage_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from src.models.storage.batch import Batch
from src.executor.abstract_executor import AbstractExecutor
from src.planner.storage_plan import StoragePlan
from src.storage import StorageEngine
from src.storage.storage_engine import StorageEngine


class StorageExecutor(AbstractExecutor):
Expand Down
5 changes: 0 additions & 5 deletions src/storage/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,4 @@
"""
storage subdirectory
"""
from src.configuration.configuration_manager import ConfigurationManager
from src.utils.generic_utils import str_to_class

StorageEngine = str_to_class(
ConfigurationManager().get_value(
"storage", "engine"))()
6 changes: 6 additions & 0 deletions src/storage/storage_engine.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from src.configuration.configuration_manager import ConfigurationManager
from src.utils.generic_utils import str_to_class

StorageEngine = str_to_class(
ConfigurationManager().get_value(
"storage", "engine"))()
2 changes: 1 addition & 1 deletion test/integration_tests/test_load_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

from src.catalog.catalog_manager import CatalogManager
from src.models.storage.batch import Batch
from src.storage import StorageEngine
from src.storage.storage_engine import StorageEngine

from test.util import create_sample_video, create_dummy_batches, perform_query

Expand Down

0 comments on commit f914c47

Please sign in to comment.