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

updating the formatting #34

Merged
merged 3 commits into from
Oct 22, 2024
Merged

updating the formatting #34

merged 3 commits into from
Oct 22, 2024

Conversation

LemurPwned
Copy link
Owner

@LemurPwned LemurPwned commented Oct 22, 2024

Summary by Sourcery

Enhance the video sampler by adding a method to format output paths with options for encoding time and including filenames. Update the GitHub Actions workflow to automate release creation by extracting the version from the project configuration. Improve the README formatting for clarity.

Enhancements:

  • Add a new method to format output paths for frames in the video sampler, allowing for encoding of time and inclusion of filenames.

CI:

  • Update GitHub Actions workflow to include a new step for getting the release version and creating a release.

Documentation:

  • Fix formatting in the README file for better readability.

Copy link
Contributor

sourcery-ai bot commented Oct 22, 2024

Reviewer's Guide by Sourcery

This pull request updates the GitHub Actions workflow to create releases automatically, modifies the frame saving format in the video sampler, and adds new configuration options for the save format. The changes improve the CI/CD pipeline and enhance the flexibility of the video sampling process.

Architecture diagram for updated GitHub Actions workflow

graph TD;
    A[GitHub Actions] -->|Trigger on PR merge or workflow dispatch| B[Build Job];
    B -->|Outputs version| C[Release Job];
    C -->|Create release with version| D[GitHub Repository];
Loading

Updated class diagram for SamplerConfig and SaveFormatConfig

classDiagram
    class SamplerConfig {
        dict summary_config
        int n_workers
        SaveFormatConfig save_format
    }
    class SaveFormatConfig {
        bool encode_time
        bool include_filename
    }
    SamplerConfig --> SaveFormatConfig
Loading

File-Level Changes

Change Details Files
Update GitHub Actions workflow to create releases automatically
  • Add a step to get the release version from pyproject.toml
  • Create a new 'release' job that depends on the 'build' job
  • Use GitHub CLI to create a new release with generated release notes
.github/workflows/build.yml
Modify frame saving format in the video sampler
  • Add a new method 'format_output_path' to handle custom frame naming
  • Implement options to encode frame time and include filename in the output
  • Update the 'queue_reader' method to use the new formatting function
video_sampler/sampler.py
Add new configuration options for save format
  • Create a new 'SaveFormatConfig' class with 'encode_time' and 'include_filename' options
  • Add 'save_format' field to the 'SamplerConfig' class
  • Update the hash_base.yaml configuration file with new save format options
video_sampler/config.py
configs/hash_base.yaml
Minor README update
  • Add asterisks to the 'Supported env' section
README.md

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.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a 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. You can also use
    this command to specify where the summary should be inserted.

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

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @LemurPwned - I've reviewed your changes - here's some feedback:

Overall Comments:

  • The new format_output_path method introduces additional complexity. Consider making the base64 encoding and filename inclusion optional or provide a clear rationale for their necessity. This will help maintain backwards compatibility and keep the default behavior simple.
  • Great job on improving the GitHub Actions workflow for automating releases. This will streamline the release process and improve consistency.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@LemurPwned LemurPwned merged commit 6b28fe7 into main Oct 22, 2024
3 checks passed
@LemurPwned LemurPwned deleted the feat/output-fmt branch October 22, 2024 11:03
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.

1 participant