Skip to content

Conversation

@AlfredNwolisa
Copy link
Contributor

Summary:

Summarize the changes in the pull request including how it relates to any issues (include the #number, or link them).

Expected behavior:

Explain and/or show screenshots for how you expect the pull request to work in your testing (in case other devices exhibit different behavior).

Testing tips:

Provide tips, procedures and sample files on how to test the feature.
Testers are invited to follow the tips AND to try anything they deem relevant outside the bounds of the testing tips.

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)

davidgamez and others added 30 commits September 23, 2024 16:30
- Added logic to determine if a feed is "new" or requires an "update" based on database checks.
- Integrated new `payload_type` field in `TransitFeedSyncPayload` to track the status of each feed ("new" or "update").
- Implemented checks for `external_id` in `public.externalid` table and corresponding `feed_url` in `public.feed` table.
- Filtered out feeds with HTTP status codes 404 and 500, as well as those from Japan and France.
- Added methods for fetching and extracting data from the TransitLand API, combining operator and feed data to prepare payloads.
…nal ID checks

- Added logic to determine if a feed is "new" or requires an "update" based on database checks.
- Integrated new `payload_type` field in `TransitFeedSyncPayload` to track the status of each feed ("new" or "update").
- Implemented checks for `external_id` in `public.externalid` table and corresponding `feed_url` in `public.feed` table.
- Filtered out feeds with HTTP status codes 404 and 500, as well as those from Japan and France.
- Added methods for fetching and extracting data from the TransitLand API, combining operator and feed data to prepare payloads.
…nal ID checks

- Added logic to determine if a feed is "new" or requires an "update" based on database checks.
- Integrated new `payload_type` field in `TransitFeedSyncPayload` to track the status of each feed ("new" or "update").
- Implemented checks for `external_id` in `public.externalid` table and corresponding `feed_url` in `public.feed` table.
- Filtered out feeds with HTTP status codes 404 and 500, as well as those from Japan and France.
- Added methods for fetching and extracting data from the TransitLand API, combining operator and feed data to prepare payloads.
- Added logic to determine if a feed is "new" or requires an "update" based on database checks.
- Integrated new `payload_type` field in `TransitFeedSyncPayload` to track the status of each feed ("new" or "update").
- Implemented checks for `external_id` in `public.externalid` table and corresponding `feed_url` in `public.feed` table.
- Filtered out feeds with HTTP status codes 404 and 500, as well as those from Japan and France.
- Added methods for fetching and extracting data from the TransitLand API, combining operator and feed data to prepare payloads.
…stop_id

2. adjusted payload to reflect external_id update
Incorporated URL status check and merged feed sync data using pandas DataFrames for enhanced processing. Refactored process_sync() function to include filtering, grouping, and data extraction improvements, leading to more efficient and accurate feed sync operations.
 Unit tests to verify the functionality of TransitFeedSyncProcessor, covering data retrieval, rate limit handling, synchronization processing, URL status checks, data extraction, and merging/filtering of data.
 Unit tests to verify the functionality of TransitFeedSyncProcessor, covering data retrieval, rate limit handling, synchronization processing, URL status checks, data extraction, and merging/filtering of data.
Standardized comments and docstrings for better clarity and consistency. Improved code readability by cleaning up unnecessary lines and aligning comment styles.
Ensured that all modified files include a newline at the end
Added 'source' attribute to payload and implemented new logic for determining feed updates or new entries based on 'external_id' and 'source'. Refactored test cases to align with these changes.
Extended the timeout for the `requests.head` call from 10 to 25 seconds to accommodate slower server responses.
Added 'source' parameter in README.md and reformat function arguments in main.py and test_feed_sync.py for better readability. Ensure consistent indentation and correct minor formatting issues.
Added 'source' parameter in README.md and reformat function arguments in main.py and test_feed_sync.py for better readability. Ensure consistent indentation and correct minor formatting issues.
Added the 'source' field to the payload dictionary in the README.md example and made minor whitespace adjustments in the main source and test files.
Implemented a test to ensure the get_data method properly handles API rate limiting response (HTTP 429).
…ctionality and improve get_data retry logic with enhanced assertions and error handling.
Implements a new processor for handling Transitland feed synchronization:
- Process Pub/Sub messages for feed updates
- Maintain database consistency during sync
- Support configurable sync parameters
- Include full test coverage & documentation
@AlfredNwolisa AlfredNwolisa deleted the feat/TransitlandFeedSyncProcesscor branch November 12, 2024 18:27
@jcpitre
Copy link
Collaborator

jcpitre commented Nov 13, 2024

@AlfredNwolisa Can you maybe add a comment as to why you closed this PR?

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.

4 participants