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

B07 get base report simplifications #397

Merged
merged 5 commits into from
Jan 15, 2024

Conversation

SNSubramanya
Copy link
Contributor

some basic refactoring to remove redundant code from get base report

@SNSubramanya SNSubramanya linked an issue Jan 10, 2024 that may be closed by this pull request
Signed-off-by: Soumya Subramanya <[email protected]>
Signed-off-by: Soumya Subramanya <[email protected]>
@SNSubramanya SNSubramanya force-pushed the B07-get-base-report-simplifications branch from c8bed6e to ae8fcc8 Compare January 10, 2024 14:51
Signed-off-by: Soumya Subramanya <[email protected]>

fix formatting

Signed-off-by: Soumya Subramanya <[email protected]>

fix formatting

Signed-off-by: Soumya Subramanya <[email protected]>

fix more formatting

Signed-off-by: Soumya Subramanya <[email protected]>
@SNSubramanya SNSubramanya force-pushed the B07-get-base-report-simplifications branch from 1a2581f to 96c1237 Compare January 10, 2024 15:01
@SNSubramanya SNSubramanya marked this pull request as ready for review January 10, 2024 15:02
Copy link
Contributor

@marcemmers marcemmers left a comment

Choose a reason for hiding this comment

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

Some small suggestions

@@ -222,8 +209,8 @@ class DeviceModel {
/// \param component_criteria
/// \return
std::vector<ReportData>
get_custom_report_data(const std::optional<std::vector<ComponentVariable>>& component_variables = std::nullopt,
const std::optional<std::vector<ComponentCriterionEnum>>& component_criteria = std::nullopt);
get_report_data(const std::optional<std::vector<ComponentVariable>>& component_variables = std::nullopt,
Copy link
Contributor

Choose a reason for hiding this comment

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

I preferred the get_custom_report_data name since it really makes clear what this function is for too.

get_report_data(const std::optional<ReportBaseEnum>& report_base = std::nullopt,
const std::optional<std::vector<ComponentVariable>>& component_variables = std::nullopt,
const std::optional<std::vector<ComponentCriterionEnum>>& component_criteria = std::nullopt);
std::vector<ReportData> get_base_report_data(const std::optional<ReportBaseEnum>& report_base = std::nullopt);
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this still need to be an optional? I assume it is now an always required variable here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i guess not

Signed-off-by: Soumya Subramanya <[email protected]>
Signed-off-by: Soumya Subramanya <[email protected]>
@SNSubramanya SNSubramanya merged commit 8d7642d into main Jan 15, 2024
2 of 3 checks passed
@SNSubramanya SNSubramanya deleted the B07-get-base-report-simplifications branch January 15, 2024 13:29
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.

B07: Get base report - simplifications
2 participants