DiamondLightSource / DiamondLightSource/fastcs

Clear bob files from screen directory

Open
#312 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
6
Forks
8
Avg merge
2d 12h
Merged PRs (30d)
3

Description

Currently, fastCS services PVCs that contains the generated bob files keeps old files. It would be nice to generate new bob files in a temp directory, then delete bob files in the PVC once the new bob files have successfully been generated, then move the new bob files over, upon IOC start-up. This would require a change inserted into:
```python
def create_gui(self, options: EpicsGUIOptions | None = None) -> None:
if options is None:
options = EpicsGUIOptions()

if options.file_format is EpicsGUIFormat.edl:
logger.warning("FastCS may not support all widgets in .edl screens")

assert options.output_path.suffix == options.file_format.value
options.output_path.parent.mkdir(parents=True, exist_ok=True)

components = self.extract_api_components(self._controller_api)
device = Device(label=options.title, children=components)

formatter = DLSFormatter()
formatter.format(device, options.output_path.resolve())
```

## Acceptance Criteria
- Screens directory is appropriately cleared at start-up

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.