Skip to content

Commit

Permalink
bugfix: use the script path to detect the config files path.
Browse files Browse the repository at this point in the history
The path for the config files was hardcoded and this was creating errors.

Instead of hardcoding ./src/ , we are using the script path, so it
will detect the right path when running on the docker image, where
the directory is /app/ instead of ./src/ .
  • Loading branch information
lmello committed Sep 9, 2024
1 parent ac63c15 commit 8242aeb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/opencost_parquet_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,13 +285,13 @@ def main():
print("Starting run")
print("Load data types")
data_types = load_config_file(
file_path='./src/data_types.json') # TODO: Make path ENV var
file_path=f'{os.path.dirname(os.path.abspath(__file__))}/data_types.json')
print("Load renaming coloumns")
rename_cols = load_config_file(
file_path='./src/rename_cols.json') # TODO: Make path ENV var
file_path=f'{os.path.dirname(os.path.abspath(__file__))}/rename_cols.json')
print("Load allocation keys to ignore")
ignore_alloc_keys = load_config_file(
file_path='./src/ignore_alloc_keys.json') # TODO: Make path ENV var
file_path=f'{os.path.dirname(os.path.abspath(__file__))}/ignore_alloc_keys.json')

print("Build config")
config = get_config()
Expand Down

0 comments on commit 8242aeb

Please sign in to comment.