Skip to content

Commit

Permalink
Adds environment variable to change hamilton config location
Browse files Browse the repository at this point in the history
This is for flexibility in determining where to look for the
config file.
  • Loading branch information
skrawcz committed Nov 16, 2024
1 parent 7efa5be commit da13c36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hamilton/telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
EXPERIMENT_SERVER = "os_hamilton_experiment_server"
TIMEOUT = 2
MAX_COUNT_SESSION = 100 # max number of events collected per python process

DEFAULT_CONFIG_LOCATION = os.path.expanduser("~/.hamilton.conf")
DEFAULT_CONFIG_URI = os.environ.get("HAMILTON_CONFIG_URI", "~/.hamilton.conf")
DEFAULT_CONFIG_LOCATION = os.path.expanduser(DEFAULT_CONFIG_URI)


def _load_config(config_location: str) -> configparser.ConfigParser:
Expand Down

0 comments on commit da13c36

Please sign in to comment.