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

pydocstyle implementation - Merge pull request #546 from iKostanOrg/master #547

Merged
merged 17 commits into from
Dec 2, 2024

Conversation

ikostan
Copy link
Member

@ikostan ikostan commented Dec 2, 2024

Merge from master + pydocstyle implementation

Summary by Sourcery

CI:

  • Add a GitHub Actions workflow for pydocstyle to enforce docstring style checks on the 'kyu2' branch.

@ikostan ikostan added documentation Improvements or additions to documentation codewars code quality kyu_2 pydocstyle labels Dec 2, 2024
@ikostan ikostan self-assigned this Dec 2, 2024
Copy link
Contributor

sourcery-ai bot commented Dec 2, 2024

Reviewer's Guide by Sourcery

This PR implements pydocstyle configuration and GitHub Actions workflow for the kyu2 branch. It adds docstring validation for the kyu_2 package and sets up automated documentation style checking.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Added package docstring for kyu_2 package
  • Added a simple docstring to define the package purpose
kyu_2/__init__.py
Implemented GitHub Actions workflow for pydocstyle checking
  • Created workflow that triggers on push to kyu2 branch
  • Set up Python environment with version 3.x
  • Configured dependency installation including pydocstyle
  • Added pydocstyle validation command for kyu_2 directory
  • Included verbose output and explanation in pydocstyle checks
.github/workflows/pydocstyle_kyu2.yml
Added pydocstyle configuration file
  • Created empty pydocstyle configuration file for future customization
.pydocstyle

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.

We have skipped reviewing this pull request. Here's why:

  • We don't review packaging changes - Let us know if you'd like us to change this.
  • All of the files are larger than we can process. We're working on it!

Copy link

codeclimate bot commented Dec 2, 2024

Code Climate has analyzed commit 92981fe and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 90.0% (0.0% change).

View more on Code Climate.

Copy link

codecov bot commented Dec 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.06%. Comparing base (f128538) to head (92981fe).
Report is 18 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #547   +/-   ##
=======================================
  Coverage   90.06%   90.06%           
=======================================
  Files         172      172           
  Lines        2587     2587           
=======================================
  Hits         2330     2330           
  Misses        257      257           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ikostan
Copy link
Member Author

ikostan commented Dec 2, 2024

@sourcery-ai review

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 @ikostan - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider expanding pydocstyle checking to cover the entire codebase rather than just kyu2. This would ensure consistent documentation standards across the project.
  • The .pydocstyle configuration file appears to be empty. Please add appropriate configuration to define which docstring standards you want to enforce.
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.

kyu_2/evaluate_mathematical_expression/evaluate.py:15 in public function `calculate`:
        D205: 1 blank line required between summary line and description (found 0)

        Multi-line docstrings consist of a summary line just like a one-line
        docstring, followed by a blank line, followed by a more elaborate
        description. The summary line may be used by automatic indexing tools;
        it is important that it fits on one line and is separated from the
        rest of the docstring by a blank line.

kyu_2/evaluate_mathematical_expression/evaluate.py:15 in public function `calculate`:
        D400: First line should end with a period (not 'n')

        The [first line of a] docstring is a phrase ending in a period.
./kyu_2/evaluate_mathematical_expression/evaluate.py:175:1: W293 blank line contains whitespace
    """
    Normalizing string input by checking conditions.

    :param strings: list
    :param string: str
    :param temp: str
    :return: tuple(str, str)
    """
kyu_2/evaluate_mathematical_expression/evaluate.py:79 in public function `process_brackets`:
        D205: 1 blank line required between summary line and description (found 0)

        Multi-line docstrings consist of a summary line just like a one-line
        docstring, followed by a blank line, followed by a more elaborate
        description. The summary line may be used by automatic indexing tools;
        it is important that it fits on one line and is separated from the
        rest of the docstring by a blank line.

kyu_2/evaluate_mathematical_expression/evaluate.py:79 in public function `process_brackets`:
        D400: First line should end with a period (not 't')

        The [first line of a] docstring is a phrase ending in a period.
kyu_2/evaluate_mathematical_expression/evaluate.py:173 in public function `check_conditions`:
        D401: First line should be in imperative mood (perhaps 'Normalize', not 'Normalizing')

        [Docstring] prescribes the function or method's effect as a command:
        ("Do this", "Return that"), not as a description; e.g. don't write
        "Returns the pathname ...".
@ikostan
Copy link
Member Author

ikostan commented Dec 2, 2024

Code Climate has analyzed commit 92981fe and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 90.0% (0.0% change).

View more on Code Climate.

Thanks

@ikostan ikostan merged commit e3a69ea into master Dec 2, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality codewars documentation Improvements or additions to documentation kyu_2 pydocstyle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant