qodo-cover
Qodo-Cover: An AI-Powered Tool for Automated Test Generation and Code Coverage Enhancement! ๐ป๐ค๐งช๐
Top Related Projects
Robust Speech Recognition via Large-Scale Weak Supervision
WhisperX: Automatic Speech Recognition with Word-level Timestamps (& Diarization)
Port of OpenAI's Whisper model in C/C++
High-performance GPGPU inference of OpenAI's Whisper automatic speech recognition (ASR) model
Faster Whisper transcription with CTranslate2
Facebook AI Research Sequence-to-Sequence Toolkit written in Python.
Quick Overview
Qodo Cover is an AI-powered tool designed to generate high-quality cover letters based on job descriptions and resumes. It aims to streamline the job application process by creating personalized and professional cover letters tailored to specific job opportunities.
Pros
- Saves time and effort in crafting individual cover letters for multiple job applications
- Utilizes AI to create personalized content based on job descriptions and resumes
- Potentially improves the quality and relevance of cover letters for job seekers
- Accessible through a user-friendly web interface
Cons
- May lack the personal touch and unique voice of a manually written cover letter
- Potential for generating generic content if not properly fine-tuned
- Dependence on AI algorithms could lead to occasional inaccuracies or misinterpretations
- Limited customization options for users who want more control over the final output
Code Examples
As Qodo Cover is a web-based tool and not a code library, there are no code examples to provide.
Getting Started
Since Qodo Cover is a web application and not a code library, there are no specific code-based getting started instructions. Users can access the tool through its website and follow the provided user interface to generate cover letters.
Competitor Comparisons
Robust Speech Recognition via Large-Scale Weak Supervision
Pros of Whisper
- Highly accurate speech recognition across multiple languages
- Open-source with extensive documentation and community support
- Capable of handling various audio formats and noisy environments
Cons of Whisper
- Requires significant computational resources for optimal performance
- Limited real-time transcription capabilities
- Primarily focused on speech-to-text, lacking additional audio analysis features
Code Comparison
Whisper:
import whisper
model = whisper.load_model("base")
result = model.transcribe("audio.mp3")
print(result["text"])
Qodo-cover:
# No public code available for comparison
Additional Notes
Whisper is a well-established, general-purpose speech recognition system developed by OpenAI. It offers robust multilingual support and high accuracy across various audio conditions. However, it may require substantial computational resources for optimal performance.
Qodo-cover, on the other hand, appears to be a more specialized tool focused on audio analysis for cover song detection. While it may offer unique features in this domain, there is limited public information available about its capabilities and implementation.
Due to the lack of publicly available code for Qodo-cover, a direct code comparison is not possible. The provided Whisper code snippet demonstrates its straightforward usage for transcription tasks.
WhisperX: Automatic Speech Recognition with Word-level Timestamps (& Diarization)
Pros of WhisperX
- Specialized in audio transcription and alignment
- Offers advanced features like word-level timestamps and speaker diarization
- Actively maintained with frequent updates
Cons of WhisperX
- Limited to audio processing tasks
- Requires more technical expertise to set up and use
- May have higher computational requirements
Code Comparison
WhisperX:
import whisperx
model = whisperx.load_model("large-v2")
result = model.transcribe("audio.mp3")
aligned_segments = whisperx.align(result["segments"], model, "audio.mp3")
Qodo-cover:
from qodo_cover import QodoCover
qodo = QodoCover()
result = qodo.generate_cover("Your article content here")
print(result.cover_text)
WhisperX focuses on audio transcription and alignment, providing detailed output including timestamps and speaker information. It requires more setup and is tailored for audio processing tasks.
Qodo-cover, on the other hand, is designed for generating cover text for articles. It has a simpler API and is more focused on text processing and generation.
The choice between these repositories depends on the specific use case: WhisperX for audio-related tasks, and Qodo-cover for article summarization and cover text generation.
Port of OpenAI's Whisper model in C/C++
Pros of whisper.cpp
- Highly optimized C++ implementation for efficient speech recognition
- Supports various platforms and architectures, including mobile devices
- Offers both command-line and library interfaces for flexibility
Cons of whisper.cpp
- Focused solely on speech recognition, lacking additional features
- Requires more technical expertise to set up and use effectively
- May have higher resource requirements for large-scale deployments
Code Comparison
whisper.cpp:
#include "whisper.h"
int main(int argc, char** argv) {
struct whisper_context * ctx = whisper_init_from_file("ggml-base.en.bin");
whisper_full_default(ctx, wparams, pcmf32.data(), pcmf32.size());
whisper_print_timings(ctx);
whisper_free(ctx);
}
qodo-cover:
from qodo_cover import QodoCover
qodo = QodoCover()
result = qodo.generate_cover_letter(
job_description="Software Engineer",
resume="My resume content"
)
print(result)
Summary
whisper.cpp is a specialized speech recognition library with high performance and cross-platform support. It's ideal for developers needing efficient speech-to-text capabilities. qodo-cover, on the other hand, focuses on generating cover letters using AI. While whisper.cpp offers more flexibility and optimization for speech recognition tasks, qodo-cover provides a simpler interface for a specific use case in the job application process.
High-performance GPGPU inference of OpenAI's Whisper automatic speech recognition (ASR) model
Pros of Whisper
- Optimized for performance with GPU acceleration
- Supports multiple languages for transcription
- Provides a C++ implementation for better integration with native applications
Cons of Whisper
- Limited to audio transcription and translation
- Requires more technical knowledge to set up and use
- May have higher system requirements due to GPU acceleration
Code Comparison
Whisper (C++):
auto result = whisper_full_parallel(ctx, wparams, samples.data(), samples.size(), n_processors);
if (result != 0) {
fprintf(stderr, "failed to process audio\n");
return 10;
}
qodo-cover (Python):
from qodo_cover import QodoCover
qodo = QodoCover()
result = qodo.generate_cover_letter(job_description, resume)
print(result)
Summary
Whisper focuses on efficient audio transcription and translation, leveraging GPU acceleration for performance. It offers a C++ implementation, making it suitable for native applications. However, it requires more technical expertise to set up and use.
qodo-cover, on the other hand, is a Python-based tool for generating cover letters. It's likely easier to use for non-technical users but may have limited functionality compared to Whisper's audio processing capabilities.
The choice between these repositories depends on the specific use case: audio processing (Whisper) or cover letter generation (qodo-cover).
Faster Whisper transcription with CTranslate2
Pros of faster-whisper
- Optimized for speed, potentially offering faster transcription
- Supports multiple languages and provides language detection
- Implements efficient memory usage and streaming capabilities
Cons of faster-whisper
- Focused solely on speech-to-text, lacking additional features
- May require more setup and configuration for integration
- Limited to audio input formats supported by the Whisper model
Code Comparison
faster-whisper:
from faster_whisper import WhisperModel
model = WhisperModel("large-v2", device="cuda", compute_type="float16")
segments, info = model.transcribe("audio.mp3", beam_size=5)
for segment in segments:
print("[%.2fs -> %.2fs] %s" % (segment.start, segment.end, segment.text))
qodo-cover:
# No direct code comparison available as qodo-cover
# focuses on different functionality (image generation)
# and doesn't provide public code samples for transcription
Summary
faster-whisper is a specialized speech-to-text library optimized for performance, while qodo-cover appears to be focused on image generation. The repositories serve different purposes, making a direct comparison challenging. faster-whisper offers efficient transcription capabilities, while qodo-cover likely provides image-related functionalities. The choice between them depends on the specific requirements of your project.
Facebook AI Research Sequence-to-Sequence Toolkit written in Python.
Pros of fairseq
- Comprehensive toolkit for sequence modeling tasks
- Extensive documentation and community support
- Highly customizable and modular architecture
Cons of fairseq
- Steeper learning curve due to complexity
- Requires more computational resources
- May be overkill for simpler projects
Code Comparison
fairseq:
from fairseq.models.transformer import TransformerModel
model = TransformerModel.from_pretrained('/path/to/model', checkpoint_file='model.pt')
tokens = model.encode('Hello world!')
translated = model.translate(tokens)
print(translated)
qodo-cover:
from qodo_cover import QodoCover
qodo = QodoCover(api_key='your_api_key')
result = qodo.generate_cover('Your text here')
print(result)
Summary
fairseq is a powerful and versatile toolkit for sequence modeling tasks, offering extensive features and customization options. It's well-suited for complex research projects and large-scale applications. However, it may be more challenging to set up and use for beginners or smaller projects.
qodo-cover, on the other hand, appears to be a more focused tool, likely easier to use for specific tasks related to cover generation. It has a simpler API, making it potentially more accessible for quick implementations or projects with specific cover-related needs.
The choice between the two depends on the project requirements, scale, and the user's expertise level in sequence modeling and natural language processing.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Qodo Cover
Qodo Cover aims to help efficiently increase code coverage, by automatically generating qualified tests to extend code coverage. Qodo Cover can run in your GitHub CI workflow or locally as a CLI tool.
Table of Contents
News and Updates
2024-12-04:
New mode - Run Qodo Cover Pro in your GitHub CI workflow. Currently in preview and available for free for a limited time for Python projects, leveraging your own LLM API key from your favorite LLM provider. It's a practical way to improve code quality and reliability. For more details, reach out to the Qodo team.
2024-11-05:
New mode - scan an entire repo, auto identify the test files, auto collect context for each test file, and extend the test suite with new tests. See more details here.
Qodo-Cover
Welcome to Qodo-Cover. This focused project utilizes Generative AI to automate and enhance the generation of tests (currently mostly unit tests), aiming to streamline development workflows. Qodo-Cover can run via a terminal, and is planned to be integrated into popular CI platforms.
We invite the community to collaborate and help extend the capabilities of Qodo Cover, continuing its development as a cutting-edge solution in the automated unit test generation domain. We also wish to inspire researchers to leverage this open-source tool to explore new test-generation techniques.
Overview
This tool is part of a broader suite of utilities designed to automate the creation of unit tests for software projects. Utilizing advanced Generative AI models, it aims to simplify and expedite the testing process, ensuring high-quality software development. The system comprises several components:
- Test Runner: Executes the command or scripts to run the test suite and generate code coverage reports.
- Coverage Parser: Validates that code coverage increases as tests are added, ensuring that new tests contribute to the overall test effectiveness.
- Prompt Builder: Gathers necessary data from the codebase and constructs the prompt to be passed to the Large Language Model (LLM).
- AI Caller: Interacts with the LLM to generate tests based on the prompt provided.
Installation and Usage
Requirements
Before you begin, make sure you have the following:
OPENAI_API_KEY
set in your environment variables, which is required for calling the OpenAI API.- Code Coverage tool: A Cobertura XML code coverage report is required for the tool to function correctly.
- For example, in Python one could use
pytest-cov
. Add the--cov-report=xml
option when running Pytest. - Note: We are actively working on adding more coverage types but please feel free to open a PR and contribute to
cover_agent/CoverageProcessor.py
- For example, in Python one could use
If running directly from the repository you will also need:
- Python installed on your system.
- Poetry installed for managing Python package dependencies. Installation instructions for Poetry can be found at https://python-poetry.org/docs/.
Standalone Runtime
Qodo Cover can be installed as a Python Pip package or run as a standalone executable.
Python Pip
To install the Python Pip package directly via GitHub run the following command:
pip install git+https://github.com/qodo-ai/qodo-cover.git
Binary
The binary can be run without any Python environment installed on your system (e.g. within a Docker container that does not contain Python). You can download the release for your system by navigating to the project's release page.
Repository Setup
Run the following command to install all the dependencies and run the project from source:
poetry install
Running the Code
After downloading the executable or installing the Pip package you can run the Cover Agent to generate and validate unit tests. Execute it from the command line by using the following command:
cover-agent \
--source-file-path "<path_to_source_file>" \
--test-file-path "<path_to_test_file>" \
--project-root "<path_to_project_root>" \
--code-coverage-report-path "<path_to_coverage_report>" \
--test-command "<test_command_to_run>" \
--test-command-dir "<directory_to_run_test_command>" \
--coverage-type "<type_of_coverage_report>" \
--desired-coverage <desired_coverage_between_0_and_100> \
--max-iterations <max_number_of_llm_iterations> \
--included-files "<optional_list_of_files_to_include>"
You can use the example code below to try out the Cover Agent. (Note that the usage_examples file provides more elaborate examples of how to use the Cover Agent)
Python
Follow the steps in the README.md file located in the templated_tests/python_fastapi/
directory to setup an environment, then return to the root of the repository, and run the following command to add tests to the python fastapi example:
cover-agent \
--source-file-path "templated_tests/python_fastapi/app.py" \
--test-file-path "templated_tests/python_fastapi/test_app.py" \
--project-root "templated_tests/python_fastapi" \
--code-coverage-report-path "templated_tests/python_fastapi/coverage.xml" \
--test-command "pytest --cov=. --cov-report=xml --cov-report=term" \
--test-command-dir "templated_tests/python_fastapi" \
--coverage-type "cobertura" \
--desired-coverage 70 \
--max-iterations 10
Go
For an example using go cd
into templated_tests/go_webservice
, set up the project following the README.md
.
To work with coverage reporting, you need to install gocov
and gocov-xml
. Run the following commands to install these tools:
go install github.com/axw/gocov/gocov@v1.1.0
go install github.com/AlekSi/gocov-xml@v1.1.0
and then run the following command:
cover-agent \
--source-file-path "app.go" \
--test-file-path "app_test.go" \
--code-coverage-report-path "coverage.xml" \
--test-command "go test -coverprofile=coverage.out && gocov convert coverage.out | gocov-xml > coverage.xml" \
--test-command-dir $(pwd) \
--coverage-type "cobertura" \
--desired-coverage 70 \
--max-iterations 1
Java
For an example using java cd
into templated_tests/java_gradle
, set up the project following the README.md.
To work with jacoco coverage reporting, follow the README.md Requirements section:
and then run the following command:
cover-agent \
--source-file-path="src/main/java/com/davidparry/cover/SimpleMathOperations.java" \
--test-file-path="src/test/groovy/com/davidparry/cover/SimpleMathOperationsSpec.groovy" \
--code-coverage-report-path="build/reports/jacoco/test/jacocoTestReport.csv" \
--test-command="./gradlew clean test jacocoTestReport" \
--test-command-dir=$(pwd) \
--coverage-type="jacoco" \
--desired-coverage=70 \
--max-iterations=1
Outputs
A few debug files will be outputted locally within the repository (that are part of the .gitignore
)
run.log
: A copy of the logger that gets dumped to yourstdout
test_results.html
: A results table that contains the following for each generated test:- Test status
- Failure reason (if applicable)
- Exit code,
stderr
stdout
- Generated test
Additional logging
If you set an environment variable WANDB_API_KEY
, the prompts, responses, and additional information will be logged to Weights and Biases.
Using other LLMs
This project uses LiteLLM to communicate with OpenAI and other hosted LLMs (supporting 100+ LLMs to date). To use a different model other than the OpenAI default you'll need to:
- Export any environment variables needed by the supported LLM following the LiteLLM instructions.
- Call the name of the model using the
--model
option when calling Cover Agent.
For example (as found in the LiteLLM Quick Start guide):
export VERTEX_PROJECT="hardy-project"
export VERTEX_LOCATION="us-west"
cover-agent \
...
--model "vertex_ai/gemini-pro"
OpenAI Compatible Endpoint
export OPENAI_API_KEY="<your api key>" # If <your-api-base> requires an API KEY, set this value.
cover-agent \
...
--model "openai/<your model name>" \
--api-base "<your-api-base>"
Azure OpenAI Compatible Endpoint
export AZURE_API_BASE="<your api base>" # azure api base
export AZURE_API_VERSION="<your api version>" # azure api version (optional)
export AZURE_API_KEY="<your api key>" # azure api key
cover-agent \
...
--model "azure/<your deployment name>"
Development
See Development for more information on how to contribute to this project.
Roadmap
Below is the roadmap of planned features, with the current implementation status:
- Automatically generates unit tests for your software projects, utilizing advanced AI models to ensure comprehensive test coverage and quality assurance. (similar to Meta)
- Being able to generate tests for different programming languages
- Being able to deal with a large variety of testing scenarios
- Generate a behavior analysis for the code under test, and generate tests accordingly
- Check test flakiness, e.g. by running 5 times as suggested by TestGen-LLM
- Cover more test generation pains
- Generate new tests that are focused on the PR changeset
- Run over an entire repo/code-base and attempt to enhance all existing test suites
- Improve usability
- Connectors for GitHub Actions, Jenkins, CircleCI, Travis CI, and more
- Integrate into databases, APIs, OpenTelemetry and other sources of data to extract relevant i/o for the test generation
- Add a setting file
QodoAI
QodoAI's mission is to enable busy dev teams to increase and maintain their code integrity. We offer various tools, including "Pro" versions of our open-source tools, which are meant to handle enterprise-level code complexity and are multi-repo codebase aware.
Try the pro version of Qodo Cover in a GitHub Action!
Top Related Projects
Robust Speech Recognition via Large-Scale Weak Supervision
WhisperX: Automatic Speech Recognition with Word-level Timestamps (& Diarization)
Port of OpenAI's Whisper model in C/C++
High-performance GPGPU inference of OpenAI's Whisper automatic speech recognition (ASR) model
Faster Whisper transcription with CTranslate2
Facebook AI Research Sequence-to-Sequence Toolkit written in Python.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot