8000 [pull] master from digitalmethodsinitiative:master by pull[bot] · Pull Request #212 · admariner/4cat · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[pull] master from digitalmethodsinitiative:master #212

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 s 8000 tatement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 8, 2025

Conversation

pull[bot]
Copy link
@pull pull bot commented May 8, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.1)

Can you help keep this open source service alive? 💖 Please sponsor : )

Summary by Sourcery

Fix URL extraction and scene detector type in Twitter and video processing modules

Bug Fixes:

  • Improve URL extraction to handle cases with missing URL attributes
  • Correct a typo in scene detector type parameter

@pull pull bot added the ⤵️ pull label May 8, 2025
@pull pull bot merged commit 19d2446 into admariner:master May 8, 2025
Copy link
sourcery-ai bot commented May 8, 2025

Reviewer's Guide

This pull request refines Twitter data processing by adding conditional checks to URL extraction logic, preventing potential errors if certain keys are missing in URL entities. It also corrects a typo in the detector type string within the video scene identification processor.

Sequence Diagram: Corrected Detector Initialization in get_new_scene_manager

sequenceDiagram
    participant Client
    participant VSI as VideoSceneIdentifier
    participant Params as self.parameters
    participant SM as SceneManager
    participant CD as ContentDetector

    Client->>VSI: get_new_scene_manager()
    activate VSI
    VSI->>SM: new SceneManager()
    activate SM
    SM-->>VSI: scene_manager
    deactivate SM

    VSI->>Params: get("detector_type")
    activate Params
    Params-->>VSI: detector_type_value
    deactivate Params

    alt detector_type_value == "content_detector"
        note over VSI: This path is now correctly triggered due to typo fix ('contenct_detector' -> 'content_detector').
        VSI->>CD: new ContentDetector(threshold, ...)
        activate CD
        CD-->>VSI: content_detector_instance
        deactivate CD
        VSI->>SM: add_detector(content_detector_instance)
    else e.g., other detector types
        VSI->>VSI: Handle other detector types (not detailed)
    end
    VSI-->>Client: scene_manager_with_detector
    deactivate VSI
Loading

Class Diagram: Update in VideoSceneIdentifier

classDiagram
    class VideoSceneIdentifier {
        +parameters: Dict
        +get_new_scene_manager() : SceneManager
    }
    note for VideoSceneIdentifier "In get_new_scene_manager(), the condition to use ContentDetector was fixed from 'contenct_detector' to 'content_detector'."
Loading

File-Level Changes

Change Details Files
Enhanced robustness in Twitter URL entity processing.
  • Added a conditional check to ensure 'display_url' or 'expanded_url' exists before accessing them in URL entities.
  • Applied this check for URLs in both main tweets and retweeted tweets' entities to prevent potential KeyErrors.
datasources/twitterv2/search_twitter.py
Corrected a typo in detector type.
  • Fixed a typo in a conditional statement, changing 'contenct_detector' to 'content_detector'.
processors/visualisation/video_scene_identifier.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0