Skip to content

feat: JBDA import#1407

Merged
cka-y merged 18 commits into
mainfrom
feat/pt-154
Oct 28, 2025
Merged

feat: JBDA import#1407
cka-y merged 18 commits into
mainfrom
feat/pt-154

Conversation

@cka-y
Copy link
Copy Markdown
Contributor

@cka-y cka-y commented Oct 20, 2025

Summary:
Closes https://github.com/MobilityData/product-tasks/issues/154
Closes https://github.com/MobilityData/product-tasks/issues/132
This PR support for "related links" on feeds, adds a new JBDA import task, and includes associated model, API, and test updates. The most significant changes are the addition of the FeedRelatedLink model and its integration into feed objects, updates to the API schema and database handling, and the implementation and testing of the JBDA import workflow.
Schedule feed:
image

Realtime feed:
image

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
  • Add or update any needed documentation to the repo
  • 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)

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Oct 20, 2025

*Lighthouse ran on https://mobility-feeds-dev--pr-1407-3zugjph7.web.app/ * (Desktop)
⚡️ HTML Report Lighthouse report for the changes in this PR:

Performance Accessibility Best Practices SEO
🟠 57 🟢 100 🟢 100 🟢 100

*Lighthouse ran on https://mobility-feeds-dev--pr-1407-3zugjph7.web.app/feeds * (Desktop)
⚡️ HTML Report Lighthouse report for the changes in this PR:

Performance Accessibility Best Practices SEO
🟠 75 🟢 91 🟢 100 🟢 100

*Lighthouse ran on https://mobility-feeds-dev--pr-1407-3zugjph7.web.app/feeds/gtfs/mdb-2126 * (Desktop)
⚡️ HTML Report Lighthouse report for the changes in this PR:

Performance Accessibility Best Practices SEO
🟠 52 🟢 95 🟢 100 🟢 100

*Lighthouse ran on https://mobility-feeds-dev--pr-1407-3zugjph7.web.app/feeds/gtfs_rt/mdb-2585 * (Desktop)
⚡️ HTML Report Lighthouse report for the changes in this PR:

Performance Accessibility Best Practices SEO
🟢 90 🟠 88 🟢 100 🟢 100

*Lighthouse ran on https://mobility-feeds-dev--pr-1407-3zugjph7.web.app/gbfs/gbfs-flamingo_porirua * (Desktop)
⚡️ HTML Report Lighthouse report for the changes in this PR:

Performance Accessibility Best Practices SEO
🟢 100 🟢 100 🟢 100 🟢 100

@github-actions
Copy link
Copy Markdown

Preview Firebase Hosting URL: https://mobility-feeds-dev--pr-1407-3zugjph7.web.app

@cka-y cka-y changed the title Feat/pt 154 feat: JBDA import Oct 20, 2025
@cka-y cka-y marked this pull request as ready for review October 20, 2025 16:27
@Alessandro100
Copy link
Copy Markdown
Contributor

[Question] For the Related Links section in the UI, is this solely reserved for future gtfs feed url, or can it be anything related to the feed?

Comment thread web-app/src/app/screens/Feed/components/FeedSummary.tsx Outdated
@cka-y
Copy link
Copy Markdown
Contributor Author

cka-y commented Oct 20, 2025

[Question] For the Related Links section in the UI, is this solely reserved for future gtfs feed url, or can it be anything related to the feed?

It can be any related link. From the JBDA api i was only able to retrieve next_1 links, but their api supports next_1, next_2, prev_1 and prev_2. I also made the type generic enough so that it can be used for any feeds (including rt and gbfs)

@Alessandro100
Copy link
Copy Markdown
Contributor

[Question] For the Related Links section in the UI, is this solely reserved for future gtfs feed url, or can it be anything related to the feed?

It can be any related link. From the JBDA api i was only able to retrieve next_1 links, but their api supports next_1, next_2, prev_1 and prev_2. I also made the type generic enough so that it can be used for any feeds (including rt and gbfs)

When I see 'Related links' I assume it could mean anything ex: social media urls, feeds, news about them, etc. If this is about feeds, I'd rename it to Related Feeds. And rename "next_1" -> "Future Feed", next_2 -> "Future Feed (2)", "prev_1" -> "Previous Feed" etc.

@cka-y
Copy link
Copy Markdown
Contributor Author

cka-y commented Oct 20, 2025

[Question] For the Related Links section in the UI, is this solely reserved for future gtfs feed url, or can it be anything related to the feed?

It can be any related link. From the JBDA api i was only able to retrieve next_1 links, but their api supports next_1, next_2, prev_1 and prev_2. I also made the type generic enough so that it can be used for any feeds (including rt and gbfs)

When I see 'Related links' I assume it could mean anything ex: social media urls, feeds, news about them, etc. If this is about feeds, I'd rename it to Related Feeds. And rename "next_1" -> "Future Feed", next_2 -> "Future Feed (2)", "prev_1" -> "Previous Feed" etc.

It could be social media. I think the goal was to keep it generic enough.

Comment thread functions-python/tasks_executor/src/tasks/data_import/data_import_utils.py Outdated
Comment thread functions-python/tasks_executor/src/tasks/data_import/import_jbda_feeds.py Outdated
Comment thread functions-python/tasks_executor/src/tasks/data_import/import_jbda_feeds.py Outdated
Comment thread functions-python/tasks_executor/src/tasks/data_import/import_jbda_feeds.py Outdated
Comment thread infra/functions-python/vars.tf
Comment thread liquibase/changes/feat_pt_154.sql
Comment thread liquibase/changes/feat_pt_154.sql
@Alessandro100
Copy link
Copy Markdown
Contributor

[Question] For the Related Links section in the UI, is this solely reserved for future gtfs feed url, or can it be anything related to the feed?

It can be any related link. From the JBDA api i was only able to retrieve next_1 links, but their api supports next_1, next_2, prev_1 and prev_2. I also made the type generic enough so that it can be used for any feeds (including rt and gbfs)

When I see 'Related links' I assume it could mean anything ex: social media urls, feeds, news about them, etc. If this is about feeds, I'd rename it to Related Feeds. And rename "next_1" -> "Future Feed", next_2 -> "Future Feed (2)", "prev_1" -> "Previous Feed" etc.

It could be social media. I think the goal was to keep it generic enough.

Ah ok if it can be anything (even outside of feed related stuff) then related links as a title makes sense. I still think that "Future / Previous Feed" would be a better more descriptive title vs "next_1" "prev_1"

@cka-y
Copy link
Copy Markdown
Contributor Author

cka-y commented Oct 20, 2025

think that "Future / Previous Feed

next_1 is actually the code taken straight from the JBDA api. We could introduce mapping from code to better description. This could be outside of the scope of this PR

Comment thread functions-python/tasks_executor/src/tasks/data_import/import_jbda_feeds.py Outdated
Copy link
Copy Markdown
Collaborator

@emmambd emmambd left a comment

Choose a reason for hiding this comment

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

@cka-y Discussed changes written here. @Alessandro100 let me know if you have any additional thoughts.

Comment thread docs/DatabaseCatalogAPI.yaml Outdated
Comment thread docs/DatabaseCatalogAPI.yaml
Comment thread web-app/src/app/screens/Feed/components/FeedSummary.tsx
Copy link
Copy Markdown
Member

@davidgamez davidgamez left a comment

Choose a reason for hiding this comment

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

Amazing work! 🥇

@cka-y cka-y requested a review from emmambd October 28, 2025 18:09
@cka-y cka-y merged commit 5a109be into main Oct 28, 2025
6 of 7 checks passed
@cka-y cka-y deleted the feat/pt-154 branch October 28, 2025 18:32
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.

5 participants