Skip to content

Fix pre-commit workflow path and normalize Windows output paths#288

Open
HKrshan wants to merge 3 commits into
Udayraj123:masterfrom
HKrshan:feature/precommit-github-action
Open

Fix pre-commit workflow path and normalize Windows output paths#288
HKrshan wants to merge 3 commits into
Udayraj123:masterfrom
HKrshan:feature/precommit-github-action

Conversation

@HKrshan
Copy link
Copy Markdown

@HKrshan HKrshan commented May 22, 2026

Changes

Moved pre-commit workflow file into .github/workflows/pre-commit.yml so GitHub Actions recognizes it. Normalized CSV export paths in src/entry.py to use POSIX separators with Path.as_posix(). Updated snapshot path handling in src/tests/test_all_samples.py by normalizing os.path.relpath(...).replace(os.sep, '/').## Validation- Verified full test suite passes locally with: python -m pytest -q
This PR is ready for review.

@qodo-free-for-open-source-projects
Copy link
Copy Markdown

Review Summary by Qodo

Update pre-commit GitHub Actions workflow versions

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Updated GitHub Actions versions for pre-commit workflow
• Upgraded actions/checkout from v3 to v4
• Upgraded actions/setup-python from v3 to v5
• Updated pre-commit/action from v3.0.0 to v3.0.1
• Improved YAML formatting with consistent indentation
Diagram
flowchart LR
  A["Pre-commit Workflow"] --> B["actions/checkout v3"]
  A --> C["actions/setup-python v3"]
  A --> D["pre-commit/action v3.0.0"]
  B --> B1["Updated to v4"]
  C --> C1["Updated to v5"]
  D --> D1["Updated to v3.0.1"]

Loading

File Changes

1. .github/pre-commit.yml ✨ Enhancement +8/-5

Update GitHub Actions versions and formatting

• Upgraded actions/checkout from v3 to v4
• Upgraded actions/setup-python from v3 to v5
• Updated pre-commit/action from v3.0.0 to v3.0.1
• Improved YAML formatting with consistent indentation and blank lines

.github/pre-commit.yml


Grey Divider

Qodo Logo

@qodo-free-for-open-source-projects
Copy link
Copy Markdown

qodo-free-for-open-source-projects Bot commented May 22, 2026

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Action required

1. Workflow not executed 🐞 Bug ≡ Correctness
Description
The pre-commit workflow is stored at .github/pre-commit.yml rather than under
.github/workflows/, so GitHub Actions will not run it and CI will silently miss pre-commit
enforcement on pushes/PRs.
Code

.github/pre-commit.yml[R9-16]

Evidence
The repository contains a workflow file under .github/workflows/ (the Test workflow), while the
pre-commit workflow being modified is located directly under .github/, indicating it is not
colocated with actual workflows and thus won’t run as part of the repo’s GitHub Actions workflows.

.github/pre-commit.yml[1-16]
.github/workflows/test.yml[1-30]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The pre-commit GitHub Actions workflow is placed at `.github/pre-commit.yml`, which prevents it from being picked up/executed as a workflow. As a result, the intended pre-commit CI gate will not run.
## Issue Context
This PR’s stated intent is to update the GitHub Actions pre-commit workflow, but the workflow file is not located alongside other workflows.
## Fix Focus Areas
- .github/pre-commit.yml[1-16]
- .github/workflows/test.yml[1-30]
## Suggested fix
- Move/rename `.github/pre-commit.yml` to `.github/workflows/pre-commit.yml`.
- Ensure no other workflow needs updating to reference/call it (if it was intended to be reusable, convert it to a reusable workflow and keep it in `.github/workflows/`).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

Comment on lines 9 to +16
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: '3.11'
- uses: pre-commit/action@v3.0.0
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.11"

- uses: pre-commit/action@v3.0.1
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Workflow not executed 🐞 Bug ≡ Correctness

The pre-commit workflow is stored at .github/pre-commit.yml rather than under
.github/workflows/, so GitHub Actions will not run it and CI will silently miss pre-commit
enforcement on pushes/PRs.
Agent Prompt
## Issue description
The pre-commit GitHub Actions workflow is placed at `.github/pre-commit.yml`, which prevents it from being picked up/executed as a workflow. As a result, the intended pre-commit CI gate will not run.

## Issue Context
This PR’s stated intent is to update the GitHub Actions pre-commit workflow, but the workflow file is not located alongside other workflows.

## Fix Focus Areas
- .github/pre-commit.yml[1-16]
- .github/workflows/test.yml[1-30]

## Suggested fix
- Move/rename `.github/pre-commit.yml` to `.github/workflows/pre-commit.yml`.
- Ensure no other workflow needs updating to reference/call it (if it was intended to be reusable, convert it to a reusable workflow and keep it in `.github/workflows/`).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@HKrshan HKrshan changed the title Update pre-commit GitHub Actions workflow Fix pre-commit workflow path and normalize Windows output paths May 22, 2026
@Udayraj123
Copy link
Copy Markdown
Owner

@HKrshan thanks for the contribution. Can you please document the issue you're solving via this PR? (Create New)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants