-
Notifications
You must be signed in to change notification settings - Fork 6
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
Features/1646 refactoring request for study function #1669
Features/1646 refactoring request for study function #1669
Conversation
Code Refactoring
ContributorsCommit-Lint commandsYou can trigger Commit-Lint actions by commenting on this PR:
|
antarest/study/service.py
Outdated
self.storage_service.get_storage(target_study).export_study( | ||
target_study, export_path, outputs | ||
) | ||
if target_study.type == "ramstudy": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you meant rawstudy. To avoid this type of confusion, we usually do this in the code :
if isinstance(target_study, RawStudy):
antarest/study/service.py
Outdated
return self.storage_service.get_storage(study).export_study_flat( | ||
study, dest, len(output_list or []) > 0, output_list | ||
path_study = Path(study.path) | ||
if study.type == "rawstudy": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
@@ -272,7 +330,16 @@ def export_study( | |||
logger.info(f"Exporting study {metadata.id} to tmp path {tmpdir}") | |||
assert_this(target.name.endswith(".zip")) | |||
tmp_study_path = Path(tmpdir) / "tmp_copy" | |||
self.export_study_flat(metadata, tmp_study_path, outputs) | |||
if metadata.type != "rawstudy": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
…https://github.com/AntaresSimulatorTeam/AntaREST into features/1646-Refactoring-request-for-study-function
Co-authored-by: LAIDI Takfarinas (Externe) <[email protected]> Co-authored-by: TLAIDI <[email protected]>
Co-authored-by: LAIDI Takfarinas (Externe) <[email protected]> Co-authored-by: TLAIDI <[email protected]>
Co-authored-by: LAIDI Takfarinas (Externe) <[email protected]> Co-authored-by: TLAIDI <[email protected]>
Co-authored-by: LAIDI Takfarinas (Externe) <[email protected]> Co-authored-by: TLAIDI <[email protected]>
Co-authored-by: LAIDI Takfarinas (Externe) <[email protected]> Co-authored-by: TLAIDI <[email protected]>
No description provided.