-
-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Add --sysinfo
CLI Argument to Output System Information for Debugging
#1169
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
Conversation
Hello @Vikranth3140! Thank you for your pull request! Please review the (soon to be merged) guidance on resolving the Please resolve and we'll review! |
Hello @captivus, I have resolved the pre-commit issue and now all the checks have passed in the build pipeline. |
@captivus can I bug you to check @Vikranth3140's changes and approve if this looks good now? |
Heya @Vikranth3140 -- thanks for picking up this issue! Can you do something to better format the output? In particular, the packages installed is quiite verbose in a default GPT-Engineer installation. See below: os: Linux
os_version: #22~22.04.1-Ubuntu SMP Tue Apr 30 16:08:18 UTC 2024
architecture: x86_64
python_version: 3.10.13 (main, May 30 2024, 20:38:07) [GCC 9.4.0]
packages: {'accessible-pygments': '0.0.4', 'aiohttp': '3.9.5', 'aiosignal': '1.3.1', 'alabaster': '0.7.16', 'annotated-types': '0.6.0', 'anthropic': '0.26.1', 'anyio': '4.3.0', 'asttokens': '2.4.1', 'async-timeout': '4.0.3', 'attrs': '23.2.0', 'autodoc_pydantic': '2.2.0', 'Babel': '2.14.0', 'backoff': '2.2.1', 'beautifulsoup4': '4.12.3', 'black': '23.3.0', 'bleach': '6.1.0', 'cachetools': '5.3.3', 'certifi': '2024.2.2', 'cfgv': '3.4.0', 'chardet': '5.2.0', 'charset-normalizer': '3.3.2', 'click': '8.1.7', 'colorama': '0.4.6', 'comm': '0.2.2', 'coverage': '7.5.0', 'dataclasses-json': '0.5.7', 'datasets': '2.19.0', 'debugpy': '1.8.1', 'decorator': '5.1.1', 'defusedxml': '0.7.1', 'deprecation': '2.1.0', 'dill': '0.3.8', 'distlib': '0.3.8', 'distro': '1.9.0', 'dnspython': '2.6.1', 'docutils': '0.20.1', 'exceptiongroup': '1.2.1', 'executing': '2.0.1', 'fastjsonschema': '2.19.1', 'filelock': '3.13.4', 'frozenlist': '1.4.1', 'fsspec': '2024.3.1', 'gpt-engineer': '0.3.1', 'greenlet': '3.0.3', 'h11': '0.14.0', 'httpcore': '1.0.5', 'httpx': '0.27.0', 'huggingface-hub': '0.22.2', 'identify': '2.5.36', 'idna': '3.7', 'imagesize': '1.4.1', 'importlib_metadata': '7.1.0', 'iniconfig': '2.0.0', 'ipykernel': '6.29.4', 'ipython': '8.24.0', 'jedi': '0.19.1', 'Jinja2': '3.1.3', 'jiter': '0.4.0', 'jsonpatch': '1.33', 'jsonpointer': '2.4', 'jsonschema': '4.21.1', 'jsonschema-specifications': '2023.12.1', 'jupyter-cache': '1.0.0', 'jupyter_client': '8.6.1', 'jupyter_core': '5.7.2', 'jupyterlab_pygments': '0.3.0', 'langchain': '0.2.1', 'langchain-anthropic': '0.1.13', 'langchain-community': '0.2.1', 'langchain-core': '0.2.1', 'langchain-openai': '0.1.7', 'langchain-text-splitters': '0.2.0', 'langsmith': '0.1.51', 'LinkChecker': '10.4.0', 'Markdown': '3.6', 'markdown-include': '0.8.1', 'markdown-it-py': '3.0.0', 'MarkupSafe': '2.1.5', 'marshmallow': '3.21.1', 'marshmallow-enum': '1.5.1', 'matplotlib-inline': '0.1.7', 'mdit-py-plugins': '0.4.0', 'mdurl': '0.1.2', 'mistune': '3.0.2', 'monotonic': '1.6', 'multidict': '6.0.5', 'multiprocess': '0.70.16', 'mypy': '1.3.0', 'mypy-extensions': '1.0.0', 'myst-nb': '1.1.0', 'myst-parser': '3.0.0', 'nbclient': '0.10.0', 'nbconvert': '7.16.3', 'nbformat': '5.10.4', 'nbsphinx': '0.9.3', 'nest-asyncio': '1.6.0', 'nodeenv': '1.8.0', 'numpy': '1.26.4', 'openai': '1.30.1', 'orjson': '3.10.1', 'packaging': '23.2', 'pandas': '2.2.2', 'pandocfilters': '1.5.1', 'parso': '0.8.4', 'pathspec': '0.12.1', 'pexpect': '4.9.0', 'pillow': '10.3.0', 'pip': '24.0', 'platformdirs': '4.2.1', 'pluggy': '1.5.0', 'pre-commit': '3.3.3', 'prompt-toolkit': '3.0.43', 'psutil': '5.9.8', 'ptyprocess': '0.7.0', 'pure-eval': '0.2.2', 'pyarrow': '16.0.0', 'pyarrow-hotfix': '0.6', 'pydantic': '2.7.1', 'pydantic_core': '2.18.2', 'pydantic-settings': '2.2.1', 'pydata-sphinx-theme': '0.15.2', 'Pygments': '2.17.2', 'pyperclip': '1.8.2', 'pyproject-api': '1.6.1', 'pytest': '8.1.2', 'pytest-cov': '4.1.0', 'python-dateutil': '2.9.0.post0', 'python-dotenv': '0.21.1', 'pytz': '2024.1', 'PyYAML': '6.0.1', 'pyzmq': '26.0.2', 'referencing': '0.35.0', 'regex': '2023.12.25', 'requests': '2.31.0', 'rich': '13.7.1', 'rpds-py': '0.18.0', 'rudder-sdk-python': '2.1.0', 'ruff': '0.4.2', 'setuptools': '69.5.1', 'shellingham': '1.5.4', 'six': '1.16.0', 'sniffio': '1.3.1', 'snowballstemmer': '2.2.0', 'soupsieve': '2.5', 'Sphinx': '7.3.7', 'sphinx-autobuild': '2024.4.16', 'sphinx-book-theme': '1.1.2', 'sphinx-copybutton': '0.5.2', 'sphinx-rtd-theme': '2.0.0', 'sphinx-typlog-theme': '0.8.0', 'sphinxcontrib-applehelp': '1.0.8', 'sphinxcontrib-devhelp': '1.0.6', 'sphinxcontrib-htmlhelp': '2.0.5', 'sphinxcontrib-jquery': '4.1', 'sphinxcontrib-jsmath': '1.0.1', 'sphinxcontrib-qthelp': '1.0.7', 'sphinxcontrib-serializinghtml': '1.1.10', 'SQLAlchemy': '2.0.29', 'stack-data': '0.6.3', 'starlette': '0.37.2', 'tabulate': '0.9.0', 'tenacity': '8.2.3', 'termcolor': '2.3.0', 'tiktoken': '0.7.0', 'tinycss2': '1.3.0', 'tokenizers': '0.19.1', 'toml': '0.10.2', 'tomli': '2.0.1', 'tomlkit': '0.12.4', 'tornado': '6.4', 'tox': '4.15.0', 'tqdm': '4.66.2', 'traitlets': '5.14.3', 'typer': '0.12.3', 'typing_extensions': '4.11.0', 'typing-inspect': '0.9.0', 'tzdata': '2024.1', 'urllib3': '2.2.1', 'uvicorn': '0.29.0', 'virtualenv': '20.26.0', 'watchfiles': '0.21.0', 'wcwidth': '0.2.13', 'webencodings': '0.5.1', 'websockets': '12.0', 'xxhash': '3.4.1', 'yarl': '1.9.4', 'zipp': '3.18.1'} As we intend to use this to assist in troubleshooting issues, it would be nice to be able to read the output a bit easier. You're on the right track! |
Hi, thanks for the reply |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1169 +/- ##
==========================================
- Coverage 67.76% 67.46% -0.31%
==========================================
Files 32 32
Lines 1821 1841 +20
==========================================
+ Hits 1234 1242 +8
- Misses 587 599 +12 ☔ View full report in Codecov by Sentry. |
Hi @captivus, Thank you for the feedback! I've updated the Updated Example Output:os: Linux
os_version: #22~22.04.1-Ubuntu SMP Tue Apr 30 16:08:18 UTC 2024
architecture: x86_64
python_version: 3.10.13 (main, May 30 2024, 20:38:07) [GCC 9.4.0]
packages:
accessible-pygments: 0.0.4
aiohttp: 3.9.5
aiosignal: 1.3.1
alabaster: 0.7.16
annotated-types: 0.6.0
... (and more) I've also applied the necessary formatting changes as per the pre-commit hooks. Additionally, please let me know if all the packages need to be shown or if displaying the first 5 is sufficient for a clearer and more concise understanding. Let me know if any further changes are needed. Thank you! |
Hi @captivus, I've reviewed the Tox pytest for 3.11 and 3.12 test results, and it appears that the errors in the Python 3.11 and 3.12 action workflows are NOT caused by the changes in my pull request. The errors are related to compatibility issues between the Error Summary:
Analysis:
|
Hey @captivus, do let me know if there is any issue, I will try my best to fix it :) |
Heya @Vikranth3140! I see your comment about the tox errors and will look into this. |
Okay, thanks for the reply |
Merging this, despite continued @viborc @ATheorell we need to revisit this error, as it seems it's erroring out now due to (gpt-engineer-py3.10) @captivus ➜ /workspaces/gpt-engineer/projects/example (pr-1169) $ tox
.pkg: _optional_hooks projects/example> python /home/codespace/.cache/pypoetry/virtualenvs/gpt-engineer-S23JznWt-py3.10/lib/python3.10/site-packages/pyproject_api/_backend.py True poetry.core.masonry.api
.pkg: get_requires_for_build_sdist projects/example> python /home/codespace/.cache/pypoetry/virtualenvs/gpt-engineer-S23JznWt-py3.10/lib/python3.10/site-packages/pyproject_api/_backend.py True poetry.core.masonry.api
.pkg: get_requires_for_build_wheel projects/example> python /home/codespace/.cache/pypoetry/virtualenvs/gpt-engineer-S23JznWt-py3.10/lib/python3.10/site-packages/pyproject_api/_backend.py True poetry.core.masonry.api
.pkg: prepare_metadata_for_build_wheel projects/example> python /home/codespace/.cache/pypoetry/virtualenvs/gpt-engineer-S23JznWt-py3.10/lib/python3.10/site-packages/pyproject_api/_backend.py True poetry.core.masonry.api
.pkg: build_sdist projects/example> python /home/codespace/.cache/pypoetry/virtualenvs/gpt-engineer-S23JznWt-py3.10/lib/python3.10/site-packages/pyproject_api/_backend.py True poetry.core.masonry.api
py310: install_package projects/example> python -I -m pip install --force-reinstall --no-deps /workspaces/gpt-engineer/.tox/.tmp/package/3/gpt_engineer-0.3.1.tar.gz
py310: commands[0] projects/example> poetry install
Installing dependencies from lock file
Package operations: 0 installs, 1 update, 0 removals
- Downgrading certifi (2024.7.4 -> 2024.2.2)
Installing the current project: gpt-engineer (0.3.1)
py310: commands[1] projects/example> poetry run pytest --cov=gpt_engineer --cov-report=xml -k 'not installed_main_execution'
============================================================================= test session starts ==============================================================================
platform linux -- Python 3.10.13, pytest-8.1.2, pluggy-1.5.0
cachedir: .tox/py310/.pytest_cache
rootdir: /workspaces/gpt-engineer
configfile: pyproject.toml
plugins: anyio-4.3.0, cov-4.1.0
collected 123 items / 1 deselected / 122 selected
tests/applications/cli/test_cli_agent.py .... [ 3%]
tests/applications/cli/test_collection_consent.py ........ [ 9%]
tests/applications/cli/test_learning.py ......... [ 17%]
tests/applications/cli/test_main.py ........... [ 26%]
tests/benchmark/test_BenchConfig.py .... [ 29%]
tests/core/default/test_disk_execution_env.py .... [ 32%]
tests/core/default/test_disk_file_repository.py ............. [ 43%]
tests/core/default/test_simple_agent.py .. [ 45%]
tests/core/default/test_steps.py ............. [ 55%]
tests/core/test_ai.py ... [ 58%]
tests/core/test_chat_to_files.py ................. [ 72%]
tests/core/test_git.py ....... [ 77%]
tests/core/test_salvage_correct_hunks.py ......... [ 85%]
tests/core/test_token_usage.py .... [ 88%]
tests/test_install.py .. [ 90%]
tests/test_project_config.py ............ [100%]
---------- coverage: platform linux, python 3.10.13-final-0 ----------
Coverage XML written to file coverage.xml
====================================================================== 122 passed, 1 deselected in 26.19s ======================================================================
py310: OK ✔ in 34.15 seconds
py311: skipped because could not find python interpreter with spec(s): py311
py311: SKIP ⚠ in 0.38 seconds
py312: install_package projects/example> python -I -m pip install --force-reinstall --no-deps /workspaces/gpt-engineer/.tox/.tmp/package/4/gpt_engineer-0.3.1.tar.gz
py312: commands[0] projects/example> poetry install
Installing dependencies from lock file
Package operations: 0 installs, 1 update, 0 removals
- Downgrading certifi (2024.7.4 -> 2024.2.2)
Installing the current project: gpt-engineer (0.3.1)
py312: commands[1] projects/example> poetry run pytest --cov=gpt_engineer --cov-report=xml -k 'not installed_main_execution'
============================================================================= test session starts ==============================================================================
platform linux -- Python 3.12.3, pytest-8.1.2, pluggy-1.5.0
cachedir: .tox/py312/.pytest_cache
rootdir: /workspaces/gpt-engineer
configfile: pyproject.toml
plugins: anyio-4.3.0, cov-4.1.0
collected 123 items / 1 deselected / 122 selected
tests/applications/cli/test_cli_agent.py .... [ 3%]
tests/applications/cli/test_collection_consent.py ........ [ 9%]
tests/applications/cli/test_learning.py ......... [ 17%]
tests/applications/cli/test_main.py ........... [ 26%]
tests/benchmark/test_BenchConfig.py .... [ 29%]
tests/core/default/test_disk_execution_env.py .... [ 32%]
tests/core/default/test_disk_file_repository.py ............. [ 43%]
tests/core/default/test_simple_agent.py .. [ 45%]
tests/core/default/test_steps.py ............. [ 55%]
tests/core/test_ai.py ... [ 58%]
tests/core/test_chat_to_files.py ................. [ 72%]
tests/core/test_git.py ....... [ 77%]
tests/core/test_salvage_correct_hunks.py ......... [ 85%]
tests/core/test_token_usage.py .... [ 88%]
tests/test_install.py .. [ 90%]
tests/test_project_config.py ............ [100%]
=============================================================================== warnings summary ===============================================================================
tests/applications/cli/test_learning.py::test_extract_learning
/workspaces/gpt-engineer/gpt_engineer/applications/cli/learning.py:108: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
timestamp: str = field(default_factory=lambda: datetime.utcnow().isoformat())
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
---------- coverage: platform linux, python 3.12.3-final-0 -----------
Coverage XML written to file coverage.xml
================================================================ 122 passed, 1 deselected, 1 warning in 29.22s =================================================================
.pkg: _exit projects/example> python /home/codespace/.cache/pypoetry/virtualenvs/gpt-engineer-S23JznWt-py3.10/lib/python3.10/site-packages/pyproject_api/_backend.py True poetry.core.masonry.api
py310: OK (34.15=setup[4.37]+cmd[2.47,27.30] seconds)
py311: SKIP (0.38 seconds)
py312: OK (35.42=setup[3.16]+cmd[1.82,30.44] seconds)
congratulations :) (70.10 seconds)
(gpt-engineer-py3.10) @captivus ➜ /workspaces/gpt-engineer/projects/example (pr-1169) $ |
@viborc @ATheorell fixed in #1182 |
This PR addresses #1143 by introducing a new
--sysinfo
command-line argument to the GPT-Engineer CLI tool. The--sysinfo
argument allows users to output detailed system information for debugging purposes. This information includes the operating system, OS version, system architecture, Python version, and installed Python packages.Changes Include:
--sysinfo
option to the Typer CLI inmain.py
.get_system_info
andget_installed_packages
functions to gather and format system information.main.py
to include the--sysinfo
option and corresponding logic.Usage:
To use the new
--sysinfo
feature, run the following command:This will display the following information:
Example Output:
Notes:
Please review the changes and provide feedback. Thank you!