Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(debug): allow files and folder deletion inside debug view #2147

Merged
merged 7 commits into from
Sep 24, 2024

Conversation

MartinBelthle
Copy link
Contributor

@MartinBelthle MartinBelthle commented Sep 18, 2024

Introduces a new endpoint inside the back-end to fix [ANT-2083]
Samir will also add the front-end part

NB: I didn't specify inside the endpoint signature that it was for the User folder because I think we might use it for other folders such as the one for .yaml models that comes with Andromede modeling

@MartinBelthle MartinBelthle force-pushed the feat/allow-files-deletion-in-debug-view branch from cf2eb65 to b2957c6 Compare September 18, 2024 14:38
@pull-request-size pull-request-size bot added size/L and removed size/M labels Sep 19, 2024
@MartinBelthle MartinBelthle changed the base branch from dev to release/2.17.6 September 19, 2024 14:38
@MartinBelthle MartinBelthle changed the base branch from release/2.17.6 to dev September 19, 2024 14:39
@MartinBelthle MartinBelthle force-pushed the feat/allow-files-deletion-in-debug-view branch from 3285bad to b9ec2a9 Compare September 19, 2024 14:40
@MartinBelthle MartinBelthle changed the base branch from dev to release/2.17.6 September 19, 2024 14:41
@MartinBelthle MartinBelthle force-pushed the feat/allow-files-deletion-in-debug-view branch from b9ec2a9 to 3853ea3 Compare September 19, 2024 14:43
@makdeuneuv makdeuneuv added this to the v2.17.6 milestone Sep 19, 2024
@skamril skamril force-pushed the feat/allow-files-deletion-in-debug-view branch from 3853ea3 to 03371bb Compare September 20, 2024 12:25
@skamril skamril force-pushed the feat/allow-files-deletion-in-debug-view branch from 03371bb to a0a01a5 Compare September 20, 2024 12:43
@skamril skamril force-pushed the feat/allow-files-deletion-in-debug-view branch 2 times, most recently from 5a29460 to bf4ad31 Compare September 20, 2024 14:45
Copy link
Member

@sylvlecl sylvlecl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few change requests

url = [item for item in path.split("/") if item]
if len(url) < 2 or url[0] != "user":
raise FileDeletionNotAllowed(f"the targeted data isn't inside the 'User' folder: {path}")
if url[1] == "expansion":
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probablu used registered files instead of hard coding it here

Copy link
Contributor Author

@MartinBelthle MartinBelthle Sep 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used RegisteredFile.
IMO it doesn't bring a lot as the behavior is still a bit hard coded but it has the merit of using the class and showing how for future devs.

antarest/study/service.py Outdated Show resolved Hide resolved
antarest/study/web/raw_studies_blueprint.py Outdated Show resolved Hide resolved
antarest/study/service.py Outdated Show resolved Hide resolved
@MartinBelthle MartinBelthle force-pushed the feat/allow-files-deletion-in-debug-view branch from 81d55f2 to e0fd6b1 Compare September 24, 2024 12:39
@MartinBelthle MartinBelthle merged commit e4ac565 into release/2.17.6 Sep 24, 2024
8 of 9 checks passed
@MartinBelthle MartinBelthle deleted the feat/allow-files-deletion-in-debug-view branch September 24, 2024 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants