Codium-ai / cover-agent

CodiumAI Cover-Agent: An AI-Powered Tool for Automated Test Generation and Code Coverage Enhancement! 💻🤖🧪🐞
https://www.codium.ai/
GNU Affero General Public License v3.0
4.23k stars 298 forks source link

Support PyIntaller with Wandb_GQL #70

Closed EmbeddedDevops1 closed 3 months ago

EmbeddedDevops1 commented 4 months ago

Issue

Pyinstaller does not currently work with Wandb. It will package but die at runtime like so:

$ make installer
$ dist/cover-agent --help
Traceback (most recent call last):
  File "cover_agent/main.py", line 3, in <module>
    from cover_agent.CoverAgent import CoverAgent
  File "PyInstaller/loader/pyimod02_importers.py", line 419, in exec_module
  File "cover_agent/CoverAgent.py", line 4, in <module>
    import wandb
  File "PyInstaller/loader/pyimod02_importers.py", line 419, in exec_module
  File "wandb/__init__.py", line 27, in <module>
  File "PyInstaller/loader/pyimod02_importers.py", line 419, in exec_module
  File "wandb/sdk/__init__.py", line 25, in <module>
  File "PyInstaller/loader/pyimod02_importers.py", line 419, in exec_module
  File "wandb/sdk/artifacts/artifact.py", line 46, in <module>
  File "PyInstaller/loader/pyimod02_importers.py", line 419, in exec_module
  File "wandb/apis/__init__.py", line 43, in <module>
  File "PyInstaller/loader/pyimod02_importers.py", line 419, in exec_module
  File "wandb/apis/internal.py", line 3, in <module>
  File "PyInstaller/loader/pyimod02_importers.py", line 419, in exec_module
  File "wandb/sdk/internal/internal_api.py", line 34, in <module>
ModuleNotFoundError: No module named 'wandb_gql'
[42538] Failed to execute script 'main' due to unhandled exception!

Potential Fix

It appears that some people manage to get this working in this GitHub issue: https://github.com/pyinstaller/pyinstaller/issues/7655. More investigate and help is needed if we want to turn the build and release stages in GitHub Actions back on.

How to test

Running these commands:

$ make installer
$ dist/cover-agent --help

Should result in a 0 exit code. Additionally, running tests_integration/test_all.sh would cover all bases (after running make installer).