-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[Enhancement]: Local database in the project's folder #991
Comments
Hey @Michal-Mikolas thanks for the thoughtful suggestions! As you may know, we're using file-based SQLite database in GPT Pilot. Besides not requiring the user to set up a database server such as PostgreSQL, it also has a convenience that you can just copy it as you would with a regular file. Database sharingSo you can already share your project with others just by sending them the file. In gpt-pilot 0.1.x this was a bit messy because we stored files' absolute paths on your disk, and used system-dependent path separator (ie Direct editingAlthough at first glance JSON might be nicer to edit with an editor, it wouldn't really work, due to the amount of data we store in the database (a lot!). It would be really messy and not at all easy to edit. In fact, using any database tool (and since SQLite is popular there are many) is probably much easier to edit the DB than using a text editor and editing the JSON manually. Personally I use Per-project databaseWith gpt-pilot 0.2 that's possible by having per-project config file {
"db": {
"url": "sqlite+aiosqlite:////Users/Michal/Projects/workspace/my-project.db"
},
"fs": {
"type": "local",
"workspace_root": "/Users/Michal/Projects/workspace"
}
} Then, you could run Pythagora like: You'd still need to specify the project ID, and having to specify the database location all the time would be tedios, but you could work around that using a simple shell alias. GitCould you explain more how you'd use Git for Pythagora projects in general? When (at which points) would you make commits, how would collaboration work (if sharing with others)? In my mind, I'd use it only for the project files (eg. everything in BranchingIn 0.2 we've prepared the groundwork for project branching. Currently we only ever use the "main" branch and you can't create others, but we do want to support having multiple branches and switching easily between them. It's still on our TODO list for now, tho. ToolingIn 0.2 we've made it possible to import the core as a package. This makes it possible to write scripts that do something extra on top of what gpt-pilot already does. We're not providing any API guarantees (we treat all of it as internal API) but realistically don't plan to change it a lot, especially the database models and low-level utilities. For example, you could make a script that would tweak how configuration is set and which project is loaded to make per-project database/config simpler than the manual workarounds I mentioned earlier. |
Wow, this sounds very nice. I've tried several AI code assistants and GPT-Pilot is far the best one. I'm glad it's heading the right direction from what you've written :-)
Basically feature-branches. Let's say I am working on some feature in |
Version
Command-line (Python) version
Suggestion
Hello,
currently GPT-Pilot has some drawbacks due to it's database design:
I can see one solution to all of the issues above:
.gpt-pilot
sub-folder.This way I can see only pros for the GPT-Pilot users:
main.py projects/myproject
- that's it.Overall, I think separation of pilot's database would bring only good for it's users. Every project should have all the info needed in it's folder.
The text was updated successfully, but these errors were encountered: