Skip to content

Commit

Permalink
yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
icarosadero committed Jun 23, 2024
1 parent ed3d29e commit ff3465a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pyduino/paths.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import yaml
import warnings

__location__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__)))

Expand All @@ -25,4 +26,8 @@ def read(self,config_path):
self.TENSORBOARD = self.SYSTEM_PARAMETERS.get("tensorboard", None)

PATHS = Paths()
PATHS.read(os.path.join(__location__,"config.yaml"))
if os.path.exists(os.path.join(__location__,"config.yaml")):
PATHS.read(os.path.join(__location__,"config.yaml"))
else:
warnings.warn("No config.yaml file found in the current directory. Please create one.")
PATHS.read(os.path.join(__location__,"config.template.yaml"))

0 comments on commit ff3465a

Please sign in to comment.