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

feat(dx): add a code-workspace for vscode #7285

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ntindle
Copy link
Member

@ntindle ntindle commented Jun 27, 2024

User description

Background

Developing autogpt is kinda a pain rn across all the different services. This allows you to have segmented terminals for each that don't try and activate weird poetry envs automatically

Changes 🏗️

PR Quality Scorecard ✨

  • Have you used the PR description template?   +2 pts
  • Is your pull request atomic, focusing on a single change?   +5 pts
  • Have you linked the GitHub issue(s) that this PR addresses?   +5 pts
  • Have you documented your changes clearly and comprehensively?   +5 pts
  • Have you changed or added a feature?   -4 pts
    • Have you added/updated corresponding documentation?   +4 pts
    • Have you added/updated corresponding integration tests?   +5 pts
  • Have you changed the behavior of AutoGPT?   -5 pts
    • Have you also run agbenchmark to verify that these changes do not regress performance?   +10 pts

PR Type

Enhancement, Configuration changes


Description

  • Added a new VSCode workspace configuration file to streamline development.
  • Defined folder paths for various project directories to organize the workspace.
  • Configured Python analysis settings to enhance code intelligence and auto-completion.
  • Recommended useful extensions for Python development, Flutter, Prisma, SQLite, and workspace terminals.

Changes walkthrough 📝

Relevant files
Configuration changes
autogpt-workspace.code-workspace
Add VSCode workspace configuration for AutoGPT project     

.vscode/autogpt-workspace.code-workspace

  • Added a new VSCode workspace configuration file.
  • Defined folder paths for various project directories.
  • Set Python analysis settings for better code intelligence.
  • Recommended extensions for Python, Flutter, Prisma, SQLite, and
    workspace terminals.
  • +69/-0   

    💡 PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    Copy link

    PR Description updated to latest commit (8120b4e)

    Copy link

    PR Reviewer Guide 🔍

    ⏱️ Estimated effort to review [1-5] 2
    🧪 Relevant tests No
    🔒 Security concerns No
    ⚡ Key issues to review None

    Copy link

    netlify bot commented Jun 27, 2024

    Deploy Preview for auto-gpt-docs canceled.

    Name Link
    🔨 Latest commit cd6f861
    🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/667dff78c48efe00081d56de

    Copy link

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Score
    Enhancement
    Enhance type checking by setting it to strict mode

    To ensure better compatibility and performance, consider setting the
    python.analysis.typeCheckingMode to strict instead of basic.

    .vscode/autogpt-workspace.code-workspace [47]

    -"python.analysis.typeCheckingMode": "basic"
    +"python.analysis.typeCheckingMode": "strict"
     
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    Why: Setting the type checking mode to strict can catch more potential issues during development, improving code quality and reducing bugs.

    8

    },
    "extensions": {
    "recommendations": [
    "charliermarsh.ruff",
    Copy link
    Member

    Choose a reason for hiding this comment

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

    Only one of the 5 projects in the repo currently uses Ruff.

    Copy link
    Member Author

    Choose a reason for hiding this comment

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

    Each project uses diff things. Might as well suggest what we have

    Copy link
    Member

    Choose a reason for hiding this comment

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

    Wouldn't this file cause Ruff to make all kinds of automatic changes, even in projects that don't use Ruff?

    "recommendations": [
    "charliermarsh.ruff",
    "dart-code.flutter",
    "ms-python.black-formatter",
    Copy link
    Member

    Choose a reason for hiding this comment

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

    Ruff + Black?

    Copy link
    Member Author

    Choose a reason for hiding this comment

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

    Some use ruff some use black

    "ms-python.vscode-pylance",
    "prisma.prisma",
    "qwtel.sqlite-viewer",
    "joshx.workspace-terminals"
    Copy link
    Member

    Choose a reason for hiding this comment

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

    VSCode already lets you choose when opening a terminal. If we have 10 folders by default I don't want it to open up 10 terminals on start-up, because there is no way I'll actually be working on all 10 folders at the same time.

    Copy link
    Member Author

    Choose a reason for hiding this comment

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

    Oh lol there’s a setting to disable that

    Copy link
    Member

    Choose a reason for hiding this comment

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

    Then what's the point of the extension? Afaics that's the only thing it does.

    "python.analysis.inlayHints.callArgumentNames": "partial",
    "python.analysis.fixAll": [
    "source.convertImportFormat",
    "source.unusedImports"
    Copy link
    Member

    Choose a reason for hiding this comment

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

    This one is actually quite annoying imo, because if you add an import with the intention of using it later and you hit save, the import disappears.

    Copy link
    Member Author

    @ntindle ntindle Jun 28, 2024

    Choose a reason for hiding this comment

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

    Removing it is fine with me, just make the commits as I’m OOO for the next week or so. The workspace splitting and extension recommendations matter here more imo. Each project will probably have its own settings

    Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
    Comment on lines +3 to +14
    {
    "name": ".github",
    "path": "../.github"
    },
    {
    "name": ".vscode",
    "path": "../.vscode"
    },
    {
    "name": "assets",
    "path": "../assets"
    },
    Copy link
    Member

    Choose a reason for hiding this comment

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

    These don't need separate interpreters or environments so can be covered by the root folder

    Copy link
    Member Author

    Choose a reason for hiding this comment

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

    Fair drop them

    Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    Status: 🆕 Needs initial review
    Development

    Successfully merging this pull request may close these issues.

    None yet

    2 participants