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: transitFeedSyncProcessor implmentation #760

Draft
wants to merge 29 commits into
base: main
Choose a base branch
from

Commits on Sep 23, 2024

  1. add feed sync base code

    davidgamez committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    2a452a0 View commit details
    Browse the repository at this point in the history

Commits on Sep 24, 2024

  1. code clean up

    davidgamez committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    9b77034 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9a1f8c6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5ab1120 View commit details
    Browse the repository at this point in the history
  4. fix lint

    davidgamez committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    1f99509 View commit details
    Browse the repository at this point in the history

Commits on Oct 8, 2024

  1. feat: Implement Transit Feed Sync

    - 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.
    AlfredNwolisa committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    d6f0832 View commit details
    Browse the repository at this point in the history
  2. feat: Implement Transit Feed Sync with feed status tracking and exter…

    …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.
    AlfredNwolisa committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    da98956 View commit details
    Browse the repository at this point in the history
  3. feat: Implement Transit Feed Sync with feed status tracking and exter…

    …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.
    AlfredNwolisa committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    46be537 View commit details
    Browse the repository at this point in the history
  4. feat: Implemented process_sync(),get_data(),extract_feeds_data()

    - 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.
    AlfredNwolisa committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    acdd782 View commit details
    Browse the repository at this point in the history
  5. updated dotenv_path

    AlfredNwolisa committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    d8433a5 View commit details
    Browse the repository at this point in the history

Commits on Oct 10, 2024

  1. Configuration menu
    Copy the full SHA
    2486dfa View commit details
    Browse the repository at this point in the history
  2. 1. updated external_id to refrence: feed_onestop_id from operator_one…

    …stop_id
    
    2. adjusted payload to reflect external_id update
    AlfredNwolisa committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    cab14e8 View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2024

  1. Add URL check and pandas integration to feed sync

    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.
    AlfredNwolisa committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    f164c9d View commit details
    Browse the repository at this point in the history
  2. Merge remote-tracking branch 'origin/feat/transitland-feed-sync' into…

    … feat/transitland-feed-sync
    AlfredNwolisa committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    86478e9 View commit details
    Browse the repository at this point in the history
  3. Added unit tests for TransitFeedSyncProcessor methods

     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.
    AlfredNwolisa committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    d2c6d47 View commit details
    Browse the repository at this point in the history
  4. Added unit tests for TransitFeedSyncProcessor methods

     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.
    AlfredNwolisa committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    b0ca74f View commit details
    Browse the repository at this point in the history
  5. Refactor code formatting

    Standardized comments and docstrings for better clarity and consistency. Improved code readability by cleaning up unnecessary lines and aligning comment styles.
    AlfredNwolisa committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    7f34d23 View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2024

  1. Add missing newline at end of files

    Ensured that all modified files include a newline at the end
    AlfredNwolisa committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    a3855a2 View commit details
    Browse the repository at this point in the history
  2. Renamed variables and improved code formatting

    Updated README.md
    AlfredNwolisa committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    c4060d2 View commit details
    Browse the repository at this point in the history
  3. Reformatted the get_data method call for operators_data to improv…

    …e readability and maintain consistency.
    AlfredNwolisa committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    2a769d8 View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2024

  1. Update feed sync logic and refactor tests

    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.
    AlfredNwolisa committed Oct 18, 2024
    Configuration menu
    Copy the full SHA
    de385d6 View commit details
    Browse the repository at this point in the history
  2. Increase URL check timeout to 25 seconds.

    Extended the timeout for the `requests.head` call from 10 to 25 seconds to accommodate slower server responses.
    AlfredNwolisa committed Oct 18, 2024
    Configuration menu
    Copy the full SHA
    f512066 View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2024

  1. Refactor and format feed_sync_dispatcher_transitland code

    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.
    AlfredNwolisa committed Oct 21, 2024
    Configuration menu
    Copy the full SHA
    5b0d28f View commit details
    Browse the repository at this point in the history
  2. Refactor and format feed_sync_dispatcher_transitland code

    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.
    AlfredNwolisa committed Oct 21, 2024
    Configuration menu
    Copy the full SHA
    59bc0f9 View commit details
    Browse the repository at this point in the history
  3. Add source field and fix whitespace in feed_sync_dispatcher

    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.
    AlfredNwolisa committed Oct 21, 2024
    Configuration menu
    Copy the full SHA
    7c13963 View commit details
    Browse the repository at this point in the history

Commits on Oct 22, 2024

  1. Configuration menu
    Copy the full SHA
    584df25 View commit details
    Browse the repository at this point in the history
  2. Update README.md

    AlfredNwolisa authored Oct 22, 2024
    Configuration menu
    Copy the full SHA
    3416fa1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    76e6586 View commit details
    Browse the repository at this point in the history
  4. restore main.py

    davidgamez committed Oct 22, 2024
    Configuration menu
    Copy the full SHA
    f929048 View commit details
    Browse the repository at this point in the history