Skip to content

feat: add windows exe build pipeline and fix bundled template path#3

Merged
ThiruNithish28 merged 2 commits into
developfrom
feature/windows-build-pipeline
May 3, 2026
Merged

feat: add windows exe build pipeline and fix bundled template path#3
ThiruNithish28 merged 2 commits into
developfrom
feature/windows-build-pipeline

Conversation

@ThiruNithish28
Copy link
Copy Markdown
Owner

@ThiruNithish28 ThiruNithish28 commented May 3, 2026

🚀 Summary

This PR adds support for building a Windows executable for AuditGen CLI using PyInstaller and fixes issues with bundled template file path.

✨ Changes Made

  • Added PyInstaller setup for generating a standalone .exe
  • Configured build pipeline for Windows executable packaging
  • Fixed template file path resolution when bundled inside executable
  • Updated project Python version constraints for PyInstaller compatibility (<3.15)
  • Improved handling of resource paths for packaged environments

🧪 Tested

  • Built .exe using PyInstaller
  • Verified CLI runs correctly from executable
  • Confirmed template files are correctly accessed in bundled mode
  • Tested normal (non-bundled) CLI flow as well

⚠️ Notes

  • This change is specific to Windows executable builds
  • Future improvements may include cross-platform packaging support

📦 Outcome

Users can now run AuditGen CLI as a standalone Windows executable without requiring Python setup.

Summary by CodeRabbit

  • New Features

    • Automated Windows executable build workflow enables streamlined distribution.
  • Bug Fixes

    • Fixed template resolution in packaged executables to ensure proper functionality.
  • Chores

    • Updated Python version constraints (3.12 to <3.15) and added build tool dependencies.

@ThiruNithish28 ThiruNithish28 self-assigned this May 3, 2026
@ThiruNithish28 ThiruNithish28 added the enhancement New feature or request label May 3, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 3, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: a2dc283d-479b-44b0-aa30-78b1c12b8500

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/build.yml:
- Around line 3-6: The workflow currently triggers only on push to branch "main"
(see on: push branches: [main] and workflow_dispatch), so it never runs for
changes pushed to "develop"; update the triggers to include "develop" (e.g., add
it to the push branches array) or add a pull_request trigger for target branches
(or both) so CI runs for PRs targeting develop/main; modify the on: section
accordingly to include the desired branches/PR events.
- Line 22: Replace the unpinned install command "pip install poetry" in the
workflow step with a pinned version that guarantees PEP 735 support (e.g.
install Poetry 2.3.0 or a constrained range); update the run step to use a
specific version specifier such as "pip install 'poetry>=2.3.0,<3.0.0'" so the
CI consistently uses a Poetry release that supports dependency groups.

In `@audigen_cli/excelWriter.py`:
- Around line 7-10: The _get_base_path function uses sys.MEIPASS which is
incorrect for PyInstaller; change references to sys._MEIPASS and guard access
with hasattr or getattr to avoid AttributeError when not frozen (e.g., use
getattr(sys, '_MEIPASS', None) or hasattr(sys, '_MEIPASS')), so _get_base_path()
returns Path(sys._MEIPASS) when frozen and the normal project folder otherwise;
update any related module-level uses (such as _TEMPLATES evaluation) to rely on
the fixed _get_base_path.

In `@pyproject.toml`:
- Around line 29-31: Add a pinned entry for pyinstaller-hooks-contrib alongside
the existing pyinstaller dev dependency in pyproject.toml: match the version
bounds to pyinstaller (e.g., "pyinstaller-hooks-contrib (>=6.20.0,<7.0.0)") so
both packages are upgraded together and avoid compatibility breakage between
pyinstaller and pyinstaller-hooks-contrib.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: b2500a67-d533-4956-91e5-8cfc948a0d76

📥 Commits

Reviewing files that changed from the base of the PR and between 0f6e51e and d8b3ddb.

⛔ Files ignored due to path filters (1)
  • poetry.lock is excluded by !**/*.lock
📒 Files selected for processing (3)
  • .github/workflows/build.yml
  • audigen_cli/excelWriter.py
  • pyproject.toml

Comment thread .github/workflows/build.yml
Comment thread .github/workflows/build.yml
Comment thread audigen_cli/excelWriter.py Outdated
Comment thread pyproject.toml
@ThiruNithish28 ThiruNithish28 marked this pull request as ready for review May 3, 2026 15:54
@ThiruNithish28 ThiruNithish28 merged commit e279f71 into develop May 3, 2026
1 check passed
ThiruNithish28 added a commit that referenced this pull request May 3, 2026
* developed cli for auditgen  (#1)

* initial setup for basi cli

* fix issue in basi cli

* feat: improve CLI UX, prompts, and generate workflow

* change desing of CLI

* fix: address CodeRabbit review comments

* fix: check brd file is docx in the flag option

* fix: output path issue

* feat: add windows exe build pipeline and fix bundled template path (#3)

* feat: add windows exe build pipeline and fix bundled template path

* fix: get_base_path method
ThiruNithish28 added a commit that referenced this pull request May 3, 2026
* release: merge develop into main (CLI + UX + Windows exe support) (#4)

* developed cli for auditgen  (#1)

* initial setup for basi cli

* fix issue in basi cli

* feat: improve CLI UX, prompts, and generate workflow

* change desing of CLI

* fix: address CodeRabbit review comments

* fix: check brd file is docx in the flag option

* fix: output path issue

* feat: add windows exe build pipeline and fix bundled template path (#3)

* feat: add windows exe build pipeline and fix bundled template path

* fix: get_base_path method

* fix: resolve exe crash due to lazy import handling (#5)

* fix: lazy import not catch by PyInstaller

* fix: add debug in the cli to check what issue it crash (#6)
ThiruNithish28 added a commit that referenced this pull request May 4, 2026
* release: merge develop into main (CLI + UX + Windows exe support) (#4)

* developed cli for auditgen  (#1)

* initial setup for basi cli

* fix issue in basi cli

* feat: improve CLI UX, prompts, and generate workflow

* change desing of CLI

* fix: address CodeRabbit review comments

* fix: check brd file is docx in the flag option

* fix: output path issue

* feat: add windows exe build pipeline and fix bundled template path (#3)

* feat: add windows exe build pipeline and fix bundled template path

* fix: get_base_path method

* fix: resolve exe crash due to lazy import handling (#5)

* fix: lazy import not catch by PyInstaller

* fix: add debug in the cli to check what issue it crash (#6)
@coderabbitai coderabbitai Bot mentioned this pull request May 4, 2026
ThiruNithish28 added a commit that referenced this pull request May 16, 2026
* developed cli for auditgen  (#1)

* initial setup for basi cli

* fix issue in basi cli

* feat: improve CLI UX, prompts, and generate workflow

* change desing of CLI

* fix: address CodeRabbit review comments

* fix: check brd file is docx in the flag option

* fix: output path issue

* feat: add windows exe build pipeline and fix bundled template path (#3)

* feat: add windows exe build pipeline and fix bundled template path

* fix: get_base_path method

* Sync main into develop (#7)

* release: merge develop into main (CLI + UX + Windows exe support) (#4)

* developed cli for auditgen  (#1)

* initial setup for basi cli

* fix issue in basi cli

* feat: improve CLI UX, prompts, and generate workflow

* change desing of CLI

* fix: address CodeRabbit review comments

* fix: check brd file is docx in the flag option

* fix: output path issue

* feat: add windows exe build pipeline and fix bundled template path (#3)

* feat: add windows exe build pipeline and fix bundled template path

* fix: get_base_path method

* fix: resolve exe crash due to lazy import handling (#5)

* fix: lazy import not catch by PyInstaller

* fix: add debug in the cli to check what issue it crash (#6)

* docs: add README, CHANGELOG and update yml file (#8)

* Fix/sync main to develop (#9)

* release: merge develop into main (CLI + UX + Windows exe support) (#4)

* developed cli for auditgen  (#1)

* initial setup for basi cli

* fix issue in basi cli

* feat: improve CLI UX, prompts, and generate workflow

* change desing of CLI

* fix: address CodeRabbit review comments

* fix: check brd file is docx in the flag option

* fix: output path issue

* feat: add windows exe build pipeline and fix bundled template path (#3)

* feat: add windows exe build pipeline and fix bundled template path

* fix: get_base_path method

* fix: resolve exe crash due to lazy import handling (#5)

* fix: lazy import not catch by PyInstaller

* fix: add debug in the cli to check what issue it crash (#6)
ThiruNithish28 added a commit that referenced this pull request May 16, 2026
* developed cli for auditgen  (#1)

* initial setup for basi cli

* fix issue in basi cli

* feat: improve CLI UX, prompts, and generate workflow

* change desing of CLI

* fix: address CodeRabbit review comments

* fix: check brd file is docx in the flag option

* fix: output path issue

* feat: add windows exe build pipeline and fix bundled template path (#3)

* feat: add windows exe build pipeline and fix bundled template path

* fix: get_base_path method

* Sync main into develop (#7)

* release: merge develop into main (CLI + UX + Windows exe support) (#4)

* developed cli for auditgen  (#1)

* initial setup for basi cli

* fix issue in basi cli

* feat: improve CLI UX, prompts, and generate workflow

* change desing of CLI

* fix: address CodeRabbit review comments

* fix: check brd file is docx in the flag option

* fix: output path issue

* feat: add windows exe build pipeline and fix bundled template path (#3)

* feat: add windows exe build pipeline and fix bundled template path

* fix: get_base_path method

* fix: resolve exe crash due to lazy import handling (#5)

* fix: lazy import not catch by PyInstaller

* fix: add debug in the cli to check what issue it crash (#6)

* docs: add README, CHANGELOG and update yml file (#8)

* Fix/sync main to develop (#9)

* release: merge develop into main (CLI + UX + Windows exe support) (#4)

* developed cli for auditgen  (#1)

* initial setup for basi cli

* fix issue in basi cli

* feat: improve CLI UX, prompts, and generate workflow

* change desing of CLI

* fix: address CodeRabbit review comments

* fix: check brd file is docx in the flag option

* fix: output path issue

* feat: add windows exe build pipeline and fix bundled template path (#3)

* feat: add windows exe build pipeline and fix bundled template path

* fix: get_base_path method

* fix: resolve exe crash due to lazy import handling (#5)

* fix: lazy import not catch by PyInstaller

* fix: add debug in the cli to check what issue it crash (#6)

* handle the test result-1 sheet in Test Cases.xsl (#11)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant