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

feature: ✨ fix syntax by adding missing commas in function signatures #1656

Merged
merged 7 commits into from
Oct 18, 2024

Conversation

Anselmoo
Copy link
Owner

@Anselmoo Anselmoo commented Oct 18, 2024

All PR-Submissions:


  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open
    Pull Requests for the same
    update/change?

New ✨✨ Feature-Submissions:


  • Does your submission pass tests?
  • Have you lint your code locally prior to submission? Fixed: [Feature]: Introduce RUFF #1655
  • This PR is for a new feature, not a bug fix.

Changes to ⚙️ Core-Features:


  • Have you added an explanation of what your changes do and why you'd like
    us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully run tests with your changes locally?

Summary by Sourcery

Fix syntax errors by adding missing commas in function signatures and enhance pre-commit configuration by replacing multiple hooks with ruff and ruff-format for code formatting and linting.

Bug Fixes:

  • Add missing commas in function signatures to fix syntax errors.

Enhancements:

  • Replace multiple pre-commit hooks with ruff and ruff-format for code formatting and linting.

@Anselmoo Anselmoo enabled auto-merge (squash) October 18, 2024 19:07
Copy link

semanticdiff-com bot commented Oct 18, 2024

Review changes with SemanticDiff.

Analyzed 2 of 8 files.

Overall, the semantic diff is 100% smaller than the GitHub diff.

2 files do not contain logic changes.

Filename Status
.pre-commit-config.yaml Unsupported file format
poetry.lock Unsupported file format
pyproject.toml Unsupported file format
✔️ spectrafit/utilities/transformer.py No logic changes found
✔️ spectrafit/api/test/test_pptx_model.py No logic changes found
docs/examples/example9_2.ipynb Unsupported file format
docs/examples/example9_3.ipynb Unsupported file format
docs/examples/example9_6.ipynb Unsupported file format

Copy link
Contributor

sourcery-ai bot commented Oct 18, 2024

Reviewer's Guide by Sourcery

This pull request focuses on improving code quality and updating development tools. The main changes include updating pre-commit hooks, fixing syntax issues, and adjusting code formatting configurations.

Class diagram for updated function signatures

classDiagram
    class test_pptx_data {
        +pptx_data: Tuple[PPTXDataAPI, OutputAPI, InputAPI, SolverAPI],
        +test_pptx_data(pptx_data: Tuple[PPTXDataAPI, OutputAPI, InputAPI, SolverAPI])
    }
    class list2dict {
        +peak_list: List[Dict[str, Dict[str, Dict[str, Any]]]],
        +list2dict(peak_list: List[Dict[str, Dict[str, Dict[str, Any]]]])
    }
    note for test_pptx_data "Added missing comma in function signature"
    note for list2dict "Added missing comma in function signature"
Loading

Pre-commit hooks update

graph TD;
    A[Old Pre-commit Hooks] -->|Removed| B[black, blacken-docs, isort, flake8, pylint, pyupgrade]
    A -->|Added| C[ruff, ruff-format]
    A -->|Unchanged| D[mypy, pydocstyle, prettier]
Loading

File-Level Changes

Change Details Files
Update pre-commit configuration
  • Replace Black, isort, and flake8 with Ruff for linting and formatting
  • Remove Pylint hook
  • Remove pyupgrade hook
  • Update versions of remaining hooks
.pre-commit-config.yaml
Fix syntax by adding missing commas in function signatures
  • Add missing comma in function parameter type hint
  • Add missing comma in function parameter type hint
spectrafit/api/test/test_pptx_model.py
spectrafit/utilities/transformer.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.
  • 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

@github-actions github-actions bot added testing Improve testing & coverage maintenance Maintenance & Security dependencies Pull requests that update a dependency file python Pull requests that update Python code pre-commit root labels Oct 18, 2024
@pull-request-size pull-request-size bot added size/L and removed size/M labels Oct 18, 2024
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Oct 18, 2024
@Anselmoo Anselmoo added the enhancement New feature or request label Oct 18, 2024
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 @Anselmoo - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider adding a brief explanation in the project documentation about the switch to Ruff and its implications for the development workflow. This will help other contributors understand the change in linting and formatting tools.
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.

@Anselmoo Anselmoo changed the title chore: ✨ fix syntax by adding missing commas in function signatures feature: ✨ fix syntax by adding missing commas in function signatures Oct 18, 2024
@Anselmoo Anselmoo disabled auto-merge October 18, 2024 19:08
@Anselmoo Anselmoo enabled auto-merge (squash) October 18, 2024 19:08
Copy link

Copy link

codecov bot commented Oct 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (03f6a32) to head (d646348).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1656   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           45        45           
  Lines         4518      4518           
=========================================
  Hits          4518      4518           
Flag Coverage Δ
unittests 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
spectrafit/api/test/test_pptx_model.py 100.00% <ø> (ø)
spectrafit/utilities/transformer.py 100.00% <ø> (ø)

@Anselmoo Anselmoo merged commit 81a3a4a into main Oct 18, 2024
33 checks passed
@Anselmoo Anselmoo deleted the Anselmoo/issue1655 branch October 18, 2024 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation enhancement New feature or request maintenance Maintenance & Security pre-commit python Pull requests that update Python code root size/L testing Improve testing & coverage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Introduce RUFF
1 participant