Skip to content
This repository was archived by the owner on Apr 23, 2025. It is now read-only.

Conversation

@ipv1337
Copy link

@ipv1337 ipv1337 commented Apr 15, 2025

This PR updates references to the test directory throughout the codebase. Since tests now live in the tests/ directory instead of test_dir/, this PR updates references in configuration files, documentation, scripts, and test files.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @ipv1337, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

Summary of Changes

This pull request focuses on updating the codebase to reflect the change in the test directory structure, moving from test_dir/ to tests/. I've updated configuration files, documentation, scripts, and test files to reflect this change. The primary goal is to ensure that the test suite runs correctly and that coverage reports are accurate after the directory change.

Highlights

  • Configuration Update: Updated .coveragerc and pyproject.toml to point to the new tests/ directory for coverage and linting configurations.
  • Documentation Update: Modified docs/TESTING.md to reflect the new test directory structure and remove references to the old test_dir/.
  • Script Update: Adjusted scripts/run_core_tests.sh and scripts/run_coverage.sh to use the tests/ directory when running tests.
  • Test File Update: Updated test file paths in tests/models/test_ollama_model_context.py and tests/tools/test_tree_tool_edge_cases.py to reflect the new location.

Changelog

Click here to see the changelog
  • .coveragerc
    • Removed test_dir/ from the omit list and ensured tests/ is included.
    • No newline at end of file was removed.
  • docs/TESTING.md
    • Updated the testing structure documentation to reflect the move to the tests/ directory.
    • Removed the mention of the test_dir/ directory.
    • Minor formatting and wording adjustments for clarity.
  • pyproject.toml
    • Updated testpaths under tool.pytest.ini_options to point to tests/.
    • Updated per-file-ignores to apply to tests/* instead of test_dir/*.
    • Reordered exclude list to group env and venv entries together.
    • Updated omit list to remove */test_* and include tests/*
  • scripts/run_core_tests.sh
    • Updated the script to point to the new test file locations under the tests/ directory.
    • No newline at end of file was removed.
  • scripts/run_coverage.sh
    • Updated the script to run coverage on the tests/ directory instead of test_dir/.
    • No newline at end of file was removed.
  • tests/models/test_ollama_model_context.py
    • Updated the file path in the docstring to reflect the new location in the tests/ directory.
  • tests/tools/test_tree_tool_edge_cases.py
    • Updated the file path in the docstring to reflect the new location in the tests/ directory.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.


A directory's changed,
Tests now live in 'tests/',
Codebase finds its way.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This PR updates test directory references from test_dir to tests. The changes look good overall, ensuring consistency across the project. However, there are a few minor points that could be improved for clarity and maintainability.

Summary of Findings

  • Documentation Updates: The documentation updates in docs/TESTING.md are generally good, but some sentences could be rephrased for better clarity.
  • Script Updates: The script updates in scripts/run_core_tests.sh and scripts/run_coverage.sh correctly update the test paths. Ensure that these scripts are thoroughly tested after the changes.
  • Test File Comments: The comments in the test files are updated to reflect the new test directory structure. Consider standardizing the comment style for consistency.

Merge Readiness

The pull request is almost ready for merging. Addressing the comments related to documentation clarity and ensuring the scripts are thoroughly tested would make it ready for merging. I am unable to approve this pull request, and recommend that others review and approve this code before merging.


- `test_dir/`: Contains most test files
- `tests/`: Contains all test files, organized by module (e.g., `tests/models`, `tests/tools`).
Tests are organized in the `tests/` directory, organized by module (e.g., `tests/models`, `tests/tools`).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Consider rephrasing this sentence for better readability. For example, 'Tests are organized within the tests/ directory, categorized by module (e.g., tests/models, tests/tools).'

@github-actions
Copy link

Code Coverage Report

📊 Current Coverage: 90.46%

Detailed coverage analysis is available in SonarCloud

Coverage Change Details

This shows code coverage for changes in this PR. To improve coverage, consider adding tests for new or modified code.

@sonarqubecloud
Copy link

@ipv1337 ipv1337 merged commit f84cec5 into main Apr 15, 2025
3 checks passed
@ipv1337 ipv1337 deleted the update-test-references branch April 15, 2025 17:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants