Skip to main content
Got an issue? Let’s hear it. A feature request? Send it in! A PR? Even better!!

How to Contribute an Issue

If you have found a bug or have a feature request, please open an issue on the GitHub repository.

How to Contribute a PR

1. Fork and Clone

  1. Fork the repository on GitHub
  2. Clone your fork locally:

2. Set Up Your Development Environment

Before making changes, ensure you can run the existing test suite successfully.

Install Dependencies

Set Up API Keys for Testing

To run the full test suite, you’ll need API keys for various providers. Set these environment variables:
Note: Ollama providers run locally and don’t require API keys.

3. Run Tests

Verify your setup by running the existing tests:
All tests should pass before you make any changes.

4. Make Your Changes

  1. Create a new branch for your feature:
  2. Make your changes following the existing code style and patterns
  3. Add tests for your new feature - This is critical!

5. Testing Your Changes

Test Requirements

  • Every new feature must have tests
  • Follow the testing philosophy in test files (no defensive programming)
  • Test both success cases and edge cases
  • Ensure your tests work across all applicable providers

Testing Best Practices

  1. No Exception Hiding: Let exceptions bubble up for diagnosis
  2. Provider Filtering: Only filter by test capabilities (e.g., ProviderTestCaps in run_provider_test.dart)
  3. 80/20 Rule: Test common cases across all providers, edge cases on Google only
  4. No Duplication: Each functionality should be tested in ONE file only

6. Verify Your Changes

Before submitting:
  1. Run all tests and ensure they pass:
  2. Format your code:
  3. Analyze your code:

7. Submit Your Pull Request

  1. Commit your changes with a clear message:
  2. Push to your fork:
  3. Open a Pull Request on GitHub with:
    • Clear description of what you’ve added/changed
    • Reference to any related issues
    • Confirmation that all tests pass
    • Description of the tests you’ve added

Code Style Guidelines

  • Follow Dart conventions and the existing code style
  • Use meaningful variable and function names
  • Add documentation comments for public APIs
  • Keep functions focused and single-purpose

Need Help?

If you have questions:
  1. Check existing issues and discussions
  2. Review the test files for examples
  3. Open an issue for clarification
Thank you for contributing to dartantic_ai!