Skip to content

Conversation

@br648
Copy link

@br648 br648 commented Aug 21, 2025

Checklist

  • Appropriate branch selected (all PRs must first be merged to dev before they can be merged to master)
  • Any modified or new methods or classes have helpful JavaDoc and code is thoroughly commented
  • The description lists all applicable issues this PR seeks to resolve
  • The description lists any configuration setting(s) that differ from the default settings
  • All tests and CI builds passing
  • The description lists all relevant PRs included in this release (remove this if not merging to master)
  • Code coverage does not significantly worsen (ideally it improves) (remove this if not merging to master)

Description

Merge route networks into routes.

Copy link

@binh-dam-ibigroup binh-dam-ibigroup left a comment

Choose a reason for hiding this comment

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

route_networks.txt is exported incorrectly with the headers and content mixed up.

/**
* Create a CSV row from original fields plus grouped (stop areas or route network) ids.
*/
protected static String createRow(CsvReader stopsReader, String ids, String[] csvFields) throws IOException {

Choose a reason for hiding this comment

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

Rename stopsReader to csvReader.

Copy link
Author

Choose a reason for hiding this comment

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

Fixed in: 82684ac

Choose a reason for hiding this comment

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

Rename stopsReader back to csvReader.

Copy link
Author

Choose a reason for hiding this comment

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

Fixed in: a65a86a

Comment on lines 106 to 108
"%s,%s%n",
String.join(",", CSV_FIELDS),
ROUTE_NETWORK_IDS_FIELD

Choose a reason for hiding this comment

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

Nit: Is there is a better way to concat one item to an array, or is a preset array or a list better for this purpose?

Copy link
Author

Choose a reason for hiding this comment

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

What about this? Not sure if it is any better: 82684ac

Choose a reason for hiding this comment

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

Yeah, no, can you revert?

Copy link
Author

Choose a reason for hiding this comment

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

Reverted: d63eaca

Copy link
Author

Choose a reason for hiding this comment

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

@binh-dam-ibigroup I've reverted these two changes. Is this good to go now?

@br648 br648 assigned binh-dam-ibigroup and unassigned br648 Aug 26, 2025

private static final String CSV_HEADER_FOR_EXPORT = String.format(
"%s",
String.join(",", CSV_FIELDS)

Choose a reason for hiding this comment

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

Remove String.format.

Copy link

@binh-dam-ibigroup binh-dam-ibigroup left a comment

Choose a reason for hiding this comment

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

Latest changes seem to work. Consider including the refactors from #17.

refactor(Entity): Extract logic for printing col after existing ones.
@br648 br648 merged commit bf7aaa9 into feature/DT-448-fares-v2 Aug 27, 2025
2 checks passed
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.

3 participants