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

Features/1646 refactoring request for study function #1669

Merged
merged 13 commits into from
Jul 26, 2023

Conversation

TLAIDI
Copy link
Contributor

@TLAIDI TLAIDI commented Jul 26, 2023

No description provided.

@commit-lint
Copy link

commit-lint bot commented Jul 26, 2023

Code Refactoring

  • export: clean code by removing comments and duplicate code (10e08cd)
  • export: fix litle bug (e4290a8)
  • export: add some improvement (78332b0)
  • export: add again some improvement (ab8b2ce)

Contributors

TLAIDI

Commit-Lint commands

You can trigger Commit-Lint actions by commenting on this PR:

  • @Commit-Lint merge patch will merge dependabot PR on "patch" versions (X.X.Y - Y change)
  • @Commit-Lint merge minor will merge dependabot PR on "minor" versions (X.Y.Y - Y change)
  • @Commit-Lint merge major will merge dependabot PR on "major" versions (Y.Y.Y - Y change)
  • @Commit-Lint merge disable will desactivate merge dependabot PR
  • @Commit-Lint review will approve dependabot PR
  • @Commit-Lint stop review will stop approve dependabot PR

@TLAIDI TLAIDI linked an issue Jul 26, 2023 that may be closed by this pull request
4 tasks
@TLAIDI TLAIDI self-assigned this Jul 26, 2023
self.storage_service.get_storage(target_study).export_study(
target_study, export_path, outputs
)
if target_study.type == "ramstudy":
Copy link
Contributor

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):

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":
Copy link
Contributor

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":
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

@TLAIDI TLAIDI merged commit ef009c9 into dev Jul 26, 2023
@TLAIDI TLAIDI deleted the features/1646-Refactoring-request-for-study-function branch July 26, 2023 12:45
skamril pushed a commit that referenced this pull request Jul 26, 2023
Co-authored-by: LAIDI Takfarinas (Externe) <[email protected]>
Co-authored-by: TLAIDI <[email protected]>
laurent-laporte-pro pushed a commit that referenced this pull request Aug 2, 2023
Co-authored-by: LAIDI Takfarinas (Externe) <[email protected]>
Co-authored-by: TLAIDI <[email protected]>
laurent-laporte-pro pushed a commit that referenced this pull request Aug 2, 2023
Co-authored-by: LAIDI Takfarinas (Externe) <[email protected]>
Co-authored-by: TLAIDI <[email protected]>
laurent-laporte-pro pushed a commit that referenced this pull request Sep 12, 2023
Co-authored-by: LAIDI Takfarinas (Externe) <[email protected]>
Co-authored-by: TLAIDI <[email protected]>
laurent-laporte-pro pushed a commit that referenced this pull request Sep 12, 2023
Co-authored-by: LAIDI Takfarinas (Externe) <[email protected]>
Co-authored-by: TLAIDI <[email protected]>
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.

Refactoring request for Study export function
2 participants