From 15486c442cafc19873e2cbdd07c36e18d0a8a5c3 Mon Sep 17 00:00:00 2001 From: Heiru Wu Date: Thu, 12 Oct 2023 23:03:56 +0800 Subject: [PATCH] refactor(config)!: update config file path to avoid collision --- README.md | 2 +- instill/configuration/__init__.py | 2 +- instill/utils/logger.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2de43a6..91c3dd6 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ $ python ### Config `Instill Core` or `Instill Cloud` instance -Before we can start using this SDK, you will need to create a config file under this path `${HOME}/.config/instill/config.yaml`, and within that path you will need to fill in some basic parameters for your desired host.[^1] +Before we can start using this SDK, you will need to create a config file under this path `${HOME}/.config/instill/sdk/python/config.yaml`, and within that path you will need to fill in some basic parameters for your desired host.[^1] [^1]: You can obtain an `api_token`, by simply going to Settings > API Tokens page from the console, no matter it is `Instill Core` or `Instill Cloud`. diff --git a/instill/configuration/__init__.py b/instill/configuration/__init__.py index d97afd8..4899b3f 100644 --- a/instill/configuration/__init__.py +++ b/instill/configuration/__init__.py @@ -9,7 +9,7 @@ CONFIG_DIR = Path( os.getenv( "INSTILL_SYSTEM_CONFIG_PATH", - Path.home() / ".config/instill/", + Path.home() / ".config/instill/sdk/python/", ) ) diff --git a/instill/utils/logger.py b/instill/utils/logger.py index 1327433..3a59c1d 100644 --- a/instill/utils/logger.py +++ b/instill/utils/logger.py @@ -9,8 +9,8 @@ class Logger: @staticmethod def initialize( - runlog_path=f"{home_dir}/.config/instill/run.log", - errorlog_path=f"{home_dir}/.config/instill/error.log", + runlog_path=f"{home_dir}/.config/instill/sdk/python/run.log", + errorlog_path=f"{home_dir}/.config/instill/sdk/python/error.log", ): os.makedirs(os.path.dirname(runlog_path), exist_ok=True) os.makedirs(os.path.dirname(errorlog_path), exist_ok=True)