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

ci: Lint updates #3958

Merged
merged 3 commits into from
Dec 6, 2024
Merged

ci: Lint updates #3958

merged 3 commits into from
Dec 6, 2024

Conversation

paulgessinger
Copy link
Member

@paulgessinger paulgessinger commented Dec 6, 2024

  1. Remove redundant extra CI jobs that are covered by the pre-commit job
  2. Make codespell write changes (more convenient to use from pre-commit)

--- END COMMIT MESSAGE ---

Summary by CodeRabbit

  • New Features

    • Introduced new workflow jobs: missing_includes, fpe_masks, unused_files, and codegen for enhanced checks.
  • Bug Fixes

    • Improved the codespell hook to better handle word corrections.
  • Chores

    • Removed several outdated jobs from the GitHub Actions workflow to streamline processes.

@paulgessinger paulgessinger added this to the next milestone Dec 6, 2024
Copy link

coderabbitai bot commented Dec 6, 2024

Walkthrough

Change significant, it is. The GitHub Actions workflow in .github/workflows/checks.yml restructured has been. Jobs removed, many they are, related to license checking and other checks. New jobs introduced, such as missing_includes, fpe_masks, unused_files, and codegen. Each new job configured to run on ubuntu-latest, with specific scripts executed. In .pre-commit-config.yaml, the codespell hook modified, an argument added. Overall, a shift in focus, yes.

Changes

File Path Change Summary
.github/workflows/checks.yml Removed jobs: license, include_guards, pragma_once, type_t, boost_test_macro, cmake_options, spelling, math_macros. Added jobs: missing_includes, fpe_masks, unused_files, codegen.
.pre-commit-config.yaml Updated codespell hook to include -w argument; other hooks unchanged.

Possibly related PRs

Suggested labels

automerge

Suggested reviewers

  • AJPfleger

In the workflow, changes abound,
New jobs arise, old ones unbound.
Codespell now with a twist,
A better check, none can resist!
In Yoda's style, we celebrate,
A brighter code future awaits! 🌌


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between feac686 and ff38207.

📒 Files selected for processing (2)
  • .github/workflows/checks.yml (3 hunks)
  • .pre-commit-config.yaml (1 hunks)
🔇 Additional comments (5)
.github/workflows/checks.yml (3)

Line range hint 51-62: Approve the missing_includes job configuration, I do.

Proper dependencies installed, they are. Clang and required dev packages, present they be. Simple and focused, the check remains.


Line range hint 62-76: Wise addition of fpe_masks job, this is.

Dependencies from requirements file, installed they are. GitHub token, properly passed it is. Security practices, followed they are.


Line range hint 76-99: Artifact upload on failure, a prudent measure it is.

In codegen job, wisdom shown in uploading artifacts on failure. Debug information, preserved it will be. But verify the 'changed' path, we must.

✅ Verification successful

The path, understand better we must. See the actual implementation, we shall.


Correct, the path is. Artifacts, properly handled they are.

Examined the script, I have. In CI environment, creates 'changed' directory it does, copying modified files with their full paths. Wise implementation this is, preserving the directory structure for debugging purposes. When codegen fails, these artifacts, valuable they become.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify if the 'changed' directory is created by the codegen script
rg -l "changed" CI/check_codegen

Length of output: 49


Script:

#!/bin/bash
# Let us see the content of check_codegen to understand the path
cat CI/check_codegen

# And examine the codegen script itself
fd codegen.py$ | xargs cat

Length of output: 1312

.pre-commit-config.yaml (2)

38-39: Write changes directly, codespell now can. Hmmmm.

The "-w" flag added, allows codespell to fix spelling errors automatically. A powerful tool this is, but with great power comes great responsibility. Ensure proper ignore patterns in place, we must.

✅ Verification successful

Safe, the automatic spell correction is, young Padawan

A well-maintained ignore list, I see. Common technical terms and intentional variations, it contains. Protected from unwanted changes, your codebase shall be. The Force is strong with your ignore patterns - specific, focused, and purposeful they are.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify codespell ignore patterns
if [ -f "./CI/codespell_ignore.txt" ]; then
    echo "Content of ignore file:"
    cat "./CI/codespell_ignore.txt"
else
    echo "Warning: Ignore file not found!"
fi

Length of output: 288


38-41: Consider the exclude pattern's wisdom, we should.

Excluded are CI files with ^CI/.*$, yet the ignore file from CI directory, used it is. A paradox, this seems.

✅ Verification successful

Wisdom in the configuration, I have found. No paradox exists.

The Force reveals that the exclude pattern serves a different purpose than we first thought. The ignore file (CI/codespell_ignore.txt) is used as a reference for words to ignore, while the exclude pattern prevents codespell from checking files within the CI directory itself. Different purposes, these patterns serve.

The CI directory, many scripts and configuration files it contains. Check them for spelling, we need not, as tools and automation files they are. Yet the ignore file within, a valuable resource it remains, guiding codespell in its noble quest throughout the rest of the codebase.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if codespell ignore file is properly handled despite CI exclusion
rg "codespell" .pre-commit-config.yaml -A 5 -B 5

Length of output: 416


Script:

#!/bin/bash
# Check if the codespell ignore file exists and its contents
ls -l ./CI/codespell_ignore.txt 2>/dev/null
if [ $? -eq 0 ]; then
    echo "=== Contents of codespell_ignore.txt ==="
    cat ./CI/codespell_ignore.txt
fi

# Check if there are any other codespell ignore files in the repository
echo -e "\n=== Looking for other codespell ignore files ==="
fd "codespell.*ignore" 

# Check what files are actually in CI directory
echo -e "\n=== Files in CI directory ==="
ls -la CI/

Length of output: 3569


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the Infrastructure Changes to build tools, continous integration, ... label Dec 6, 2024
Copy link

github-actions bot commented Dec 6, 2024

📊: Physics performance monitoring for 5df9e48

Full contents

physmon summary

Copy link

sonarqubecloud bot commented Dec 6, 2024

@kodiakhq kodiakhq bot merged commit 2862173 into acts-project:main Dec 6, 2024
40 checks passed
@paulgessinger paulgessinger deleted the ci/lint-update branch December 6, 2024 16:42
@github-actions github-actions bot removed the automerge label Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Infrastructure Changes to build tools, continous integration, ...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants