From 4c234fdff44f0f5e440d34be8dca9f8f440967a8 Mon Sep 17 00:00:00 2001 From: Marcell Nagy Date: Tue, 14 Jan 2025 17:11:26 +0000 Subject: [PATCH] Allow use of relative file paths --- src/fastcs/transport/epics/gui.py | 2 +- src/fastcs/transport/epics/options.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fastcs/transport/epics/gui.py b/src/fastcs/transport/epics/gui.py index e866f88a..f07a6357 100644 --- a/src/fastcs/transport/epics/gui.py +++ b/src/fastcs/transport/epics/gui.py @@ -122,7 +122,7 @@ def create_gui(self, options: EpicsGUIOptions | None = None) -> None: device = Device(label=options.title, children=components) formatter = DLSFormatter() - formatter.format(device, options.output_path) + formatter.format(device, options.output_path.resolve()) def extract_mapping_components(self, mapping: SingleMapping) -> Tree: components: Tree = [] diff --git a/src/fastcs/transport/epics/options.py b/src/fastcs/transport/epics/options.py index c70fa220..b24d11de 100644 --- a/src/fastcs/transport/epics/options.py +++ b/src/fastcs/transport/epics/options.py @@ -5,7 +5,7 @@ @dataclass class EpicsDocsOptions: - path: Path = Path.cwd() + path: Path = Path(".") depth: int | None = None @@ -16,7 +16,7 @@ class EpicsGUIFormat(Enum): @dataclass class EpicsGUIOptions: - output_path: Path = Path.cwd() / "output.bob" + output_path: Path = Path(".") / "output.bob" file_format: EpicsGUIFormat = EpicsGUIFormat.bob title: str = "Simple Device"