Skip to content

Commit

Permalink
refactor(config)!: update config file path to avoid collision (#35)
Browse files Browse the repository at this point in the history
Because

- avoid path collision with other `Instill` product config file

This commit

- update config file path to have product scope prefixes: `sdk/python`
  • Loading branch information
heiruwu authored Oct 12, 2023
1 parent 8468f62 commit 0b5b3bd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand Down
2 changes: 1 addition & 1 deletion instill/configuration/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
CONFIG_DIR = Path(
os.getenv(
"INSTILL_SYSTEM_CONFIG_PATH",
Path.home() / ".config/instill/",
Path.home() / ".config/instill/sdk/python/",
)
)

Expand Down
4 changes: 2 additions & 2 deletions instill/utils/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0b5b3bd

Please sign in to comment.