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

build: ⬆️ update configuration files for improved linting and formattingUpdate linting and formatting configurations #1749

Merged
merged 21 commits into from
Dec 23, 2024

Conversation

Anselmoo
Copy link
Owner

@Anselmoo Anselmoo commented Dec 19, 2024

Improve linting and formatting by updating configuration files, disabling certain linters, and adding initial actionlint setup. Remove deprecated prettier configuration and update ruff version.

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:
  • 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

Update project configuration files for linting and formatting, including upgrading Ruff, removing Prettier, and adding Actionlint.

Build:

  • Upgrade Ruff to v0.8.4.
  • Remove Prettier configuration.
  • Add Actionlint configuration.
  • Disable Black and isort linters.

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

semanticdiff-com bot commented Dec 19, 2024

Review changes with  SemanticDiff

Changed Files
File Status
  spectrafit/plugins/notebook.py  100% smaller
  spectrafit/plugins/rixs_converter.py  100% smaller
  spectrafit/plugins/pkl_visualizer.py  94% smaller
  spectrafit/plugins/test/test_rixs_visualizer.py  51% smaller
  spectrafit/models.py  51% smaller
  spectrafit/plugins/test/test_converter.py  28% smaller
  .github/actionlint.yaml Unsupported file format
  .github/workflows/python-ci.yml Unsupported file format
  .pre-commit-config.yaml Unsupported file format
  .trunk/trunk.yaml Unsupported file format
  poetry.lock Unsupported file format
  spectrafit/test/test_models.py  0% smaller

Copy link
Contributor

sourcery-ai bot commented Dec 19, 2024

Reviewer's Guide by Sourcery

This PR updates configuration files for improved linting and formatting. It updates ruff version, disables linters (black, isort) via .trunk/trunk.yaml, and adds actionlint. Deprecated prettier configuration is removed from .pre-commit-config.yaml.

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

File-Level Changes

Change Details Files
Update ruff version
  • Update ruff from v0.8.3 to v0.8.4
.pre-commit-config.yaml
Disable linters
  • Disable black
  • Disable isort
.trunk/trunk.yaml
Add actionlint
  • Add actionlint v1.7.4
.trunk/trunk.yaml
Remove prettier configuration
  • Remove prettier configuration and prose wrap arguments
.pre-commit-config.yaml
Update check-added-large-files arguments
  • Change arguments from "--maxkb=1000" to --maxkb=1000
.pre-commit-config.yaml

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 maintenance Maintenance & Security dependencies Pull requests that update a dependency file pre-commit root labels Dec 19, 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:

  • Please update the contributing guidelines to reflect the new development tooling setup, particularly the changes around code formatting.
  • Could you explain the rationale for disabling black/isort and removing prettier? This would help reviewers understand the direction for code formatting.
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.

Copy link

codecov bot commented Dec 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (c2711bb) to head (1fcbd16).
Report is 1 commits behind head on main.

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

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

Files with missing lines Coverage Δ
spectrafit/models.py 100.00% <100.00%> (ø)
spectrafit/plugins/notebook.py 100.00% <ø> (ø)
spectrafit/plugins/pkl_visualizer.py 100.00% <100.00%> (ø)
spectrafit/plugins/rixs_converter.py 100.00% <100.00%> (ø)
spectrafit/plugins/test/test_converter.py 100.00% <100.00%> (ø)
spectrafit/plugins/test/test_rixs_visualizer.py 100.00% <100.00%> (ø)
spectrafit/test/test_models.py 100.00% <100.00%> (ø)

@github-actions github-actions bot added the python Pull requests that update Python code label Dec 19, 2024
@pull-request-size pull-request-size bot added size/M and removed size/S labels Dec 21, 2024
@github-actions github-actions bot added the testing Improve testing & coverage label Dec 21, 2024
@github-actions github-actions bot added the github-actions Pull requests that update Github_actions code label Dec 22, 2024
@Anselmoo Anselmoo disabled auto-merge December 23, 2024 07:22
@Anselmoo Anselmoo enabled auto-merge (squash) December 23, 2024 07:22
@Anselmoo Anselmoo disabled auto-merge December 23, 2024 07:23
@Anselmoo Anselmoo enabled auto-merge (squash) December 23, 2024 07:23
@Anselmoo Anselmoo disabled auto-merge December 23, 2024 07:25
@Anselmoo Anselmoo enabled auto-merge (squash) December 23, 2024 07:25
@pull-request-size pull-request-size bot added size/L and removed size/M labels Dec 23, 2024
@Anselmoo Anselmoo merged commit ae6a28b into main Dec 23, 2024
39 checks passed
@Anselmoo Anselmoo deleted the update-poetry branch December 23, 2024 08:41
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 github-actions Pull requests that update Github_actions code 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.

1 participant