Skip to content
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

Restructure logs.py into a module; include log_cycle #4921

Merged
merged 7 commits into from
Jul 9, 2023

Conversation

Pwuts
Copy link
Member

@Pwuts Pwuts commented Jul 8, 2023

Part of #4799

Title speaks for itself :)

PR Quality Checklist

  • My pull request is atomic and focuses on a single change.
  • I have thoroughly tested my changes with multiple different prompts.
  • I have considered potential risks and mitigations for my changes.
  • I have documented my changes clearly and comprehensively.
  • I have not snuck in any "extra" small tweaks changes.
  • I have run the following commands against my code to ensure it passes our linters:
    black .
    isort .
    mypy
    autoflake --remove-all-unused-imports --recursive --ignore-init-module-imports --ignore-pass-after-docstring autogpt tests --in-place

@netlify
Copy link

netlify bot commented Jul 8, 2023

Deploy Preview for auto-gpt-docs canceled.

Name Link
🔨 Latest commit 6661913
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/64aaf6e738da9c000718728c

@github-actions github-actions bot added the size/l label Jul 8, 2023
@Pwuts Pwuts added this to the v0.4.5 Release milestone Jul 8, 2023
@Pwuts Pwuts changed the title Consolidate all logging stuff into one module Consolidate log_cycle with logs and restructure into a module Jul 8, 2023
@Pwuts Pwuts changed the title Consolidate log_cycle with logs and restructure into a module Restructure logs.py into a module; include log_cycle Jul 8, 2023
@Pwuts Pwuts added function: logging code quality ⬆️ PRs that improve code quality labels Jul 8, 2023
@codecov
Copy link

codecov bot commented Jul 8, 2023

Codecov Report

Patch coverage: 82.01% and project coverage change: -0.02 ⚠️

Comparison is base (f6da992) 50.55% compared to head (6661913) 50.53%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4921      +/-   ##
==========================================
- Coverage   50.55%   50.53%   -0.02%     
==========================================
  Files         116      118       +2     
  Lines        4860     4820      -40     
  Branches      657      642      -15     
==========================================
- Hits         2457     2436      -21     
+ Misses       2219     2204      -15     
+ Partials      184      180       -4     
Impacted Files Coverage Δ
autogpt/llm/base.py 86.00% <69.56%> (-4.91%) ⬇️
autogpt/config/config.py 81.76% <70.00%> (-1.25%) ⬇️
autogpt/logs/utils.py 71.05% <71.05%> (ø)
autogpt/llm/chat.py 65.78% <75.00%> (-0.45%) ⬇️
autogpt/llm/utils/token_counter.py 82.50% <77.77%> (-1.88%) ⬇️
autogpt/logs/handlers.py 88.88% <88.88%> (ø)
autogpt/memory/message_history.py 81.72% <89.28%> (-2.98%) ⬇️
autogpt/logs/formatters.py 89.47% <89.47%> (ø)
autogpt/agent/__init__.py 100.00% <100.00%> (ø)
autogpt/agent/agent.py 58.90% <100.00%> (-0.28%) ⬇️
... and 3 more

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

autogpt/agent/agent.py Outdated Show resolved Hide resolved
autogpt/llm/chat.py Outdated Show resolved Hide resolved
collijk
collijk previously approved these changes Jul 9, 2023
Copy link
Contributor

@collijk collijk left a comment

Choose a reason for hiding this comment

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

Some optional suggestions here. I'm presuming the only changes here is code motion + typing (nice job on that!). If you've added any logic changes, please flag them with a comment and re-request a review. Otherwise looks good!

@Pwuts Pwuts force-pushed the cq/consolidate-logging branch from 9c55600 to 269140e Compare July 9, 2023 17:14
@Pwuts Pwuts requested a review from collijk July 9, 2023 17:15
collijk
collijk previously approved these changes Jul 9, 2023
@Auto-GPT-Bot
Copy link
Contributor

You changed AutoGPT's behaviour. The cassettes have been updated and will be merged to the submodule when this Pull Request gets merged.

@Pwuts Pwuts merged commit e8b6676 into Significant-Gravitas:master Jul 9, 2023
@Pwuts Pwuts deleted the cq/consolidate-logging branch July 9, 2023 18:14
Alaaelmziat pushed a commit to Alaaelmziat/Auto-GPT that referenced this pull request Jul 12, 2023
…vitas#4921)

* Consolidate all logging stuff into one module

* Merge import statement for `logs` and `logs.log_cycle`

---------

Co-authored-by: James Collins <[email protected]>
dayofthedave pushed a commit to dayofthedave/Auto-GPT that referenced this pull request Jul 17, 2023
…vitas#4921)

* Consolidate all logging stuff into one module

* Merge import statement for `logs` and `logs.log_cycle`

---------

Co-authored-by: James Collins <[email protected]>
@Pwuts Pwuts mentioned this pull request Jul 21, 2023
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants