Skip to content

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

Merged
Gautzilla merged 9 commits into
Project-OSmOSE:mainfrom
Gautzilla:reset-with-added-files-raise
May 28, 2026
Merged

raise an error if new files are found in project folder before reset()#380
Gautzilla merged 9 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.878% (+0.005%) from 98.873% — 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
@Gautzilla Gautzilla merged commit 6b56820 into Project-OSmOSE:main May 28, 2026
2 checks passed
@Gautzilla Gautzilla deleted the reset-with-added-files-raise branch May 28, 2026 12:06
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

3 participants