MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / __init__

Method __init__

env_manager.py:19–32  ·  view source on GitHub ↗

Initializes the EnvManager. It determines the project root and the path to the .env file.

(self, project_root=None)

Source from the content-addressed store, hash-verified

17
18class EnvManager:
19 def __init__(self, project_root=None):
20 """
21 Initializes the EnvManager.
22 It determines the project root and the path to the .env file.
23 """
24 if project_root:
25 self.project_root = project_root
26 else:
27 # The script is in the project root, so just use its directory
28 self.project_root = os.path.dirname(os.path.abspath(__file__))
29
30 self.env_file_path = os.path.join(self.project_root, '.env')
31 # EnvManager is constructed very frequently (per AI/pushover/web call), so
32 # these path lines are DEBUG-only — at INFO they flooded the log ~1/second.
33 logger.debug(f"Project root identified as: {self.project_root}")
34 logger.debug(f".env file path set to: {self.env_file_path}")
35

Callers

nothing calls this directly

Calls 1

infoMethod · 0.80

Tested by

no test coverage detected