From 75b8582e800b8c2aa8a74d2d3b2d39f7d8fdfdba Mon Sep 17 00:00:00 2001 From: Julian Abraham Date: Sat, 27 Sep 2025 17:12:16 +0530 Subject: [PATCH 1/4] added embellishments --- README.rst | 91 ------------------------------ bashplotlib/utils/.helpers.py.swp | Bin 0 -> 12288 bytes bashplotlib/utils/helpers.py | 4 +- scratch.py | 18 ++++++ 4 files changed, 20 insertions(+), 93 deletions(-) create mode 100644 bashplotlib/utils/.helpers.py.swp create mode 100644 scratch.py diff --git a/README.rst b/README.rst index b857efd..e69de29 100644 --- a/README.rst +++ b/README.rst @@ -1,91 +0,0 @@ -bashplotlib -=========== - -*plotting in the terminal* - -what is it? ------------ - -bashplotlib is a python package and command line tool for making basic -plots in the terminal. It's a quick way to visualize data when you don't -have a GUI. It's written in pure python and can quickly be installed -anywhere using pip. - -installation ------------- - -install with pip -~~~~~~~~~~~~~~~~ - -:: - - $ pip install bashplotlib - -install from source -~~~~~~~~~~~~~~~~~~~ - -:: - - $ git clone git@github.com:glamp/bashplotlib.git - $ cd bashplotlib - $ python setup.py install - -Either method will install the bashplotlib python package and will also -add hist and scatter to your python scripts folder. This folder should -be on your path (add it if it's not). - -features --------- - -- quick plotting from the command line -- customize the color, size, title, and shape of plots -- pipe data into plots with stdin - -usage ------ - -command line -~~~~~~~~~~~~ - -hist takes input from either stdin or specified using the -f parameter. -Input should be a single column of numbers. scatter takes x and y -coordinates as input form either a comma delimited file using -f or from -2 different files using -x and -y. - -in python -~~~~~~~~~ - -If you want to use bashplotlib from python, just import histogram and -scatterplot. - -:: - - from bashplotlib.scatterplot import plot_scatter - -:: - - from bashplotlib.histogram import plot_hist - -examples --------- - -:: - - $ scatter --file data/texas.txt --pch . - -:: - - $ hist --file data/exp.txt - -:: - - $ scatter -x data/x_test.txt -y data/y_test.txt - -todo ----- - -- sideways numbers for x-axis of histograms -- colors for individual points -- line charts -- trendlines - diff --git a/bashplotlib/utils/.helpers.py.swp b/bashplotlib/utils/.helpers.py.swp new file m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2>xOr^|yP+bIuw+`iE) z>wc!@sZv~*wi0*SHD5~`5o@$u--<+7S$7VbF1y8skWYo#gEH$J_EI-5Rs39YJ=*8C z5v+W+xxBo-ygDk^oC~irOQkNgZ*~Qe_0GXjL^X@3O~ohHlSQrWx)kp_Pwr|>NAYkf z;p$T1ns6zjvGKVISC?Yb}%=%g}u0qNV zeFeW+6SPq*z_x?!92;Su(VaFOvV>`^Dm$2$Zr3#FcFR?YRXXdz+`>6BPUITJk Date: Sat, 27 Sep 2025 17:46:06 +0530 Subject: [PATCH 2/4] main graph embellisments --- bashplotlib/scatterplot.py | 4 ++-- bashplotlib/utils/.helpers.py.swp | Bin 12288 -> 0 bytes 2 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 bashplotlib/utils/.helpers.py.swp diff --git a/bashplotlib/scatterplot.py b/bashplotlib/scatterplot.py index 69cab9d..9261833 100644 --- a/bashplotlib/scatterplot.py +++ b/bashplotlib/scatterplot.py @@ -34,7 +34,7 @@ def _plot_scatter(xs, ys, size, pch, colour, title, cs): if title: print(box_text(title, 2 * (len(get_scale(xs, False, size)) + 1))) - print("-" * (2 * (len(get_scale(xs, False, size)) + 2))) + print("+" + ("-" * (2 * (len(get_scale(xs, False, size)) + 1))) + "+") for y in get_scale(ys, True, size): print("|", end=' ') for x in get_scale(xs, False, size): @@ -47,7 +47,7 @@ def _plot_scatter(xs, ys, size, pch, colour, title, cs): colour = cs[i] printcolour(point + " ", True, colour) print(" |") - print("-" * (2 * (len(get_scale(xs, False, size)) + 2))) + print("+" + ("-" * (2 * (len(get_scale(xs, False, size)) + 1))) + "+") def plot_scatter(f, xs, ys, size, pch, colour, title): """ diff --git a/bashplotlib/utils/.helpers.py.swp b/bashplotlib/utils/.helpers.py.swp deleted file mode 100644 index c6a4dbb6d85cdb69b201c3b4a953e755d70ea023..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI2&u<$=6vw9sAt6fQ-m5)u~<+yDs>SEy7j{0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kNgZ*~Qe_0GXjL^X@3O~ohHlSQrWx)kp_Pwr|>NAYkf z;p$T1ns6zjvGKVISC?Yb}%=%g}u0qNV zeFeW+6SPq*z_x?!92;Su(VaFOvV>`^Dm$2$Zr3#FcFR?YRXXdz+`>6BPUITJk Date: Sun, 28 Sep 2025 10:05:18 +0530 Subject: [PATCH 3/4] "Claude PR Assistant workflow" --- .github/workflows/claude.yml | 50 ++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/claude.yml diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml new file mode 100644 index 0000000..b1a3201 --- /dev/null +++ b/.github/workflows/claude.yml @@ -0,0 +1,50 @@ +name: Claude Code + +on: + issue_comment: + types: [created] + pull_request_review_comment: + types: [created] + issues: + types: [opened, assigned] + pull_request_review: + types: [submitted] + +jobs: + claude: + if: | + (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) || + (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) || + (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) || + (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude'))) + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: read + issues: read + id-token: write + actions: read # Required for Claude to read CI results on PRs + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Run Claude Code + id: claude + uses: anthropics/claude-code-action@v1 + with: + claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} + + # This is an optional setting that allows Claude to read CI results on PRs + additional_permissions: | + actions: read + + # Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it. + # prompt: 'Update the pull request description to include a summary of changes.' + + # Optional: Add claude_args to customize behavior and configuration + # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md + # or https://docs.claude.com/en/docs/claude-code/sdk#command-line for available options + # claude_args: '--model claude-opus-4-1-20250805 --allowed-tools Bash(gh pr:*)' + From af3f9bc9e631d82fdcd80b59fde3d4b2a54eea5f Mon Sep 17 00:00:00 2001 From: Julian Abraham Date: Sun, 28 Sep 2025 10:05:20 +0530 Subject: [PATCH 4/4] "Claude Code Review workflow" --- .github/workflows/claude-code-review.yml | 57 ++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/claude-code-review.yml diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml new file mode 100644 index 0000000..31c04fd --- /dev/null +++ b/.github/workflows/claude-code-review.yml @@ -0,0 +1,57 @@ +name: Claude Code Review + +on: + pull_request: + types: [opened, synchronize] + # Optional: Only run on specific file changes + # paths: + # - "src/**/*.ts" + # - "src/**/*.tsx" + # - "src/**/*.js" + # - "src/**/*.jsx" + +jobs: + claude-review: + # Optional: Filter by PR author + # if: | + # github.event.pull_request.user.login == 'external-contributor' || + # github.event.pull_request.user.login == 'new-developer' || + # github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' + + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: read + issues: read + id-token: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Run Claude Code Review + id: claude-review + uses: anthropics/claude-code-action@v1 + with: + claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} + prompt: | + REPO: ${{ github.repository }} + PR NUMBER: ${{ github.event.pull_request.number }} + + Please review this pull request and provide feedback on: + - Code quality and best practices + - Potential bugs or issues + - Performance considerations + - Security concerns + - Test coverage + + Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback. + + Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR. + + # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md + # or https://docs.claude.com/en/docs/claude-code/sdk#command-line for available options + claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"' +