Skip to content

Commit

Permalink
Update a copule other places to access loadJSONFile from fileio inste…
Browse files Browse the repository at this point in the history
…ad of utils.
  • Loading branch information
LswaN58 committed Nov 29, 2024
1 parent dca62c2 commit dcd76fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/ogd/common/interfaces/outerfaces/TSVOuterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from ogd.common.schemas.games.GameSchema import GameSchema
from ogd.common.schemas.tables.TableSchema import TableSchema
from ogd.common.schemas.configs.IndexingSchema import FileIndexingSchema
from ogd.common.utils import utils
from ogd.common.utils import fileio
from ogd.common.utils.Logger import Logger
from ogd.common.utils.typing import ExportRow
from ogd.common.utils.Readme import Readme
Expand Down Expand Up @@ -305,7 +305,7 @@ def _closeFiles(self) -> None:
def _zipFiles(self) -> None:
existing_datasets = {}
try:
file_directory = utils.loadJSONFile(filename="file_list.json", path=self._data_dir)
file_directory = fileio.loadJSONFile(filename="file_list.json", path=self._data_dir)
existing_datasets = file_directory.get(self._game_id, {})
except FileNotFoundError as err:
Logger.Log("file_list.json does not exist.", logging.WARNING)
Expand Down Expand Up @@ -473,7 +473,7 @@ def _updateFileExportList(self, num_sess: int) -> None:
file_index = {}
existing_datasets = {}
try:
file_index = utils.loadJSONFile(filename="file_list.json", path=self._data_dir)
file_index = fileio.loadJSONFile(filename="file_list.json", path=self._data_dir)
except FileNotFoundError as err:
Logger.Log("file_list.json does not exist.", logging.WARNING)
except json.decoder.JSONDecodeError as err:
Expand Down
4 changes: 2 additions & 2 deletions src/ogd/common/schemas/tables/TableSchema.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from ogd.common.schemas.Schema import Schema
from ogd.common.schemas.tables.ColumnMapSchema import ColumnMapSchema
from ogd.common.schemas.tables.ColumnSchema import ColumnSchema
from ogd.common.utils import utils
from ogd.common.utils import fileio
from ogd.common.utils.Logger import Logger
from ogd.common.utils.typing import Map

Expand Down Expand Up @@ -236,7 +236,7 @@ def FromFile(schema_name:str, schema_path:Path = Path(schemas.__file__).parent /

if not _table_format_name.lower().endswith(".json"):
_table_format_name += ".json"
_schema = utils.loadJSONFile(filename=_table_format_name, path=schema_path)
_schema = fileio.loadJSONFile(filename=_table_format_name, path=schema_path)

return TableSchema.FromDict(name=schema_name, all_elements=_schema)

Expand Down

0 comments on commit dcd76fc

Please sign in to comment.