Phase 4: Enable git-aware packaging by default - #296
Open
GargiGupta-io wants to merge 4 commits into
Open
Conversation
GargiGupta-io
requested review from
JyotinderSingh,
divyashreepathihalli and
jeffcarp
as code owners
August 11, 2026 18:56
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the packaging utility in kinetic/utils/packager.py to respect .gitignore when zipping the working directory. It introduces helper functions to list git-tracked and non-ignored files using git ls-files, check for excluded paths, and write these files to the ZIP archive. If the directory is not a git repository, it gracefully falls back to the existing os.walk traversal. Unit tests have been added in kinetic/utils/packager_test.py to verify this new behavior. I have no feedback to provide.
Adds helper functions to support git-aware packaging: - _list_git_files(): Lists tracked and non-ignored untracked files - _path_is_excluded(): Checks if a path should be excluded - _write_git_files(): Recursively writes files to ZIP respecting exclusions These functions enable respecting .gitignore when zipping working directories.
- Uses git ls-files when in a git repository to respect .gitignore - Falls back to directory traversal with os.walk when not in a git repo - Maintains all existing features: empty directory preservation, secret detection, path exclusion - Updated docstring to document git integration
Adds tests for: - _list_git_files in a git repository - _list_git_files when not in a git repository (returns None) - _path_is_excluded functionality Tests ensure git integration works correctly and falls back gracefully.
Documents the git ls-files integration in the module docstring: - Explains automatic .gitignore respect in git repos - Documents fallback to directory traversal for non-git directories - Notes .kineticignore pattern matching in fallback mode Completes the git-aware packaging feature implementation.
GargiGupta-io
force-pushed
the
phase-4-enable-default
branch
from
August 11, 2026 20:07
adb8ac5 to
b9f3b4d
Compare
Author
|
See #294 for full context and merge order instructions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Finalizes git-aware packaging feature:
Part of #288 (Phase 4 of 4). Merge after #295.
Note: See #293 for merge strategy on stacked PRs.