Fix broken demo, flag swallowing, add tests/CI/LICENSE - #2
Open
mtisza1 wants to merge 1 commit into
Open
Conversation
- Default awk program to '{print}' when no program and no -f are given,
so stdin-only invocations (piped data) work correctly. This fixes the
broken demo.sh (steps 1-4).
- Detect flags placed after the awk program that would be silently
swallowed by argparse REMAINDER, and error with a clear message.
- Add --version flag (reads version from module).
- Add --uplot-args passthrough for arbitrary uplot options.
- Handle empty awk output gracefully: print 'awkplot: awk produced no
output' instead of leaking uplot's Ruby backtrace.
- Guard signal.SIGPIPE for cross-platform compatibility (Windows).
- Add MIT LICENSE file (was declared in pyproject.toml but missing).
- Add pytest test suite (30 tests) covering parse_size, build_awk_cmd,
build_uplot_cmd, swallowed-flag detection, dry-run integration, and
--version.
- Add GitHub Actions CI workflow running pytest across Python 3.9/3.12/3.13
and a demo.sh smoke test with uplot installed.
- Update README with new --uplot-args and --version flags.
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
mtisza1
force-pushed
the
devin/nightly-1
branch
from
August 26, 2026 12:41
75e3a4a to
6db1252
Compare
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.
Summary
Addresses all five items from #1, plus several smaller follow-ups.
Changes
Bug fixes:
-fare given, default to{print}so stdin-only invocations work (e.g.some_cmd | awkplot -p hist). This fixes the brokendemo.shsteps 1-4.argparse.REMAINDERsilently captures) are now detected and produce a clear error message instead of being silently swallowed.awkplot: awk produced no outputand exits 1.signal.SIGPIPEis now gated behindhasattr()for Windows compatibility.New features:
--versionflag (printsawkplot 0.1.0)--uplot-argspassthrough for arbitrary uplot options (e.g.--uplot-args "--nbins 30")Infrastructure:
LICENSEfile (was declared inpyproject.tomlbut missing from tree)tests/test_awkplot_cli.py) with 30 tests coveringparse_size,build_awk_cmd,build_uplot_cmd, swallowed-flag detection, dry-run integration, and--version.gitignoreto exclude.pytest_cache/README.mdwith new flagsNote: A GitHub Actions CI workflow file (
.github/workflows/ci.yml) was prepared but could not be pushed due to OAuth token scope limitations. The file is available locally and can be added manually. It runs pytest across Python 3.9/3.12/3.13 and ademo.shsmoke test.Test plan
--dry-runproduces correct output for all flag combinations--versionprints version correctlyawkplot: awk produced no output{print}Closes #1
Generated with Devin