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

batchRoute: Refactor result handling #606

Merged
merged 4 commits into from Mar 22, 2023

Conversation

tahini
Copy link
Collaborator

@tahini tahini commented Mar 16, 2023

As part of the work to handle checkpoints and job resume, this extracts the result handling to its own class, like it is already done in the batch accessibility map calculation.

The main batchRoute method is refactored to be handled by a class, with parameters and options as local fields, that can more easily be split in modular chunks

@tahini tahini requested a review from kaligrafy March 16, 2023 15:26
More arguments will be added to support checkpointing the batch
calculation task. Instead of ordered arguments, we put them in a single
options argument.
Extract the function that gets the csv attributes to a
`ResultAttributes.ts` file, to make sure the result object is always
identical for a given calculation and does not change in one place,
without updating the other.
Similar to the accessibility map result processor, the result processing
for batch routing is extracted to a Result class, which handles the file
creation, update and ending.
This moves the batch routing execution in a class, where the main
function can be more easily split into smaller chunks, using class
fields, easier to maintain and enhance.
@tahini tahini force-pushed the batchRouteResultRefactoring branch from 8eeb4a7 to 0c03938 Compare March 17, 2023 18:42
@tahini tahini merged commit 10c46ce into chairemobilite:main Mar 22, 2023
4 checks passed
@tahini tahini deleted the batchRouteResultRefactoring branch March 22, 2023 13:05
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