MCPcopy
hub / github.com/treeverse/dvc / init

Method init

dvc/config.py:148–159  ·  view source on GitHub ↗

Initializes dvc config. Args: dvc_dir (str): path to .dvc directory. Returns: dvc.config.Config: config object.

(dvc_dir)

Source from the content-addressed store, hash-verified

146
147 @staticmethod
148 def init(dvc_dir):
149 """Initializes dvc config.
150
151 Args:
152 dvc_dir (str): path to .dvc directory.
153
154 Returns:
155 dvc.config.Config: config object.
156 """
157 config_file = os.path.join(dvc_dir, Config.CONFIG)
158 with open(config_file, "w+", encoding="utf-8"):
159 return Config(dvc_dir)
160
161 def merge(self, config):
162 merge(self, config)

Callers 15

setupFunction · 0.45
test_monorepo_relpathFunction · 0.45
test_cleanfs_subrepoFunction · 0.45
test_open_bareFunction · 0.45
test_modified_subrepoFunction · 0.45
test_no_commitsFunction · 0.45

Calls 3

openFunction · 0.85
ConfigClass · 0.85
joinMethod · 0.80