Skip to content

raise a ValueError when user tries to delete an unexisting transform#377

Merged
Gautzilla merged 1 commit into
Project-OSmOSE:mainfrom
Gautzilla:unexisting-output-deletion-warning
May 12, 2026
Merged

raise a ValueError when user tries to delete an unexisting transform#377
Gautzilla merged 1 commit into
Project-OSmOSE:mainfrom
Gautzilla:unexisting-output-deletion-warning

Conversation

@Gautzilla
Copy link
Copy Markdown
Contributor

This PR adds a ValueError raising if Project.delete_transform_with_outputs() is called with an unexisting transform name:

project.delete_transform_with_outputs("Maellezilla")

Traceback (most recent call last):
  File "C:\Users\berthoga\Documents\GitHub\OSEkit\.venv\Lib\site-packages\IPython\core\interactiveshell.py", line 3701, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
    ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<ipython-input-10-438fc50a0a98>", line 1, in <module>
    project.delete_transform_with_outputs("Maellezilla")
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "C:\Users\berthoga\Documents\GitHub\OSEkit\src\osekit\public\project.py", line 749, in delete_transform_with_outputs
    raise ValueError(message)
ValueError: Transform 'Maellezilla' not found.

resolves #370

@Gautzilla Gautzilla requested a review from MaelleTtrt May 6, 2026 14:03
@Gautzilla Gautzilla self-assigned this May 6, 2026
@coveralls
Copy link
Copy Markdown
Collaborator

Coverage Status

coverage: 98.841% (+0.002%) from 98.839% — Gautzilla:unexisting-output-deletion-warning into Project-OSmOSE:main

@Gautzilla Gautzilla merged commit 46e201a into Project-OSmOSE:main May 12, 2026
2 checks passed
@Gautzilla Gautzilla deleted the unexisting-output-deletion-warning branch May 12, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add warning when trying to delete an unexisting output

3 participants