Skip to content

raise an error if new files are found in project folder before reset()#380

Open
Gautzilla wants to merge 8 commits into
Project-OSmOSE:mainfrom
Gautzilla:reset-with-added-files-raise
Open

raise an error if new files are found in project folder before reset()#380
Gautzilla wants to merge 8 commits into
Project-OSmOSE:mainfrom
Gautzilla:reset-with-added-files-raise

Conversation

@Gautzilla
Copy link
Copy Markdown
Contributor

Calling project.reset() on a project that contains additionnal files/folders in its root folder will now raise an error:

RuntimeError: The following files would be deleted by a reset.
Either delete them manually or move them to the C:\Users\berthoga\Documents\Datasets\example_dataset\other folder before resetting the project:
yo.txt
RonSwansonDoneAndDoneGIF

resolves #379

@Gautzilla Gautzilla self-assigned this May 13, 2026
@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented May 13, 2026

Coverage Status

coverage: 98.862% (+0.004%) from 98.858% — Gautzilla:reset-with-added-files-raise into Project-OSmOSE:main

@Gautzilla Gautzilla added the Enhancement Something that could be done in a better way label May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Something that could be done in a better way

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Project.reset() deletes files that have been placed in the project folder after build

2 participants