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

Refactoring request for Study export function #1646

Open
4 tasks
laurent-laporte-pro opened this issue Jul 12, 2023 · 0 comments · Fixed by #1669
Open
4 tasks

Refactoring request for Study export function #1646

laurent-laporte-pro opened this issue Jul 12, 2023 · 0 comments · Fixed by #1669
Labels
technical story Technical story

Comments

@laurent-laporte-pro
Copy link
Contributor

Description

This ticket is a technical request in order to refactor the Study export function export_study_flat located in the antarest.study.storage.utils package. The purpose of this function is to copy a Study to a destination directory with the simulation output (if this option is selected).

The current implementation needs improvement in terms of code organization and responsibility separation. I believe the following changes will enhance the overall design and maintainability of the codebase.

  1. Move the export function to the antarest.study.storage.abstract_storage_service module:
    Currently, the export function resides in the utils package. To align with the code structure and improve coherence, I propose relocating the function to the antarest.study.storage.abstract_storage_service module.

  2. Separate file copying and matrix denormalization responsibilities:
    The export function currently combines the tasks of file copying and matrix denormalization. It would be beneficial to separate these responsibilities.

  3. Furthermore, I suggest implementing the denormalization directly within the two calling functions: VariantStudyService.export_study_flat and RawStudyService.export_study_flat. This approach will distribute the responsibility more effectively.

Tasks

  • refactor the code (the function can be renamed if necessary),
  • add the missing documentation,
  • adjust and improve unit tests regarding export_study_flat,
  • make sure VariantStudyService.export_study_flat and RawStudyService.export_study_flat are corectly tested.
@laurent-laporte-pro laurent-laporte-pro added the technical story Technical story label Jul 12, 2023
@laurent-laporte-pro laurent-laporte-pro added this to the v2.15 milestone Jul 12, 2023
TLAIDI pushed a commit that referenced this issue Jul 24, 2023
TLAIDI pushed a commit that referenced this issue Jul 25, 2023
TLAIDI pushed a commit that referenced this issue Jul 25, 2023
@TLAIDI TLAIDI linked a pull request Jul 26, 2023 that will close this issue
TLAIDI pushed a commit that referenced this issue Jul 28, 2023
TLAIDI pushed a commit that referenced this issue Jul 31, 2023
TLAIDI pushed a commit that referenced this issue Jul 31, 2023
TLAIDI pushed a commit that referenced this issue Aug 1, 2023
TLAIDI pushed a commit that referenced this issue Aug 1, 2023
TLAIDI pushed a commit that referenced this issue Aug 1, 2023
@laurent-laporte-pro laurent-laporte-pro changed the title [tech] Refactoring request for Study export function Refactoring request for Study export function Aug 3, 2023
@laurent-laporte-pro laurent-laporte-pro modified the milestones: v2.15, v2.16 Aug 31, 2023
laurent-laporte-pro pushed a commit that referenced this issue Sep 12, 2023
laurent-laporte-pro pushed a commit that referenced this issue Sep 12, 2023
@laurent-laporte-pro laurent-laporte-pro modified the milestones: v2.16, v2.17 Nov 6, 2023
@makdeuneuv makdeuneuv removed this from the v2.17 milestone May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
technical story Technical story
Projects
None yet
3 participants