-
Notifications
You must be signed in to change notification settings - Fork 6
Claude/add beta disclaimers n xi ai #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
057ce10
55858d6
2652175
5a894d5
332307e
7b856be
f328864
fe2801e
2cf2e98
c419b4a
14d0ec2
5c77a78
9add1a5
9e35be4
6050de7
56aec7c
587ef8e
3bfdfb1
3148692
41f1fcd
1ef32e1
ac20f2a
6873e6f
811b6c5
16bf920
28aad3a
6491d99
f032876
fcd8d9e
d64e9a5
3cd9e85
72d0b8b
420c5f2
7bc4068
e0c6169
d08042a
6622a98
f45aaad
fe68013
8217e1f
8671ac5
484d8fe
46c93cd
8c032c3
024bbdb
150210c
09f4fd0
1191d54
92278ef
5f51ae6
4c6b69e
05986dc
18cc9e6
b78c4d6
b0817d7
bb37efe
46980cb
f930256
3b9849c
b258fcb
258c40b
a6ba87c
d623dfa
084bf6a
10a72b4
4402a49
bc2d05f
216948e
c45d127
a75cd6e
eac118c
ce3612d
7907a2c
560351b
a9a3c1f
c73447f
45d5b4b
967ead2
f3f2072
201b3dd
61d0b32
3a96451
fc8b19b
d2e7689
dd340b4
1757810
c97c6bc
2ffa665
164e57b
019c6eb
724c340
cfeb786
4fb8c33
b81c56e
26d5596
cc2dcc0
745a635
d3dedb6
80d7348
62614d5
6275d29
35cf694
bc002cd
d4cea87
6c6d279
e9f2d92
cf338ba
c59288f
1df59e2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "permissions": { | ||
| "allow": [ | ||
| "Bash(rm:*)", | ||
| "Bash(.venv/bin/python -m pytest:*)", | ||
| "Bash(~/.local/bin/uv venv:*)", | ||
| "Bash(~/.local/bin/uv pip install:*)" | ||
| ] | ||
| } | ||
| } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # Auto detect text files and perform LF normalization | ||
| * text=auto | ||
|
|
||
| # Force LF for all text files | ||
| *.py text eol=lf | ||
| *.md text eol=lf | ||
| *.yml text eol=lf | ||
| *.yaml text eol=lf | ||
| *.json text eol=lf | ||
| *.toml text eol=lf | ||
| *.txt text eol=lf | ||
| *.rst text eol=lf | ||
| *.R text eol=lf | ||
| *.Rd text eol=lf | ||
| *.Rnw text eol=lf | ||
| *.bib text eol=lf | ||
|
|
||
| # Binary files | ||
| *.png binary | ||
| *.jpg binary | ||
| *.gif binary | ||
| *.ico binary | ||
| *.pdf binary |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| --- | ||
| name: Bug Report | ||
| about: Create a report to help us improve sensPy | ||
| --- | ||
|
|
||
| **Describe the bug** | ||
| A clear and concise description of what the bug is. | ||
|
|
||
| **To Reproduce** | ||
| Steps to reproduce the behavior. | ||
|
|
||
| **Expected behavior** | ||
| A clear and concise description of what you expected to happen. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| ## Summary | ||
| Describe the changes in this pull request. | ||
|
|
||
| ## Testing | ||
| - [ ] `pytest` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| # Place this file in: .github/workflows/auto-comment-gemini-review.yml | ||
|
|
||
| name: Auto Comment Gemini Review | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - '**' # Trigger on push to any branch | ||
|
|
||
| jobs: | ||
| comment-gemini-review: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| pull-requests: write # Required to comment on pull requests | ||
| contents: read # Required to access repository contents | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Get branch name | ||
| id: branch | ||
| run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Check for open pull requests | ||
| id: check-pr | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GEMINI_REVIEW_TOKEN }} # Use organization secret | ||
| run: | | ||
| PR_JSON=$(gh api \ | ||
| -H "Accept: application/vnd.github+json" \ | ||
| "/repos/${{ github.repository }}/pulls?head=${{ github.repository_owner }}:${{ steps.branch.outputs.branch }}&state=open") | ||
| PR_COUNT=$(echo "$PR_JSON" | jq length) | ||
| if [ "$PR_COUNT" -gt 0 ]; then | ||
| PR_NUMBER=$(echo "$PR_JSON" | jq -r '.[0].number') | ||
| echo "Found open PR #$PR_NUMBER" | ||
| echo "pr_number=$PR_NUMBER" >> $GITHUB_OUTPUT | ||
| else | ||
| echo "No open PR found for branch ${{ steps.branch.outputs.branch }}" | ||
| echo "pr_number=" >> $GITHUB_OUTPUT | ||
| fi | ||
|
|
||
| - name: Comment on pull request | ||
| if: steps.check-pr.outputs.pr_number != '' | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GEMINI_REVIEW_TOKEN }} # Use organization secret | ||
| run: | | ||
| gh api \ | ||
| -H "Accept: application/vnd.github+json" \ | ||
| "/repos/${{ github.repository }}/issues/${{ steps.check-pr.outputs.pr_number }}/comments" \ | ||
| -f body='/gemini review' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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://code.claude.com/docs/en/cli-reference 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:*)"' | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Claude review workflow cannot post PR comments
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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://code.claude.com/docs/en/cli-reference for available options | ||
| # claude_args: '--allowed-tools Bash(gh pr:*)' | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| name: Deploy Docs | ||
|
|
||
| on: | ||
| push: | ||
| branches: [master] | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pages: write | ||
| id-token: write | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.11' | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| pip install mkdocs mkdocs-material mkdocstrings[python] | ||
|
|
||
| - name: Build docs | ||
| run: mkdocs build | ||
|
|
||
| - name: Upload artifact | ||
| uses: actions/upload-pages-artifact@v3 | ||
| with: | ||
| path: site/ | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| deploy: | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| environment: | ||
| name: github-pages | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
| steps: | ||
| - name: Deploy to GitHub Pages | ||
| id: deployment | ||
| uses: actions/deploy-pages@v4 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| name: Publish to PyPI | ||
|
|
||
| on: | ||
| release: | ||
| types: [published] | ||
| workflow_dispatch: # Manual trigger | ||
|
|
||
| jobs: | ||
| publish: | ||
| runs-on: ubuntu-latest | ||
| environment: pypi | ||
| permissions: | ||
| id-token: write # For trusted publishing | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v4 | ||
|
|
||
| - name: Set up Python | ||
| run: uv python install 3.11 | ||
|
|
||
| - name: Build package | ||
| run: | | ||
| uv venv .venv | ||
| uv pip install build | ||
| uv run python -m build | ||
|
|
||
| - name: Publish to PyPI | ||
| uses: pypa/gh-action-pypi-publish@release/v1 | ||
| with: | ||
| # For trusted publishing (no token needed if configured on PyPI) | ||
| # Or use: password: ${{ secrets.PYPI_API_TOKEN }} | ||
| packages-dir: dist/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [master, main] | ||
| pull_request: | ||
| branches: [master, main] | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| python-version: ['3.10', '3.11', '3.12'] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v4 | ||
|
|
||
| - name: Set up Python ${{ matrix.python-version }} | ||
| run: uv python install ${{ matrix.python-version }} | ||
|
|
||
| - name: Create venv and install dependencies | ||
| run: | | ||
| uv venv .venv --python ${{ matrix.python-version }} | ||
| uv pip install -e . | ||
| uv pip install pytest pytest-cov | ||
|
|
||
| - name: Run tests with coverage | ||
| run: uv run pytest tests/ -v --tb=short --cov=senspy --cov-report=xml --cov-report=term-missing | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| - name: Upload coverage reports to Codecov | ||
| if: matrix.python-version == '3.11' | ||
| uses: codecov/codecov-action@v5 | ||
| with: | ||
| token: ${{ secrets.CODECOV_TOKEN }} | ||
| fail_ci_if_error: false | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,28 @@ | ||
| .Rproj.user | ||
| .Rhistory | ||
| .RData | ||
| .Ruserdata | ||
| # Ignore all files ending with a 'tilde' (autogenerated by some | ||
| # programs, e.g. emacs): | ||
| *~ | ||
| /doc/ | ||
| /Meta/ | ||
| # Byte-compiled / optimized / DLL files | ||
| __pycache__/ | ||
| *.py[cod] | ||
| *.so | ||
|
|
||
| # Virtual environments | ||
| venv/ | ||
| .env | ||
|
|
||
| # Distribution / packaging | ||
| build/ | ||
| dist/ | ||
| *.egg-info/ | ||
|
|
||
| # Misc | ||
| .DS_Store | ||
|
|
||
| # Build outputs | ||
| site/ | ||
|
|
||
| # Test/cache | ||
| .pytest_cache/ | ||
| .coverage | ||
| coverage.xml | ||
| htmlcov/ | ||
|
|
||
| # Virtual environments | ||
| .venv/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The permission
Bash(rm:*)is overly broad and presents a significant security risk. It allows the execution ofrmwith any arguments, which could lead to the unintentional deletion of any file or directory. It's crucial to restrict this permission to only what is absolutely necessary."Bash(rm:-rf:build dist *.egg-info site .pytest_cache .coverage coverage.xml htmlcov)"