Skip to content

Conversation

@haacked
Copy link
Collaborator

@haacked haacked commented Apr 23, 2025

And make sure we activate properly.

This doesn't affect any library code, just tooling around working on the project.

And make sure we activate properly.
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Enhanced development scripts with virtual environment management and improved test execution flexibility in the PostHog Python library.

  • Added ensure_virtual_env function in /bin/helpers/_utils.sh to centralize virtual environment activation checks
  • Modified /bin/test to accept command-line arguments for pytest via "$@"
  • Updated /bin/fmt to ensure virtual environment activation before running black and isort
  • Added helpful error messages in /bin/helpers/_utils.sh when virtual environment setup is incomplete

4 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

@haacked
Copy link
Collaborator Author

haacked commented Apr 23, 2025

The real purpose of this PR is to fix the build. Looks like master is in a broken state.

haacked added 2 commits April 23, 2025 13:02
This removes the warnings when running tests.
@haacked haacked force-pushed the haacked/improve-scripts branch from ce93635 to d5bb4af Compare April 23, 2025 20:06
@haacked haacked force-pushed the haacked/improve-scripts branch from d47b486 to 4de794c Compare April 23, 2025 20:26
Had to fake some imported classes
@haacked haacked force-pushed the haacked/improve-scripts branch from 4de794c to 47522ad Compare April 23, 2025 20:29
@haacked
Copy link
Collaborator Author

haacked commented Apr 23, 2025

Also updated test_openai.py, test_anthropic.py, and test_callbacks.py to be skipped when running locally via bin/test if the imports fail. They were failing the test runner and preventing me from running all the other tests.

Not sure if there's some setup code that should be added to bin/setup to run these tests locally, but for now, this fixes things for those developing locally.

@haacked haacked requested a review from dmarticus April 23, 2025 20:35
@haacked haacked merged commit a1b81ee into master Apr 23, 2025
6 checks passed
@haacked haacked deleted the haacked/improve-scripts branch April 23, 2025 20:53
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