Skip to content

Install Codeflash Github action #2195

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

Closed
wants to merge 12 commits into from

Conversation

misrasaurabh1
Copy link
Contributor

@misrasaurabh1 misrasaurabh1 commented Jul 14, 2025

  • This Pull Request sets up the codeflash.yml file which will run on every new Pull Request that modifies the source code for pydantic_ai_slim/pydantic_ai and is covered by the tests/test_examples.py.
  • We modified the test file to add benchmark to selectively trace and benchmark the examples.
  • We have installed codeflash as a dev dependency, and setup the codeflash config in the pyproject.toml file.

Actions Required to make this work-

  • Install the Codeflash Github app from this link to this repo. This is required for our github-bot to comment and create suggestions on the github repo.
  • Create a new CODEFLASH_API_KEY after signing up to Codeflash from our website. The onboarding will ask you to create an API Key and show instructions on how to save the api key on your repo secrets.

Then, after this PR is merged in it will start generating new optimizations 🎉

@KRRT7 KRRT7 force-pushed the trigger-cf-workflow branch from ba7288f to f7ae6be Compare July 24, 2025 22:36
Copy link
Contributor

hyperlint-ai bot commented Jul 24, 2025

PR Change Summary

Set up Codeflash GitHub action with necessary configurations and added guidance for development and testing.

  • Installed Codeflash as a dev dependency and configured it in the pyproject.toml file.
  • Added CLAUDE.md for development guidance and project architecture.
  • Updated several documentation files to reflect new features and integrations.
  • Modified API documentation to include new providers and configuration options.

Modified Files

  • docs/ag-ui.md
  • docs/api/messages.md
  • docs/api/providers.md
  • docs/mcp/client.md
  • docs/mcp/server.md
  • docs/models/index.md
  • docs/models/openai.md
  • docs/output.md

Added Files

  • CLAUDE.md

How can I customize these reviews?

Check out the Hyperlint AI Reviewer docs for more information on how to customize the review.

If you just want to ignore it on this PR, you can add the hyperlint-ignore label to the PR. Future changes won't trigger a Hyperlint review.

Note specifically for link checks, we only check the first 30 links in a file and we cache the results for several hours (for instance, if you just added a page, you might experience this). Our recommendation is to add hyperlint-ignore to the PR to ignore the link check for this PR.

@KRRT7 KRRT7 force-pushed the trigger-cf-workflow branch from f7ae6be to 091c499 Compare July 24, 2025 22:46
@KRRT7 KRRT7 force-pushed the trigger-cf-workflow branch from b40a2bf to d7b063e Compare July 25, 2025 02:36
@KRRT7 KRRT7 force-pushed the trigger-cf-workflow branch from eee4872 to dddb328 Compare July 29, 2025 02:33
@@ -222,9 +223,19 @@ def print(self, *args: Any, **kwargs: Any) -> None:
test_globals: dict[str, str] = {'__name__': dunder_name}

if eval_example.update_examples: # pragma: lax no cover
eval_example.run_print_update(example, call=call_name, module_globals=test_globals)
benchmark(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this fixture coming directly from codeflash?

Copy link

Choose a reason for hiding this comment

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

Yes.

This fixture is provided by codeflash & adapts based on the testing environment: it uses CodeFlash's internal benchmarking when Codeflash mechanisms are active, falls back to pytest-benchmark when available in standard pytest, or acts as a no-op otherwise to preserve normal test behavior.

@DouweM DouweM self-assigned this Jul 30, 2025
@DouweM DouweM closed this Jul 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants