jhanley634 / dojo-blackboard

An HTMX webserver for the Dojo's Tuesday night python meetups.
MIT License
3 stars 1 forks source link

51 fill #52

Closed jhanley634 closed 1 week ago

jhanley634 commented 1 week ago

Summary by Sourcery

Add a new module for paragraph extraction and processing, update comment handling in 'sloc.py', enhance test coverage for rare file types, and update dependencies in 'requirements.txt'.

New Features:

Enhancements:

Tests:

Chores:

sourcery-ai[bot] commented 1 week ago

Reviewer's Guide by Sourcery

This PR introduces a new paragraph fill feature and makes several improvements to the existing codebase. The changes include adding a new module for paragraph text processing, updating dependencies, and refining the line counting functionality.

Class diagram for the new paragraph fill module

classDiagram
    class ParagraphFill {
        +get_paragraphs(url: str) Iterable~str~
        +main() void
    }
    ParagraphFill : -CONNECTICUT_YANKEE
    ParagraphFill : +patch_requests_module()
    ParagraphFill : +requests
    ParagraphFill : +pandas as pd
    note for ParagraphFill "This class processes paragraphs from a given URL using spacy and pandas."

Updated class diagram for line counting functionality

classDiagram
    class LineCounter {
        +expand_comments(lines: Iterable~str~) Iterable~str~
    }
    class BashLineCounter {
    }
    class PythonLineCounter {
    }
    LineCounter <|-- BashLineCounter
    LineCounter <|-- PythonLineCounter
    note for LineCounter "Refined line counting functionality with improved comment handling."

File-Level Changes

Change Details Files
Added new paragraph fill functionality
  • Created a new module for processing paragraphs from text files
  • Implemented function to fetch and clean text from URLs
  • Added basic text analysis using pandas for word length statistics
src/constraint/paragraph_fill.py
Updated project dependencies
  • Added new dependencies for ortools and spacy
  • Upgraded hypothesis package version
  • Added support for text processing libraries
requirements.txt
Enhanced line counting test coverage
  • Modified test file selection to include specific rare file types
  • Added explicit testing for .bat and .ini files
  • Improved test execution efficiency
src/count/tests/sloc_test.py
Improved code documentation and clarity
  • Added clarifying comments about PEP 8 compliance
  • Updated comment handling explanation
  • Renamed Sloc class to more specific counter classes
src/count/sloc.py
talks/2024-11-12-sloc.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](https://app.sourcery.ai) 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 - [Contact our support team](mailto:support@sourcery.ai) for questions or feedback. - Visit our [documentation](https://docs.sourcery.ai) for detailed guides and information. - Keep in touch with the Sourcery team by following us on [X/Twitter](https://x.com/SourceryAI), [LinkedIn](https://www.linkedin.com/company/sourcery-ai/) or [GitHub](https://github.com/sourcery-ai).