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

Separate core and cli into separate modules (directories) and only allow cli to import from core #718

Closed
AntonOsika opened this issue Sep 18, 2023 · 3 comments

Comments

@AntonOsika
Copy link
Owner

AntonOsika commented Sep 18, 2023

The idea is to separate the core logic and CLI UX specific things. To make it easier to take decisions on what makes sense from UX perspective, and how the core building blocks should work.

Would look something like:

gpt_engineer
├── core
│   ├── ai.py
│   ├── domain.py
│   ├── chat_to_files.py
│   ├── steps.py
│   └── db.py
├── cli
│   ├── main.py
│   ├── file_selector.py
│   ├── learning.py
│   └── collect.py
├── api
│   └── main.py
└── preprompts
    └── ...

One could use either:

  • PyCharm "move" automagic functionality
  • Or! gpt-engineer by adding new steps and configs, or somehow the existing -i flag
@fabhed
Copy link
Collaborator

fabhed commented Sep 20, 2023

We should probably also add an __init__.py and lift the core functionality, like this:

from gpt_engineer.core import ai, domain, chat_to_files, steps, db

then it can be consumed without specifying core in imports:

from gpt_engineer import ai

@AntonOsika
Copy link
Owner Author

AntonOsika commented Sep 20, 2023 via email

This was referenced Oct 4, 2023
@UmerHA
Copy link
Collaborator

UmerHA commented Oct 12, 2023

Done in #766

@UmerHA UmerHA closed this as completed Oct 12, 2023
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

No branches or pull requests

3 participants