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

Code readability improvements #740

Merged
merged 2 commits into from May 1, 2024
Merged

Conversation

tadast
Copy link
Collaborator

@tadast tadast commented May 1, 2024

I was looking at this code for debugging reasons and made a few improvements to make the code easier to understand. No changes in behaviour. See each commit not for rationale.

Extract large result warning logic to dedicated methods so that the
controller action is not so long.
1) the name is misleading, as of a recent refactoring the
generation activity is "lazy", meaning the report generation is not
triggered until it's being accessed. This allows to instantiate
and object and do other opeations on it.

2) The abstraction is not used and just makes the code harder to reason
about. If a different report type is needed, an abstraction can be
added knowing all the context about it, not prematurely...
@yannickwurm yannickwurm merged commit db803cd into wurmlab:master May 1, 2024
3 of 4 checks passed
@tadast tadast deleted the tt/readability branch May 7, 2024 16:48
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.

None yet

2 participants