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: GTFS feeds sorting by external_id and country_code #120

Merged
merged 3 commits into from
Oct 5, 2023

Conversation

goorui
Copy link
Contributor

@goorui goorui commented Oct 2, 2023

Summary:

Closes #82

Expected behavior:

Enable sorting on gtfs_feeds api

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Run the unit tests with ./scripts/api-tests.sh to make sure you didn't break anything
  • Format the title like "feat: [new feature short description]". Title must follow the Conventional Commit Specification(https://www.conventionalcommits.org/en/v1.0.0/).
  • Linked all relevant issues
  • Include screenshot(s) showing how this pull request works and fixes the issue(s)

@goorui goorui force-pushed the haorui/gtfs_sorting branch from d282242 to 125343a Compare October 2, 2023 18:52
@goorui goorui changed the title feat: GTFS feeds sorting by external_id and country_cod feat: GTFS feeds sorting by external_id and country_code Oct 2, 2023
@goorui goorui force-pushed the haorui/gtfs_sorting branch from 125343a to 343aab3 Compare October 2, 2023 19:07
def _get_order_by_key(order_by: list[str] = None):
order_by_columns = []
for field in order_by:
if "country_code" in field:

Choose a reason for hiding this comment

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

approving, but wondering if we shouldn't just make it if field == "-country_code" and so on

@indraneel indraneel merged commit ce11352 into main Oct 5, 2023
1 check failed
@indraneel indraneel deleted the haorui/gtfs_sorting branch October 5, 2023 19:11
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.

Add sort options for REST API
3 participants