-
Notifications
You must be signed in to change notification settings - Fork 0
chore: move test_results into test/ and lint handlers #24
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
Conversation
…he for provider jobs
| name: Static analysis & unit tests (one python) | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.11' | ||
| - name: Cache pip | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.cache/pip | ||
| key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pip- | ||
| - name: Install dependencies for static | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install -r requirements.txt | ||
| pip install pytest pytest-cov mypy | ||
| - name: Run ruff (lint) | ||
| run: | | ||
| python -m pip install ruff | ||
| python -m ruff check src/ | ||
| - name: Run unit tests with coverage | ||
| run: | | ||
| PYTHONPATH=. pytest --cov=src/ --cov-report=xml | ||
| - name: Upload coverage to Codecov | ||
| uses: codecov/codecov-action@v4 | ||
| with: | ||
| files: ./coverage.xml | ||
| fail_ci_if_error: false | ||
| token: ${{ secrets.CODECOV_TOKEN }} | ||
| - name: Run mypy static analysis | ||
| run: mypy src/ --ignore-missing-imports --exclude "src/llm/router.py" | ||
|
|
||
| tests: |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Copilot Autofix
AI 3 months ago
Copilot could not generate an autofix suggestion
Copilot could not generate an autofix suggestion for this alert. Try pushing a new commit or if the problem persists contact support.
| name: Run tests matrix | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: [3.11, 3.12] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| - name: Cache pip | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.cache/pip | ||
| key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements.txt') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pip- | ||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| python -m venv .venv_ci | ||
| . .venv_ci/bin/activate | ||
| pip install --upgrade pip setuptools wheel | ||
| pip install -r requirements.txt | ||
| - name: Run tests | ||
| env: | ||
| PYTHONPATH: . | ||
| run: | | ||
| python -m pytest -q | ||
| deepagent-test: |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Copilot Autofix
AI 3 months ago
Copilot could not generate an autofix suggestion
Copilot could not generate an autofix suggestion for this alert. Try pushing a new commit or if the problem persists contact support.
| name: DeepAgent focused tests (fast) | ||
| runs-on: ubuntu-latest | ||
| needs: tests | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: 3.12 | ||
| - name: Cache pip | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.cache/pip | ||
| key: ${{ runner.os }}-pip-3.12-${{ hashFiles('**/requirements.txt') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pip- | ||
| - name: Install test deps only | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| python -m venv .venv_ci | ||
| . .venv_ci/bin/activate | ||
| pip install --upgrade pip setuptools wheel | ||
| pip install pytest python-dotenv | ||
| - name: Run deepagent unit tests | ||
| env: | ||
| PYTHONPATH: . | ||
| run: | | ||
| python -m pytest -q test/unit/test_deepagent.py test/unit/test_deepagent_providers.py | ||
| provider-smoke: |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Copilot Autofix
AI 3 months ago
Copilot could not generate an autofix suggestion
Copilot could not generate an autofix suggestion for this alert. Try pushing a new commit or if the problem persists contact support.
| name: Provider smoke (manual) | ||
| runs-on: ubuntu-latest | ||
| if: github.event_name == 'workflow_dispatch' | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: 3.12 | ||
| - name: Install provider packages | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| python -m venv .venv_ci | ||
| . .venv_ci/bin/activate | ||
| pip install --upgrade pip setuptools wheel | ||
| pip install langchain-google-genai langchain-community langchain-ollama python-dotenv | ||
| - name: Cache pip for provider-smoke | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.cache/pip | ||
| key: ${{ runner.os }}-pip-provider-smoke-${{ hashFiles('**/requirements.txt') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pip- | ||
| - name: Quick deepagent smoke (dry-run disabled) | ||
| env: | ||
| PYTHONPATH: . | ||
| run: | | ||
| python -c "from src.agents import deepagent; a=deepagent.SDLCFlexibleAgent(provider='gemini', model='chat-bison-001', dry_run=True); print('constructed', getattr(a, 'llm', None))" | ||
| providers: |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
This autofix suggestion was applied.
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 months ago
To fix the problem, add a permissions block to the workflow file .github/workflows/python-test.yml. The block should be placed at the root level (before the jobs: key) so that it applies to all jobs in the workflow, unless a job overrides it. The minimal required permission for this workflow is contents: read, since none of the jobs require write access to repository contents or other privileged scopes. No additional imports or definitions are needed; this is a YAML configuration change only.
Steps:
- Insert the following block after the workflow
name:and before theon:key:permissions: contents: read
- This change applies to the entire workflow and all jobs within it.
-
Copy modified lines R3-R5
| @@ -1,5 +1,8 @@ | ||
| name: Python Tests (consolidated) | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main ] |
| name: Providers matrix (optional) | ||
| runs-on: ubuntu-latest | ||
| if: github.event_name == 'workflow_dispatch' && github.event.inputs.run_providers == 'true' | ||
| strategy: | ||
| matrix: | ||
| provider: [gemini, openai, ollama] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Cache pip | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.cache/pip | ||
| key: ${{ runner.os }}-pip-providers-${{ matrix.provider }}-${{ hashFiles('**/requirements.txt') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pip- | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: 3.12 | ||
| - name: Install provider packages | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install -r requirements.txt | ||
| pip install langchain-google-genai langchain-community langchain-ollama | ||
| - name: Run provider smoke for matrix provider | ||
| env: | ||
| PYTHONPATH: . | ||
| run: | | ||
| python -c "from src.agents import deepagent; p='${{ matrix.provider }}'; d = deepagent.SDLCFlexibleAgent(provider=p, dry_run=True); print('provider', p, 'dry_run', getattr(d, 'dry_run', False))" |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Copilot Autofix
AI 3 months ago
Copilot could not generate an autofix suggestion
Copilot could not generate an autofix suggestion for this alert. Try pushing a new commit or if the problem persists contact support.
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: [3.12] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install -r requirements.txt | ||
| - name: Run tests | ||
| env: | ||
| PYTHONPATH: . | ||
| run: | | ||
| python -m pytest -q |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 months ago
To fix the problem, add a permissions block to the workflow file to explicitly set the minimum required permissions for the workflow. Since this workflow only checks out code and runs tests, it does not require any write permissions. The minimal required permission is contents: read, which allows the workflow to read the repository contents. This block should be added at the top level of the workflow file (just after the name field and before on:), so it applies to all jobs in the workflow. No additional imports or definitions are needed.
-
Copy modified lines R1-R2
| @@ -1,3 +1,5 @@ | ||
| permissions: | ||
| contents: read | ||
| name: Python Tests | ||
|
|
||
| on: |
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.
check-spelling found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
…ain permissions yes Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
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.
Pull Request Overview
This is a repository maintenance PR focused on improving project organization and code quality. The changes consolidate test artifacts under the test/ directory and apply automated linting fixes to the handlers module.
Key changes:
- Moved
test_results/directory intotest/test_results/for better organization - Applied automated linting fixes to
src/handlersmodule - Added GitHub Actions permissions configuration
| @@ -1,5 +1,8 @@ | |||
| name: Python Tests (consolidated) | |||
|
|
|||
| permissions: | |||
Copilot
AI
Aug 19, 2025
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.
Adding permissions configuration is good practice, but consider being more specific about required permissions. Using 'contents: read' is appropriately restrictive for a test workflow that only needs to read repository contents.
This comment has been minimized.
This comment has been minimized.
@check-spelling-bot Report🔴 Please reviewSee the 📂 files view, the 📜action log, or 📝 job summary for details.Unrecognized words (24660)Truncated, please see the job summary, log, or artifact if available. These words are not needed and should be removedTruncated, please see the job summary, log, or artifact if available. Some files were automatically ignored 🙈These sample patterns would exclude them: You should consider excluding directory paths (e.g. You should consider adding them to: File matching is via Perl regular expressions. To check these files, more of their words need to be in the dictionary than not. You can use Script unavailableTruncated, please see the job summary, log, or artifact if available. OR To have the bot accept them for you, comment in the PR quoting the following line: Forbidden patterns 🙅 (42)In order to address this, you could change the content to not match the forbidden patterns (comments before forbidden patterns may help explain why they're forbidden), add patterns for acceptable instances, or adjust the forbidden patterns themselves. These forbidden patterns matched content: Should be
|
| ❌ Errors, Warnings, and Notices | Count |
|---|---|
| 319 | |
| ℹ️ candidate-pattern | 60 |
| ❌ check-file-path | 9800 |
| ❌ forbidden-pattern | 1749 |
| 1 | |
| 137 | |
| ❌ slow-file | 1 |
| 87 |
See ❌ Event descriptions for more information.
✏️ Contributor please read this
By default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.
If the listed items are:
- ... misspelled, then please correct them instead of using the command.
- ... names, please add them to
.github/actions/spelling/allow/names.txt. - ... APIs, you can add them to a file in
.github/actions/spelling/allow/. - ... just things you're using, please add them to an appropriate file in
.github/actions/spelling/expect/. - ... tokens you only need in one place and shouldn't generally be used, you can add an item in an appropriate file in
.github/actions/spelling/patterns/.
See the README.md in each directory for more information.
🔬 You can test your commits without appending to a PR by creating a new branch with that extra change and pushing it to your fork. The check-spelling action will run in response to your push -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. 😉
If the flagged items are 🤯 false positives
If items relate to a ...
-
binary file (or some other file you wouldn't want to check at all).
Please add a file path to the
excludes.txtfile matching the containing file.File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.
^refers to the file's path from the root of the repository, so^README\.md$would exclude README.md (on whichever branch you're using). -
well-formed pattern.
If you can write a pattern that would match it,
try adding it to thepatterns.txtfile.Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.
Note that patterns can't match multiline strings.
chore: move test_results into test/ and lint handlers
What I changed
test_results/intotest/test_results/to group test artifacts with tests.ruff --fixtosrc/handlers(small, focused linting commit). No functional changes.Why
test/for cleaner repo layout.Notes for reviewers
test/test_results/, update any external tooling that referencedtest_results/directly.