Skip to content

[Feature] catch existing atlas files early in atlas generation script rather than at the end #731

@PolarBean

Description

@PolarBean

Embarrasingly often I get the following error after running a long atlas generation script.
I understand the desire to not automatically overwrite files but we could potentially move this to the beginning of the atlas generation template rather than occuring at the end.

  File "/home/harryc/github/brainglobe-atlasapi/brainglobe_atlasapi/bg_atlas.py", line 88, in __init__
    if self.local_full_name is None:
       ^^^^^^^^^^^^^^^^^^^^
  File "/home/harryc/github/brainglobe-atlasapi/brainglobe_atlasapi/bg_atlas.py", line 145, in local_full_name
    raise FileExistsError(
FileExistsError: Multiple versions of atlas carea_mouse_25um in /home/harryc/brainglobe_workingdir/carea_mouse

We could also add an argument here which allows the atlas generator to overwrite existing files https://github.com/brainglobe/brainglobe-atlasapi/blob/main/brainglobe_atlasapi/atlas_generation/wrapup.py#L288-L292

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions