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/337 ra2ce result output exporter #357

Merged
merged 5 commits into from
Mar 19, 2024

Conversation

Carsopre
Copy link
Collaborator

No description provided.

@Carsopre Carsopre marked this pull request as ready for review March 18, 2024 13:48
@Carsopre Carsopre linked an issue Mar 18, 2024 that may be closed by this pull request
Copy link
Contributor

@ArdtK ArdtK 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 questions/comments

Copy link
Contributor

Choose a reason for hiding this comment

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

I would assume this class needs an __init__

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am not sure why, there's nothing required to be consumed. At least until further requirements are found we do not need more than this for exporting the current results. Either way we can have a chat about it, not a big deal.

@@ -115,7 +71,7 @@ def run(
)
_results.append(_result_wrapper)

self._save_result(_result_wrapper)
AnalysisResultWrapperExporter().export_result(_result_wrapper)
Copy link
Contributor

Choose a reason for hiding this comment

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

What is not taken into account is that the various analysis modules/packages export much more data than is reflected in the ResultWrapper. I think this needs some rethinking.

Comment on lines +77 to +89
def test_given_valid_result_export_gdf(
self, valid_result_wrapper: AnalysisResultWrapper
):
# 1. Define test data.
valid_result_wrapper.analysis.analysis.save_gpkg = True
self._export_valid_result_to_expected_format(valid_result_wrapper, "gpkg")

def test_given_valid_result_export_csv(
self, valid_result_wrapper: AnalysisResultWrapper
):
# 1. Define test data.
valid_result_wrapper.analysis.analysis.save_csv = True
self._export_valid_result_to_expected_format(valid_result_wrapper, "csv")
Copy link
Contributor

Choose a reason for hiding this comment

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

Why split this test in 2 and not parametrize it on e.g. output_format, adding some minimalistic logic?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Because then I need to create if-elses or other ugly logic to set up save_csv or sve_gpkg . This way they are still self-contained and explanatory. Code duplication is avoided thanks to the _export_valid_result_to_expected_format.

@Carsopre Carsopre merged commit 919b6d7 into master Mar 19, 2024
5 checks passed
@Carsopre Carsopre deleted the feat/337-ra2ce-result-output-exporter branch March 19, 2024 09:14
Carsopre added a commit that referenced this pull request Apr 12, 2024
…porter

Feat/337 ra2ce result output exporter
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.

RA2CE result output exporter
2 participants